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
I often kind of leave a mess of structs and classes in one file until I find a suitable solution. But afterwards I find myself cleaning them up and giving them their own files because the protocol needs to go into my test project but the implementation doesn't, file sizes grow too large etcetera
Having more than one class declaration in one file would trigger the warning.
Perhaps there could be some extra rules to include or exclude protocol, struct or enum definitions in this count. Also it might be fine to have one of each in the file but not more than one of each kind.
I can only judge from my own experience if I say it should probably be default. I don't see too many projects that are well-structured but still have multiple class definitions in one fie.
The text was updated successfully, but these errors were encountered:
LucasVanDongen
changed the title
Rule request: One class per file
Rule request: One class/protocol/struct/enum declaration per file
Jul 8, 2019
New rule request
The text was updated successfully, but these errors were encountered: