You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is pretty simple: to put a warning where more than X arguments are used in the constructor.
The X value should be a parameter with some reasonable default (5?).
One could also think about parametrizing whether we apply the rule to all types or just to classes. Some DTO structs may be fragile, yet we can always use // swiftlint:disable in such cases.
Why should this rule be added? It is a common rule used by static analyzer tools, and is a rule that limits the responsibilities of class and keeps it small.
Provide several examples of what would and wouldn't trigger violations.
Using more than 5 parameters would trigger a warning.
Activity