Commit Graph

8 Commits

Author SHA1 Message Date
JP Simard 18f9a0e3a6
Write some docs for internal APIs (#4550)
These should be useful when writing rules, but also may become public
API in the future.
2022-11-16 13:58:55 -05:00
JP Simard f032c82b59
Fix link in comments (#4145) 2022-08-29 14:29:20 -04:00
JP Simard 37167a8a35
Add documentation comments to all public declarations (#3027) 2020-01-08 09:47:10 -08:00
JP Simard 0e862ca9c4
Enable vertical whitespace rules in SwiftLint
and fix violations
2018-12-02 14:01:23 -08:00
JP Simard dcc85fb0f3
Remove unused imports (#2382) 2018-09-02 14:09:04 -07:00
JP Simard b83e0991b9
Remove all file headers
The MIT license doesn't require that all files be prepended with this
licensing or copyright information. Realm confirmed that they're ok with this
change. This will enable some companies to contribute to SwiftLint and the
date & authorship information will remain accessible via git source control.
2018-05-04 13:42:02 -07:00
Keith Smiley 925fb26d83
Add LowerACLThanBodyRule
This new rule validates that if a type/function/variable definition has
an ACL specifier, it is more restrictive than the containing body's
level. This is intended to lint a peculiarity of SE-0025 where it is
stated:

> The compiler should not warn when a broader level of access control is
used within a type with more restrictive access, such as internal within
a private type. This allows the designer of the type to select the
access they would use were they to make the type more widely accessible.

I think this is an anti-goal because when a type is made more open, it
should be a concious decision at that time to make it public. This is of
course an opt-in rule as well. This also has the added benefit of
linting this compiler bug: https://bugs.swift.org/browse/SR-2925
2018-04-04 10:16:12 -07:00
JP Simard 04824c9b51
move 'AccessControlLevel.swift' from 'Extensions' to 'Models' 2017-05-16 10:58:49 -07:00