SwiftLint v0.47.0 Release Notes

  • ๐Ÿ’ฅ Breaking

    • ๐Ÿ‘• SwiftLint now requires Swift 5.5 or higher to build.
      JP Simard

    • ๐Ÿ‘• The SwiftLintFramework podspec has been removed. To our knowledge, this was completely unused by other projects and was not worth the complexity needed to justify its continued maintenance, especially in light of the integration of SwiftSyntax. The SwiftLint podspec is still supported.
      JP Simard

    • ๐Ÿ‘• SwiftLint now requires at least Swift 5.0 installed in order to lint files.
      Marcelo Fabri

    Experimental

    • ๐Ÿ“œ The force_cast rule and the comment command parsing mechanism have been updated to use SwiftSyntax instead of SourceKit. Please report any problems you encounter by opening a GitHub issue. If this is successful, more rules may use Swift Syntax in the future.
      JP Simard

    โœจ Enhancements

    • Empty files no longer trigger any violations.
      JP Simard #3854

    • ๐Ÿ‘Œ Support recursive globs.
      funzin JP Simard #3789 #3891

    • 0๏ธโƒฃ The legacy_random rule is now enabled by default.
      Marcelo Fabri

    • ๐Ÿš€ The deployment_target rule now supports the #unavailable syntax added in Swift 5.6.
      Marcelo Fabri #3896

    • ๐Ÿ–จ Set the IN_PROCESS_SOURCEKIT environment variable, which will use the in-process version of sourcekitd on macOS when Xcode 13 or later is selected. This avoids the use of XPC, which is prohibited in some sandboxed environments, such as in Swift Package Manager plugins.
      Juozas Valancius

    • โž• Add ability to run only one (focused) example.
      PaulTaykalo #3911

    ๐Ÿ› Bug Fixes

    • Extend class_delegate_protocol to correctly identify cases with the protocol body opening brace on a new line.
      Tobisaninfo

    • ๐Ÿ›  Fix SwiftLint.pkg installer installing multiple copies of SwiftLint.
      JP Simard #3815 #3887