Skip to content

0.16.0: Maximum Energy Efficiency Setting

Compare
Choose a tag to compare
@jpsim jpsim released this 11 Jan 01:22
· 4273 commits to main since this release
ed7209c

What's New?

  • Ludicrously faster linting performance thanks to parallelization and caching.
  • Nicer APIs that now conform to the Swift 3 API Design Guidelines.
  • 11 new rules.
  • 9 bug fixes.
  • 7 general improvements to rules.
  • 4 rules made correctable.
  • Half a dozen internal improvements: Danger integration, performance tests, regression tests, version pinning, and support for deprecated rule aliases.

A big thank you to the contributors for this release: @aamctustwo, @dduan, @jaherhi, @JamieEdge, @marcelofabri, @mattrubin, @rakaramos and @VojtaStavik! 🎉


Breaking

  • Several API breaking changes were made to conform to the Swift 3 API Design
    Guidelines. We apologize for any inconvenience this may have caused.

Enhancements

  • Speed up linting by caching linter results across invocations.
    Marcelo Fabri
    #868
  • Speed up linting by processing multiple files and rules concurrently.
    JP Simard
    #1077
  • Make many operations in SwiftLintFramework safe to call in multithreaded
    scenarios, including accessing Linter.styleViolations.
    JP Simard
    #1077
  • Permit unsigned and explicitly-sized integer types in valid_ibinspectable
    Daniel Duan
  • Make nimble_operator rule correctable.
    Vojta Stavik
  • Add vertical_parameter_alignment rule that checks if parameters are
    vertically aligned for multi-line function declarations.
    Marcelo Fabri
    #1033
  • Add more helpful reason strings to TrailingCommaRule.
    Matt Rubin
  • Add class_delegate_protocol rule that warns against protocol declarations
    that aren't marked as : class or @objc.
    Marcelo Fabri
    #1039
  • Add correctable redundant_optional_initialization rule that warns against
    initializing optional variables with nil.
    Marcelo Fabri
    #1052
  • redundant_nil_coalescing rule is now correctable.
    Marcelo Fabri
  • Make number_separator rule correctable.
    Marcelo Fabri
  • empty_parentheses_with_trailing_closure rule is now correctable.
    Marcelo Fabri
  • Add correctable redundant_void_return rule that warns against
    explicitly adding -> Void to functions.
    Marcelo Fabri
    #1066
  • Add an opt-in rule that enforces alphabetical sorting of imports.
    Scott Berrevoets
    #900
  • type_name rule forces enum values to be UpperCamelCase again
    when used with Swift 2.3.
    Marcelo Fabri
    #1090
  • Make weak_delegate rule ignore computed properties.
    Rafael Machado
    #1089
  • Add object_literal opt-in rule that warns against using image and color
    inits that can be replaced for #imageLiteral or #colorLiteral in
    Swift 3.
    Marcelo Fabri
    #1060
  • Now number_separator rule can be configured with a minimum length.
    Marcelo Fabri
    #1109
  • Add compiler_protocol_init rule that flags usage of initializers
    declared in protocols used by the compiler such as ExpressibleByArrayLiteral
    that shouldn't be called directly. Instead, you should use a literal anywhere
    a concrete type conforming to the protocol is expected by the context.
    Marcelo Fabri
    #1096
  • Add large_tuple configurable rule that validates that tuples shouldn't
    have too many members.
    Marcelo Fabri
    #1065
  • Add generic_type_name rule that validates generic constraint type names.
    Marcelo Fabri
    #51
  • Update vertical_whitespace rule to allow configuration of the number of
    consecutive empty lines before a violation using max_empty_lines.
    The default value is still 1 line.
    Aaron McTavish
    #769
  • Add check to ignore urls in line_length rule when ignores_urls
    configuration is enabled.
    Javier Hernández
    #384
  • Add shorthand_operator rule that validates that shorthand operators should
    be used when possible.
    Marcelo Fabri
    #902
  • Allow specifying a swiftlint_version configuration key which will log a
    warning if the current running version of SwiftLint is different than this
    value.
    JP Simard
    #221
  • Add internal support for deprecated rule aliases.
    Marcelo Fabri
    #973
  • Add unused_optional_binding rule that will check for optional bindings
    not being used.
    Rafael Machado
    #1116

Bug Fixes

  • Ignore close parentheses on vertical_parameter_alignment rule.
    Marcelo Fabri
    #1042
  • syntactic_sugar rule now doesn't flag declarations that can't be fixed.
    Marcelo Fabri
    #928
  • Fix false positives on closure_parameter_position and
    unused_closure_parameter rules with Swift 2.3.
    Marcelo Fabri
    #1019
  • Fix crash on trailing_comma rule with Swift 2.3.
    Marcelo Fabri
    #921
  • Fix out of range exception in AttributesRule.
    JP Simard
    #1105
  • Fix variable_name and type_name rules on Linux.
    Marcelo Fabri
  • Fix linting directories with names ending with .swift.
    JP Simard
  • Fix running swiftlint version when building with Swift Package Manager.
    Marcelo Fabri
    #1045
  • Fix false positive on vertical_parameter_alignment rule when breaking line
    in a default parameter declaration.
    Marcelo Fabri
    #1129