-
Notifications
You must be signed in to change notification settings - Fork 2
Update dependency realm/SwiftLint to v0.62.1 #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
renovate
wants to merge
1
commit into
master
Choose a base branch
from
renovate/realm-swiftlint-0.x
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3d3c546
to
841b3b6
Compare
841b3b6
to
c1f8e2c
Compare
c1f8e2c
to
725ed1f
Compare
725ed1f
to
15a3402
Compare
15a3402
to
d568f18
Compare
d568f18
to
a79f813
Compare
a79f813
to
bb0b84e
Compare
bb0b84e
to
a3197c1
Compare
a3197c1
to
42f667a
Compare
42f667a
to
47094af
Compare
47094af
to
d3cc76d
Compare
d3cc76d
to
30cb289
Compare
30cb289
to
3d202b6
Compare
3d202b6
to
274dfd5
Compare
274dfd5
to
631b895
Compare
631b895
to
b8b7d9b
Compare
b8b7d9b
to
b0d4c74
Compare
b0d4c74
to
e769100
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
0 participants
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.43.1
->0.62.1
Release Notes
realm/SwiftLint (realm/SwiftLint)
v0.62.1
Compare Source
Breaking
Experimental
Enhancements
Bug Fixes
SimplyDanny
v0.62.0
Compare Source
Breaking
The structure of
SwiftLintBinary.artifactbundle.zip
is now simpler. Internal paths nolonger contain version numbers, especially. So in an Xcode Run Script build phase,
you can refer to the
swiftlint
binary like this:All other consumers of the artifact bundle do not need to change anything. Swift Package
Manager resolves the new paths automatically.
SimplyDanny
SwiftLint now requires a Swift 6 or higher compiler to build. The
Swift Package Manager plugins continue
to work with all versions down to Swift 5.9.
SimplyDanny
sorted_imports
rule's behavior changed in that it now treats imports directly adjacentto each other as a group that is sorted together. Imports separated by at least one
non-import statement or empty line(s) are treated as separate groups. Comments are
considered part of the import group they are attached to and do not break it.
SimplyDanny
Experimental
Enhancements
Rewrite the following rules with SwiftSyntax:
modifier_order
sorted_imports
SimplyDanny
Add new
prefer_asset_symbols
rule that suggests using asset symbols overstring-based image initialization to avoid typos and enable compile-time
checking. This rule detects
UIImage(named:)
andSwiftUI.Image(_:)
callswith string literals and suggests using asset symbols instead.
danglingP0inter
#5939
Exclude integer generic parameters from
generic_type_name
rule.Include integer generic parameters in the
identifier_name
rule for validation.nandhinisubbu
#6213
Bug Fixes
Ignore function, initializer and subscript declarations alike when the
ignores_function_declarations
option is enabled in theline_length
rule.SimplyDanny
#6241
Individual
custom_rules
can now be specified in theonly_rule
configurationsetting and the
--only-rule
command line option without having to specifycustom_rules
as well. Additionally, violations of custom rules are now reportedin a deterministic order, sorted by the rule's identifier.
Martin Redington
#6029
#6058
Ignore
redundant_discardable_let
rule violations in nested SwiftUI scopes as wellwhen
ignore_swiftui_view_bodies
is enabled.SimplyDanny
#3855
#6255
Exclude function types from
async_without_await
rule analysis. Higher-order functionobjects can be
async
without containing anawait
when assigning to them.SimplyDanny
#6253
Exclude
@concurrent
functions fromasync_without_await
rule analysis.@concurrent
functions requiresaysnc
in any case.nandhinisubbu
#6283
swiftlint-static
, the experimental fully-static Linux binary, now uses 512 KiBas thread stack size matching Darwin’s size to prevent stack exhaustion.
ainame
#6287
v0.61.0
Compare Source
Breaking
If
SWIFTLINT_DISABLE_SOURCEKIT
is set to prohibit loadinglibsourcekitdInProc
at runtime,rules requiring SourceKit will be disabled and a warning will be printed once per rule.
SimplyDanny
The
operator_whitespace
rule has been removed and its functionality merged into thefunction_name_whitespace
rule. The latter now also checks spacing around thefunc
keyword, the function name/operator and its generic parameters while respecting comments.
On top of that, it supports autocorrection.
SimplyDanny
Expose only
TestHelpers
andExtraRulesTests
as part of Bazel releases.SimplyDanny
Experimental
libsourcekitdInProc.so
together with itstransitive dependencies to be present on the system at runtime. It is named
swiftlint
and the same binary as before. It supports all built-in rules.
swiftlint-static
that does not requireany dynamic libraries at runtime. Rules requiring SourceKit will be disabled and
reported to the console when running this binary.
Enhancements
A fully statically linked Linux binary can now be built with the Swift SDK and
the compiler options
-Xswiftc -DSWIFTLINT_DISABLE_SOURCEKIT
. This binary does notrequire
libsourcekitdInProc.so
or any other dynamic libraries to be present on thesystem at runtime. Rules requiring SourceKit will be disabled and reported to the console
when running this binary.
SimplyDanny
Add
function_name_whitespace
rule to enforce consistent spacing between thefunc
keyword, function name, and its generic parameters. Ensures exactly one space between
func
and the function name, and configurable spacing around generics viageneric_spacing
:no_space
(default):func name<T>()
leading_space
:func name <T>()
trailing_space
:func name<T> ()
leading_trailing_space
:func name <T> ()
Supports autocorrection.
GandaLF2006
The
operator_whitespace
rule now supports autocorrection and better respects comments infunction declarations. The rule has been deprecated in favor of the new
function_name_whitespace
rule. You can still refer to it by its identifier, but get checking for normal function names
on top.
SimplyDanny
In
line_length
rule, treat strings with opening and closing quotes in the same line assingle-line strings no matter if they are enclosed by triple quotes or not. Furthermore,
improve detection of comment-only lines.
SimplyDanny
#6220
#6219
Improve detection of comment-only lines in
file_length
rule.SimplyDanny
#6219
Rewrite
quick_discouraged_call
rule with SwiftSyntax.SimplyDanny
Bug Fixes
Ensure that header matched against always end in a newline in
file_header
rule.SimplyDanny
#6227
Fix
closure_end_indentation
rule reporting violations when the called baseinvolves chained optional expressions.
SimplyDanny
#6216
v0.60.0
Compare Source
Breaking
Remove support for boolean values in the
validates_start_with_lowercase
option entirely.Use the severity levels
off
,warning
orerror
instead.kaseken
SwiftLint now requires macOS 13 or higher to run.
JP Simard
In
SwiftLintBuildToolPlugin
, print the content of theBUILD_WORKSPACE_DIRECTORY
environment variable only in debug builds.
SimplyDanny
#6135
The
redundant_optional_initialization
rule has been replaced by theimplicit_optional_initialization
rule that enforces implicit or explicit initializationof optional variables. Its default style
always
mimics the behavior of theredundant_optional_initialization
rule by default.redundant_optional_initialization
is now an alias for
implicit_optional_initialization
.leo-lem
#1940
The
swiftlint_linux.zip
release archive has been renamed toswiftlint_linux_amd64.zip
to avoid confusion with the new
swiftlint_linux_arm64.zip
archive.Bradley Mackey
SimplyDanny
Experimental
Enhancements
Linting got up to 30% faster due to the praiseworthy performance
improvements done in the SwiftSyntax
library.
Ignore locally defined
count
identifiers inempty_count
rule.SimplyDanny
#5326
The
private_swiftui_state
rule now applies toViewModifier
types.mt00chikin
Support for ARM64 Linux binaries has been added. The
swiftlint_linux.zip
release archivehas been renamed to
swiftlint_linux_amd64.zip
. Next to it, a newswiftlint_linux_arm64.zip
archive has been added. The
SwiftLintBinary.artifactbundle.zip
now contains both versionsof the Linux binary, so that the binary plugins
can now be used on Linux and macOS running no both AMD64 and ARM64 architectures.
Bradley Mackey
SimplyDanny
Add
include_variables
configuration option tonon_optional_string_data_conversion
rule.When enabled, the rule will trigger on variables, properties, and function calls in addition
to string literals. Defaults to
false
for backward compatibility.SimplyDanny
#6094
Add Sendable conformance to Rule.Type for building with Swift 6.
erikkerber
#issue_number
Fix false positives for
Actor
-conforming delegate protocols in theclass_delegate_protocol
rule.imsonalbajaj
#6054
Support extensions and protocols in
type_body_length
rule. They can be configured using thenew
excluded_types
option which by default excludesextension
andprotocol
types.This means the rule now checks
struct
,class
,actor
andenum
by default. To enablechecking of extensions and protocols, set
excluded_types
to an empty array or exclude othertypes as needed.
SimplyDanny
Exclude explicit system modules from
duplicate_imports
analysis, that is, modulesthat are part of the system frameworks but need to be imported explicitly due to being
declared as
explicit module
in their module map.SimplyDanny
#6098
Ignore various assignment operators like
=
,+=
,&=
, etc. with right-hand sideternary expressions otherwise violating the
void_function_in_ternary
rule.SimplyDanny
#5611
Rewrite the following rules with SwiftSyntax:
accessibility_label_for_image
accessibility_trait_for_button
closure_end_indentation
expiring_todo
file_header
file_length
line_length
trailing_whitespace
vertical_whitespace
JP Simard
Matt Pennig
Add
excluded_paths
option to thefile_name
rule. It allows to exclude complete filepaths from analysis. All entries are treated as regular expressions. A single match in
its full path is enough to ignore a file. This is different from the
excluded
optionthat only accepts and checks against file names.
Ueeek
#6066
Fix false positives of
redundant_discardable_let
rule in@ViewBuilder
functions,#Preview
macro bodies and preview providers whenignore_swiftui_view_bodies
isenabled.
kaseken
#6063
Improve
multiline_parameters
rule to correctly supportmax_number_of_single_line_parameters
and detect mixed formatting.GandaLF2006
Add new
prefer_condition_list
rule that triggers when aguard
/if
/while
condition is composed of multiple expressions connected by the
&&
operator.It suggests to use a condition list instead, which is more idiomatic.
SimplyDanny
Add
ignore_coding_keys
parameter tonesting
rule. Setting this to true preventsCodingKey
enums from violating the rule.braker1nine
#5641
Support deinitializers and subscripts in
function_body_length
rule.SimplyDanny
Extend the
xct_specific_matcher
rule to support identity operators (===
and!==
)in addition to the existing equality operators (
==
and!=
).SimplyDanny
#5849
Add new
implicit_optional_initialization
rule to enforce implicit or explicitinitialization of optional variables, configurable via
style: always | never
.It replaces the
redundant_optional_initialization
rule mimicking it with thestyle: always
option which is the default.leo-lem
#1940
Add new
ignore_identity_closures
parameter toprefer_key_paths
rule to skipconversion of identity closures (
{ $0 }
) to identity key paths (\.self
).Note that identity key paths are only supported from Swift 6 on, hence this option
will be implicitly ignored/set to
true
when SwiftLint detects a Swift <6 compilerto avoid causing compilation errors.
p4checo
#5965
Bug Fixes
Fix
no_extension_access_modifier
rule incorrectly triggering fornonisolated extension
.The rule now only flags actual access control modifiers (
private
,public
,open
,internal
,fileprivate
) and ignores isolation modifiers likenonisolated
.copilot
#6168
Improved error reporting when SwiftLint exits, because of an invalid configuration file
or other error.
Martin Redington
#6052
Keep the default severity levels when neither
warning
norerror
values are configured.Ensure especially that the
error
level is not set tonil
when thewarning
levelisn't set either.
SimplyDanny
v0.59.1
Compare Source
Breaking
opaque_over_existential
opt-in rule as it causes too many false positivesthat can even lead to wrong-compilable code when
any
is required by a protocol thetype conforms to. In this case, using
some
can be totally valid even though theprotocol requirement is not reimplemented for the type causing behavioral changes.
SimplyDanny
Experimental
Enhancements
allowed_numbers
option to theno_magic_numbers
rule.Martin Redington
Bug Fixes
v0.59.0
Compare Source
Breaking
SimplyDanny
Experimental
swiftlint-dev
command line tool that's intended to help to develop SwiftLint by encapsulating repetitivetasks. It can already be used to generate templates for new rules including optional configurations and tests. Run
swift run swiftlint-dev rules template -h
to get an overview of the command's usage and the available customizationoptions. To register new rules, run
swift run swiftlint-dev rules register
.SimplyDanny
Enhancements
Add new option
ignores_multiline_strings
toline_length
rule. It allows to ignore too longlines inside of multiline strings.
thisIsTheFoxe
#2689
Ignore
UIColor
initializers inno_magic_numbers
rule.suojae
hyeffie
#5183
Exclude types with a
@Suite
attribute and functions annotated with@Test
fromno_magic_numbers
rule.Also treat a type as a
@Suite
if it contains@Test
functions.SimplyDanny
#5964
Add new
opaque_over_existential
opt-in rule that triggers when the existentialany
type of afunction parameter can be replaced with an opaque
some
type.SimplyDanny
Add a new rationale property to rule descriptions, providing a more expansive
description of the motivation behind each rule.
Martin Redington
#5681
Add new
allowed_types
option tolegacy_objc_type
rule to ignore certain types.kapitoshka438
#3723
Add
excluded_methods
configuration option tounneeded_override
to opt out checking methods with a given name.For example, this helps avoid a conflict with
balanced_xctest_lifecycle
where one ofsetUp/tearDown
is empty but the other is not.
jaredgrubb
Bug Fixes
Fix issue referencing the Tests package from another Bazel workspace.
jszumski
Fix crash when a disable command is preceded by a unicode character.
SimplyDanny
#5945
Allow severity of
duplicate_imports
rule to be configurable.SimplyDanny
#5978
Silence
no_magic_numbers
rule in conditions of#if
directives.SimplyDanny
#6000
Consider types restricting a protocol to classes in composed inherited types in
class_delegate_protocol
rule.SimplyDanny
#5982
Rewrite
type_contents_order
rule with SwiftSyntax fixing an issue with experimental availability macros.SimplyDanny
#5999
Update
file_name
rule to considermacro
types.fraioli
#6026
v0.58.2
Compare Source
Breaking
Experimental
Enhancements
Bug Fixes
SimplyDanny
#5966
v0.58.1
Compare Source
Breaking
If you are referring to the
swiftlint
binary from an Artifact Bundle consumed via Swift Package Managerin an Xcode Run Script Build Phase, make sure to update the path from
to
in order to make Xcode use the binary built for macOS.
SimplyDanny
#5954
Revert changes to improve performance when exclude patterns resolve to a large set of files. While resolving files
indeed got much faster in certain setups, it leads to missed exclusions for nested configurations and when the linted
folder is not the current folder.
SimplyDanny
#5953
Experimental
Enhancements
Bug Fixes
Fix
redundant_sendable
correction by removing a remaining trailing comma as well whenSendable
was last.SimplyDanny
#5952
Remove lints for
redundant_sendable
on protocols, whereSendable
is not redundant.riley-williams
#5958
Add
ib_segue_action
to default configuration oftype_contents_order
rule on the same level asib_action
todefine and document a standard position.
SimplyDanny
#5524
v0.58.0
Compare Source
Breaking
The command plugin now requires write permissions so that it works with the
--fix
option without an error.SimplyDanny
The artifact bundle name has changed.
SwiftLintBinary-macos.artifactbundle.zip
is now calledSwiftLintBinary.artifactbundle.zip
. It now includes an AMD64 Linux binary.Bradley Mackey
#5514
The
inert_defer
andunused_capture_list
rules have completely been removed after being deprecated for 2 years.SimplyDanny
SwiftLint now requires a Swift 5.10 or higher compiler to build.
The Swift Package Manager plugins continue to work with
Swift 5.9.
SimplyDanny
The
private_unit_test
rule's deprecatedregex
configuration option has been removed after 2 years.Martin Redington
#5912
Experimental
Enhancements
Add Xcode command plugin allowing to run SwiftLint from within Xcode.
SimplyDanny
Add new
async_without_await
opt-in rule that checks if anasync
declaration contains at least oneawait
.Jan Kolarik
#5082
Support replacing identity expressions with
\.self
inprefer_key_path
rule from Swift 6 on.SimplyDanny
Support linting only provided file paths with command plugins.
DanSkeel
Add new category for
@IBSegueAction
totype_contents_order
rule.dk-talks
SimplyDanny
Add option to disable
redundant_discardable_let
rule in SwiftUI view bodies.SimplyDanny
#3855
Add new
redundant_sendable
rule that triggers onSendable
conformances oftypes that are implicitly already
Sendable
due to being actor-isolated. Itis enabled by default.
SimplyDanny
Improve performance when exclude patterns resolve to a large set of files.
SimplyDanny
#5018
Bug Fixes
Ignore TipKit's
#Rule
macro inempty_count
rule.Ueeek
#5883
Ignore super calls with trailing closures in
unneeded_override
rule.SimplyDanny
#5886
If violations are detected by
lint
oranalyze
, still perform an updatecheck for new versions of SwiftLint if requested.
Martin Redington
#5904
v0.57.1
Compare Source
Breaking
Experimental
Enhancements
Suggest failable
String(bytes:encoding:)
initializer inoptional_data_string_conversion
rule as it accepts allSequence
types.
Jordan Rose
SimplyDanny
Support reading files to lint from Input File Lists provided
by Run Script Build Phases in Xcode using the command-line
argument
--use-script-input-file-lists
.BlueVirusX
Adds a
lenient
configuration file setting, equivalent to the--lenient
command line option.
Martin Redington
#5801
Support type casting on configuration option values defined by environment variables.
Without a cast, these values would always be treated as strings leading to a potentially
invalid configuration.
SimplyDanny
#5774
Add new option
max_number_of_single_line_parameters
that allows only the specified maximumnumber of parameters to be on one line when
allows_single_line = true
. If the limit isexceeded, the rule will still trigger. Confusing option combinations like
allows_single_line = false
together with
max_number_of_single_line_parameters > 1
will be reported.kimdv
SimplyDanny
#5781
The
redundant_type_annotation
rule gains a new option,ignore_properties
, that skips enforcement on members in atype declaration (like a
struct
). This helps the rule coexist withthe
explicit_type_interface
rule that requires such redundancy.jaredgrubb
#3750
Allow inherited isolation parameter to be first in function signatures
depending on the new option
ignore_first_isolation_inheritance_parameter
which is
true
by default.SimplyDanny
#5793
Bug Fixes
Run command plugin in whole package if no targets are defined in the
package manifest.
SimplyDanny
#5787
Silence
superfluous_else
rule onif
expressions with only a singleavailability condition.
SimplyDanny
#5833
Stop triggering the
control_statement
rule on closures being directlycalled as conditions.
SimplyDanny
#5846
Do not trigger
self_in_property_initialization
rule onself
inkey paths expressions.
SimplyDanny
#5835
Allow to specify transitive modules to be taken into account by
unused_import
rule. This avoids that required imports are removed.Paul Taykalo
SimplyDanny
#5167
Only pass cache path and directory paths to commands that accept these arguments
in the command plugin.
SimplyDanny
#5848
Do not throw deprecation warning if deprecated property is not
presented in configuration.
chipp
#5791
The
prefer_type_checking
rule will no longer trigger for non-optionaltype casting (
as
), or for comparisons to optional types.Martin Redington
#5802
Fixes an issue where the
superfluous_disable_command
rule could generatefalse positives for nested disable commands for custom rules.
Martin Redington
#5788
Fixes the
--only-rule
command line option, when a default.swiftlint.yml
is absent. Additionally rules specified with
--only-rule
on the commandline can now be disabled in a child configuration, to allow specific
directories to be excluded from the rule (or from being auto-corrected by
the rule), and
--only-rule
can now be specified multiple timesto run multiple rules.
Martin Redington
#5711
Fixes
file_name
rule to match fully-qualified names of nested types.Additionally adds a
require_fully_qualified_names
boolean option to enforcethat file names match nested types only using their fully-qualified name.
fraioli
#5840
Fixes an issue where the
vertical_whitespace_between_cases
rule does notrecognize
@unknown default
.Jared Grubb
#5788
v0.57.0
Compare Source
Breaking
The deprecated
anyobject_protocol
rule has now been removed.Martin Redington
#5769
Revert the part of the
non_optional_string_data_conversion
rule that enforces non-failable conversions of
Data
to UTF-8String
. This is due to the fact that the data to be convertedcan be arbitrary and especially doesn't need to represent a valid
UTF-8-encoded string.
Sam Rayner
#5263
Experimental
Enhancements
Add
ignore_multiline_type_headers
andignore_multiline_statement_conditions
options to
opening_brace
rule to allow opening braces to be on a new line aftermultiline type headers or statement conditions. Rename
allow_multiline_func
toignore_multiline_function_signatures
.leonardosrodrigues0
#3720
Add new
optional_data_string_conversion
rule to enforcefailable conversions of
Data
to UTF-8String
.Sam Rayner
#5263
The
no_magic_numbers
rule will now ignore violations inSwiftUI's
Preview
macro.Martin Redington
#5778
Bug Fixes
superfluous_disable_command
violations are now triggered forcustom rules.
Marcelo Fabri
Martin Redington
SimplyDanny
#4754
Trailing comments are now preserved by the
opening_brace
rule whenrewriting.
Martin Redington
#5751
v0.56.2
Compare Source
Breaking
Experimental
Enhancements
Bug Fixes
Ignore initializers with attributes in
unneeded_synthesized_initializer
rule.SimplyDanny
#5153
Silence
prefer_key_path
rule on macro expansion expressions.SimplyDanny
#5744
Check
if
expressions nested arbitrarily deep incontrasted_opening_brace
rule.SimplyDanny
#5752
Align left closure brace with associated parent function call in
contrasted_opening_brace
rule.SimplyDanny
#5752
Align left brace of additional trailing closures with right brace of previous trailing closure
in
contrasted_opening_brace
rule.SimplyDanny
#5752
Trigger on empty closure blocks in
no_empty_block
rule.SimplyDanny
#5762
Silence
unneeded_override
rule on methods and initializers with attributes.SimplyDanny
#5753
v0.56.1
Compare Source
Breaking
Experimental
Enhancements
Bug Fixes
contrasted_opening_brace
be an opt-in rule.SimplyDanny
v0.56.0
Compare Source
Breaking
The deprecated
--path
and--in-process-sourcekit
arguments have now beenremoved completely.
Martin Redington
SimplyDanny
#5614
When SwiftLint corrects violations automatically (
swiftlint lint --fix
)it doesn't report the exact location of the fix any longer. The new format
is
<file-path>: Correcting <rule-name>
without line and column numbers.Reason: Correction positions are likely just incorrect, especially when
multiple rules apply their rewrites. Fixing that is not trivial and likely
not worth the effort also considering that there haven't been any bug
reports about wrong correction positions so far.
SimplyDanny
Experimental
Enhancements
Add new
attribute_name_spacing
rule to enforce no trailing whitespace betweenattribute names and parentheses, ensuring compatibility with Swift 6, where this spacing
causes compilation errors.
aryamansharda
#5667
Linting got up to 30% faster due to the praiseworthy performance
improvements done in the SwiftSyntax
library.
Rewrite the following rules with SwiftSyntax:
missing_docs
woxtu
SimplyDanny
Add new
prefer_key_path
rule that triggers when a trailing closure on a standardfunction call is only hosting a (chained) member access expression since the closure
can be replaced with a key path argument. Likewise, it triggers on closure arguments.
SimplyDanny
Adds
baseline
andwrite_baseline
configuration file settings, equivalentto the
--baseline
and--write-baseline
command line options.Martin Redington
#5552
Add
no_empty_block
opt-in rule to validate that code blocks are not empty.They should at least contain a comment.
Ueeek
#5615
Add new
contrasted_opening_brace
rule that enforces openingbraces to be on a separate line after the preceding declaration.
SimplyDanny
Add new
unused_parameter
rule that triggers on function/initializer/subscriptparameters that are not used inside of the function/initializer/subscript.
SimplyDanny
#2120
Support
--target
paths being passed to command plugin by Xcode.SimplyDanny
#5603
Add modified configurations to examples in rule documentation.
SimplyDanny
Add new option
evaluate_effective_access_control_level
tomissing_docs
rule. Setting it to
true
stops the rule from triggering on declarationsinside of types with lower visibility. These declarations effectively
have at most the same access level.
SimplyDanny
Add new
--check-for-updates
command line option for thelint
,analyze
,and
version
subcommands to check for new versions of SwiftLint, and anequivalent
check_for_updates
configuration file setting.Martin Redington
SimplyDanny
Ian Leitch
#5613
Add new
--only-rule
command line option for thelint
andanalyze
,subcommands that overrides configuration file rule enablement and
disablement, in particular to facilitate running
--fix
for single ruleswithout having to temporarily edit the configuration file.
Martin Redington
#5666
Bug Fixes
Fix a few false positives and negatives by updating the parser to support
Swift 6 with all its new language constructs.
SimplyDanny
Stop triggering
mark
rule on "mark" comments in the middle of anothercomment.
SimplyDanny
#5592
Don't consider specialized imports with attributes as duplicates in
duplicate_imports
rule.SimplyDanny
#5716
Use correct types and relative paths in SARIF reporter output. Generally
avoid escaping slashes in JSON output as well.
SimplyDanny
#5598
#5599
Keep initializers with attributed parameters in
unneeded_synthesized_initializer
rule.SimplyDanny
#5153
Make
vertical_whitespace_between_cases
rule work forcases ending with a string literal.
ilendemli
#5612
Ignore access level modifiers restricted to value setting in
extension_access_modifier
rule.SimplyDanny
#5623
Fix
baseline compare
incorrectly reporting some violationsas new, and also now sorts the violations from
baseline compare
deterministically.
Martin Redington
#5606
Fix rewriting for
implicit_return
rule when violations arenested within each other.
Martin Redington
#5660
Fix
opening_brace
correction and make sure that disable commandsare taken into account before applying a fix.
swiftty
SimplyDanny
#5598
Violations of the
typesafe_array_init
rule will now be correctlyreported as such, instead of as violations of the
array_init
rule.
Martin Redington
#5709
v0.55.1
Compare Source
Breaking
Experimental
Enhancements
static_over_final_class
rule's violation message.SimplyDanny
#5570
Bug Fixes
Fix Bazel build when
bzlmod
is not in use by adding transitive dependenciesexplicitly.
SimplyDanny
#5568
Treat condionally activatable variable declarations and initializer as if
they were always active in
unneeded_synthesized_initializer
rule to avoidcompilation issues when unexpected items are there after all.
SimplyDanny
#5574
Silence
unused_enumerated
rule when$0
in a closure is explicitly unpacked.SimplyDanny
#5573
Remove redundant initializers in
unneeded_override
rule only when checkinginitializers is actually enabled in the configuration.
SimplyDanny
#5571
Respect comments before opening brace in
opening_brace
rule when there isone space before the brace after the comment. Everything else is still a
violation, yet the rewriter will not remove the comment anymore.
SimplyDanny
#5578
v0.55.0
Compare Source
Breaking
Rewrite
SwiftLintBuildToolPlugin
usingBUILD_WORKSPACE_DIRECTORY
without relyingon the
--config
option.Garric Nahapetian
Introduce SwiftLintCommandPlugin.
Rename SwiftLintBuildToolPlugin.
Add Swift Package Manager installation instructions.
garricn
Fix Code Climate reporter output by having lower case severity
values to comply with the Code Climate specification.
waitButY
The
superfluous_disable_command
rule will now be enabled for theanalyze
command, unless it has been disabled, and will warn about superfluous
disablement of analyzer rules.
Martin Redington
#4792
With the introduction of the
consider_default_literal_types_redundant
option to the
redundant_type_annotation
rule,Bool
literals will nolonger be considered redundant by default. Set this option to true to
preserve the previous behavior.
Garric Nahapetian
Experimental
lint
andanalyze
commands:--write-baseline
to save a baseline to disk, and
--baseline
to read a saved baseline anduse it to filter out detected pre-existing violations. A new
baseline
command uses the reporters to print the violations in a baseline.
Martin Redington
#5475
#3421
Enhancements
Add a reporter that outputs violations in the Static
Analysis Results Interchange Format (SARIF).
waitButY
Ignore absence of a non-initial local config instead of
falling back to default.
kohtenko
Add new option
ignore_typealiases_and_associatedtypes
tonesting
rule. It excludestypealias
andassociatedtype
declarations from the analysis.
marunomi
#3183
Prevent from compiling
SwiftLint
target when only usingSwiftLintPlugin
on macOS.Julien Baillon
#5372
Allow to set the severity of rules (if they have one) in the short form
rule_name: warning|error
provided that no other attributes need to beconfigured.
SimplyDanny
Add new
ignore_one_liners
option toswitch_case_alignment
rule to ignore switch statements written in a single line.
tonell-m
#5373
Add new
shorthand_argument
rule that triggers on shorthand argumentslike
$0
,$1
, etc. in closures if they are too far away from thebeginning of the closure. Options allow further cases to always trigger.
SimplyDanny
#70
Warn when
--fix
comes together with--strict
or--lenient
as only--fix
takes effect then.
SimplyDanny
#5387
Add new
one_declaration_per_file
rule that allows only asingle class/struct/enum/protocol declaration per file.
Extensions are an exception; more than one is allowed.
Muhammad Zeeshan
#2802
Add new
ignore_attributes
option toredundant_type_annotation
rulethat allows disabling the rule for properties that are marked with at least
one of the configured attributes.
tonell-m
#5366
Rewrite the following rules with SwiftSyntax:
explicit_acl
extension_access_modifier
identifier_name
let_var_whitespace
mark
multiline_literal_brackets
nesting
nimble_operator
opening_brace
orphaned_doc_comment
redundant_type_annotation
trailing_closure
void_return
SimplyDanny
kishikawakatsumi
Marcelo Fabri
swiftty
KS1019
tonell-m
Print invalid keys when configuration parsing fails.
SimplyDanny
#5347
Add new
final_test_case
rule that triggers on non-final test classes.SimplyDanny
Make
superfluous_else
rule auto-correctable.SimplyDanny
Support other scope-exiting statements
continue
,break
andthrow
insuperfluous_else
rule.SimplyDanny
Trigger on
-> ()
return signatures inreturn_value_from_void_function
rule. Moreover, support automatic fixes for obvious cases.
SimplyDanny
Refine violation position of
trailing_closure
rule.SimplyDanny
Trigger on the declaration keyword (i.e.
let
,var
,func
,subscript
)instead of the
static
orclass
keywords in theexplicit_acl
rule.SimplyDanny
Allow to configure more operators in
identifier_name
rule. The new optionis named
additional_operators
. Use it to add more operators to the listof default operators known to the rule.
SimplyDanny
#1762
Stop triggering
no_magic_numbers
rule on literals used in rangeexpressions assigned to variables.
SimplyDanny
#5430
Add
affect_initializers
option to allowunneeded_override
ruleto affect initializers.
leonardosrodrigues0
#5265
Respect scattered disable commands in auto-correction of
duplicate_imports
rule.
SimplyDanny
#5418
Add new
non_optional_string_data_conversion
rule to enforcenon-failable conversions of UTF-8
String
<->Data
.Ben P
#5263
Refine violation position of
superfluous_else
rule.SimplyDanny
Make
sorted_enum_cases
rule's comparison case-insensitive toavoid unexpected ordering.
Oleg Kokhtenko
Add `exc
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.