0.52.3: Duplicate Hampers
Breaking
- None.
Experimental
- None.
Enhancements
-
Make severity for unallowed symbols configurable. The option name is
unallowed_symbols_severity
. It accepts the two valueswarning
anderror
(default) as usual.
SimplyDanny -
Mention a rule's identifier in the console message that is printed when the
rule's associated configuration entry contains invalid values.
SimplyDanny -
Silence
xct_specific_matcher
rule on "one argument asserts" if there are
potential types or tuples involved in the comparison as types and tuples do
not conform toEquatable
.
SimplyDanny
#4990 -
Add
grouping
option to thesorted_imports
rule allowing
to sort groups of imports defined by their preceding attributes
(e.g.@testable
,@_exported
, ...).
hiltonc -
Add new
--silence-deprecation-warnings
flag that silences deprecation
warnings that would otherwise be printed to the console.
SimplyDanny
#4989 -
Do not trigger
redundant_self_in_closure
rule when another idenfierx
in
scope shadows the field accessed byself.x
to avoid semantical changes.
SimplyDanny
#5010 -
Rewrite
todo
rule with SwiftSyntax.
woxtu -
Adds an
unneeded_synthesized_initializer
rule, based on
swift-format
'sUseSynthesizedInitializer
rule, which warns
when a defined default or memberwise initializer would have been
automatically synthesized.
Martin Redington
Bug Fixes
-
The option
validates_start_with_lowercase
can now be disabled by setting it
tooff
.
SimplyDanny
#5036 -
Do not trigger
prefer_self_in_static_references
rule ontypealias
declarations in classes.
SimplyDanny
#5009 -
Do not trigger
prefer_self_in_static_references
rule on collection types in
classes, but on initializers like[C]()
in all types.
SimplyDanny
#5042 -
Fix false positives on
redundant_objc_attribute
rule for enums
and private members.
Martin Redington
#4633 -
Fix autocorrect for
CGIntersectionRect
inlegacy_cggeometry_functions
rule.
Haoocen
#5023 -
Fix false positives on
sorted_first_last
rule whenfirst
/last
have
a predicate.
woxtu
#3023 -
Work around dyld warning about duplicate SwiftSyntax classes with Xcode 15
betas.
keith
JP Simard
#4782
Using Bazel
With bzlmod:
bazel_dep(name = "swiftlint", version = "0.52.3", repo_name = "SwiftLint")
Without bzlmod, put this in your WORKSPACE
:
WORKSPACE
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "build_bazel_rules_apple",
sha256 = "9e26307516c4d5f2ad4aee90ac01eb8cd31f9b8d6ea93619fc64b3cbc81b0944",
url = "https://github.com/bazelbuild/rules_apple/releases/download/2.2.0/rules_apple.2.2.0.tar.gz",
)
load(
"@build_bazel_rules_apple//apple:repositories.bzl",
"apple_rules_dependencies",
)
apple_rules_dependencies()
load(
"@build_bazel_rules_swift//swift:repositories.bzl",
"swift_rules_dependencies",
)
swift_rules_dependencies()
load(
"@build_bazel_rules_swift//swift:extras.bzl",
"swift_rules_extra_dependencies",
)
swift_rules_extra_dependencies()
http_archive(
name = "SwiftLint",
sha256 = "20c09504184d2496a4b40bc6f77a03d443fe4ba79b4bbbab61382bc5241d24aa",
url = "https://github.com/realm/SwiftLint/releases/download/0.52.3/bazel.tar.gz",
)
load("@SwiftLint//bazel:repos.bzl", "swiftlint_repos")
swiftlint_repos()
load("@SwiftLint//bazel:deps.bzl", "swiftlint_deps")
swiftlint_deps()
Then you can run SwiftLint in the current directory with this command:
bazel run @SwiftLint//:swiftlint -- --help