CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

🧹 Improvements to SwiftLint

Open armartinez opened this issue 1 year ago • 2 comments

Description

Expand the reach of SwifLint to include:

  • Ordering of properties in classes and structs.
  • Minimum line size

armartinez avatar Apr 17 '24 15:04 armartinez

I looked into SwiftLint and found out it doesn't have rules for ordering properties or setting a minimum line length. This is understandable as it's challenging for SwiftLint to determine whether a line break is intended for improved readability or if it's unnecessary. Here's what I think we should do:

  1. Update the Code Style Guide docs
  2. Follow Community Standards: Use common coding standards as a guide.
  3. Use common sense

However, I would like to suggest that we could enable force_unwrapping and implicit_return. What do you think?

tom-ludwig avatar Apr 19 '24 16:04 tom-ludwig

I'm not really a fan of implicit_return, IMHO it makes it more difficult for starters to know when or when not to use a return.

However we should definitely discourage the use of force unwrapping so force_unwrapping should be added.

0xWDG avatar Apr 20 '24 09:04 0xWDG