Skip to content

@jpsim jpsim released this Apr 29, 2019 · 21 commits to master since this release

This release has improved support for building and running SwiftLint using Swift 5, adds seven new (super useful) rules and fixes a number of false positives or missing violations.


  • None.


  • None.


  • Add reduce_boolean rule to prefer simpler constructs over reduce(Boolean).
    Xavier Lowmiller

  • Add nsobject_prefer_isequal rule to warn against implementing == on an
    NSObject subclass as calling isEqual (i.e. when using the class from
    Objective-C) will not use the defined == method.
    Matthew Healy

  • Add reduce_into opt-in rule to encourage the use of reduce(into:_:)
    instead of reduce(_:_:) which is less performant.
    Dalton Claybrook

  • Remove @ mark to fix invalid link in
    Hiroki Nagasawa

  • Add new opt-in rule file_types_order to specify how the types in a file
    should be sorted.
    Cihat Gündüz

  • Add new opt-in rule type_contents_order to specify the order of subtypes,
    properties, methods & more within a type.
    Cihat Gündüz

  • Add nslocalizedstring_require_bundle rule to ensure calls to
    NSLocalizedString specify the bundle where the strings file is located.
    Matthew Healy

  • contains_over_first_not_nil rule now also checks for firstIndex(where:).
    Marcelo Fabri

  • Add unused_capture_list rule to ensure that all references in a closure
    capture list are used.
    Dalton Claybrook

  • SwiftLint can now be compiled using Xcode 10.2.
    Marcelo Fabri
    Norio Nomura

Bug Fixes

  • Fix bug where SwiftLint ignores excluded files list in a nested configuration
    Dylan Bruschi

  • colon rule now catches violations when declaring generic types with
    inheritance or protocol conformance.
    Marcelo Fabri

  • discarded_notification_center_observer rule now checks if the observer is
    added to any collection or passed to a function before triggering the

  • Fix false positives on number_separator when the number is wrapped in
    Dalton Claybrook

  • Fix false positives on sorted_first_last when calling firstIndex and
    lastIndex method.
    Taiki Komaba

  • Fix crash when running on Linux with Swift 5 without specifying a --path
    value or specifying an empty string.
    Keith Smiley

  • Fix false positives on explicit_acl and explicit_top_level_acl rules when
    declaring extensions that add protocol conformances with Swift 5.
    Marcelo Fabri

  • Let disable all command override superfluous_disable_command rule.
    Frederick Pietschmann

  • Fix issues in explict_acl, redundant_set_access_control and
    explicit_top_level_acl rules when using Swift 5.
    Marcelo Fabri

Assets 5
You can’t perform that action at this time.