Repository navigation
Coin-Operated Machine RC1
Pre-releaseWe encourage you to try this pre-release version of SwiftLint. There are lots of significant changes leading up to a 0.19.0 version, which is why we've decided to share a release candidate before pushing out an official stable release.
We're especially interested in hearing feedback on:
- the newly-reenabled caching support (hence this release's cash-related name 😉 ). We'd love to hear if the cache ever returns any incorrect/stale results.
- the removal of Swift 2 support & Swift 2-only rules like
missing_docsandvalid_docs. - lots of new rules & bug fixes.
Installation
- Homebrew:
brew update && brew upgrade swiftlint --HEAD - CocoaPods:
pod 'SwiftLint', '= 0.19.0-rc.1' - Portable/pkg: See GitHub release attachments
Breaking
-
Remove support for Swift 2.
Marcelo Fabri
#1387 -
Remove
missing_docsandvalid_docsrules since
they were already disabled.
Marcelo Fabri
#1387 -
Add
modificationDate(forFileAtPath:)function requirement to
LintableFileManagerprotocol.
Victor Pimentel -
Several breaking changes to
LinterCache.
Victor Pimentel
JP Simard -
Remove
Configuration.hashproperty.
Victor Pimentel -
Rename
ConditionalReturnsOnNewlinestruct to
ConditionalReturnsOnNewlineRuleto match rule naming conventions.
JP Simard
Enhancements
-
Cache linter results for files unmodified since the previous linter run.
Victor Pimentel
JP Simard
#1184 -
Add opt-in configurations to
generic_type_name,identifier_nameand
type_namerules to allow excluding non-alphanumeric characters and names
that start with uppercase.
Javier Hernández
#541 -
Adds support for
excludedin custom rules to exclude files.
Nigel Flack
#1437 -
Make
trailing_commarule autocorrectable.
Samuel Susla
Jeremy David Giesbrecht
#1326 -
Added
no_extension_access_modifieropt-in rule to disallow access modifiers
completely, à la SE-0119.
Jose Cheyo Jimenez
#1457 -
Add lowercase and missing colon checks to the
markrule.
Jason Moore -
Improve violation reason wording in
function_body_length,
large_type, andtype_body_lengthrules.
ultimatedbz -
Add
explicit_top_level_aclopt-in rule that validates that all top
level declarations should explicitly be marked with an Access Control
Level (private,fileprivate,internal,publicoropen).
J. Cheyo Jimenez
Marcelo Fabri
#58 -
Add
implicit_returnopt-in rule that warns against using thereturn
keyword when it can be omitted inside closures.
Marcelo Fabri
#1194 -
Add option to
unused_optional_bindingrule to ignoretry?
inguardstatements.
Sega-Zero
#1432 -
Add
empty_enum_argumentscorrectable rule that warns against using
silent associated values inside acase.
Marcelo Fabri
#1425 -
Remove
file.zipfrom thePodsdirectory when installing SwiftLint via
CocoaPods.
Hesham Salman
#1507 -
Add
protocol_property_accessors_ordercorrectable rule that validates
that the order of accessors isget setwhen declaring variables
in protocols.
Marcelo Fabri
#1504
Bug Fixes
-
emojiandcheckstylereporter output report sorted by file name.
norio-nomura
#1429 -
Prevent false positive in
shorthand_operatorrule.
sammy-SC
#1254 -
Fix typo in
DiscardedNotificationCenterObserverRule.
Spencer Kaiser -
Fix
empty_parametersrule with Swift 3.
Marcelo Fabri
#1460 -
Prevent triggering
redundant_optional_initializationrule
on alazy varsince it needs initialization.
Marcelo Fabri
#1334 -
Fix
ignores_case_statementskey incyclomatic_complexitydescription.
Jeff Blagdon
#1434 -
Fall back to reporting violations on line
1if no line was provided for the
violation's location, ensuring Xcode always displays the warning or error.
rjhodge
JP Simard
#1520 -
Fix crash or incorrect violation location with strings including multi-byte
unicode characters.
Marcelo Fabri
#1006 -
Fix false positive in
syntactic_sugarrule when using nested types named
Optional,ImplicitlyUnwrappedOptional,ArrayorDictionary.
Marcelo Fabri
#1508