Skip to content

0.32.0: Wash-N-Fold-N-Reduce

Compare
Choose a tag to compare
@jpsim jpsim released this 29 Apr 04:44
6534946

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.

Breaking

  • None.

Experimental

  • None.

Enhancements

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

  • 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
    #2663

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

  • Remove @ mark to fix invalid link in Rules.md.
    Hiroki Nagasawa
    #2669

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

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

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

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

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

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

Bug Fixes

  • Fix bug where SwiftLint ignores excluded files list in a nested configuration
    file.
    Dylan Bruschi
    #2447

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

  • discarded_notification_center_observer rule now checks if the observer is
    added to any collection or passed to a function before triggering the
    violation.
    jsloop42
    #2684

  • Fix false positives on number_separator when the number is wrapped in
    parentheses.
    Dalton Claybrook
    #2683

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

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

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

  • Let disable all command override superfluous_disable_command rule.
    Frederick Pietschmann
    #2670

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