Update dependency realm/SwiftLint to v0.55.1 #29
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.52.4
->0.55.1
Release Notes
realm/SwiftLint (realm/SwiftLint)
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
excluded_lines_patterns
toline_length
to avoid linting linesthat contain one of the patterns.
kasrababaei
Make
empty_count
auto-correctable.KS1019
Make
private_swiftui_state
auto-correctable.mt00chikin
Make
trailing_closure
correctable.KS1019
Add new
static_over_final_class
rule to preferstatic
overfinal class
declaration.phlippieb
#5471
Extends
unused_enumerated
rule to cover closure parameters, todetect cases like
list.enumerated().map { idx, _ in idx }
andlist.enumerated().map { $1 }
.Martin Redington
#5470
Include
Double
,Int
andString
to the exiting redundant type validationcheck of
Bool
in theredundant_type_annotation
rule. Addconsider_default_literal_types_redundant
option supportingBool
,Double
,Int
andString
. Setting this option totrue
lets the ruleconsider said types in declarations like
let i: Int = 1
orlet s: String = ""
as redundant.Garric Nahapetian
Bug Fixes
Invalid keys in a configuration don't lead to the default configuration being
used anymore. The invalid key will just be reported but otherwise ignored.
SimplyDanny
#5565
Fix version comparison algorithm which caused some version-dependent rules to
misbehave with Swift 5.10.
chandlerwall
#5517
Silence
discarded_notification_center_observer
rule in closures. Furthermore,handle
get
andset
accessors correctly and consider implicit returns.SimplyDanny
#4801
Fix some false positives in
let_var_whitespace
rule that would happenwhen attributes attached to declarations were spread over multiple lines.
SimplyDanny
#4801
Support
private_over_fileprivate
rule for actors.SimplyDanny
#5489
Ensure that declarations referenced only as extended types do not count as
used by means of the
unused_declaration
rule.SimplyDanny
#5550
Fix some false positives in
multiline_literal_brackets
rule that wouldhappen when comments are present.
Marcelo Fabri
Fix some false positives in the
opening_brace
rule.kishikawakatsumi
SimplyDanny
#4610
#5114
#3470
#3574
#2632
#3476
#3756
#3690
Ignore overridden functions with default parameters in the
unneeded_override
rule as they might change behavior.
SimplyDanny
#5355
Trigger
nsobject_prefer_isequal
andredundant_self_in_closure
even in casethe surrounding declaration is nested in an extension.
SimplyDanny
Fixed false positives for the
no_magic_numbers
rule, when theyare defined in a tuple like
let (a, b) = (5, 10)
orlet a = (2, 3)
.Martin Redington
#5305
Take array and nested types into account in
redundant_type_annotation
rule.SimplyDanny
#3141
#3146
Silence
pattern_matching_keywords
rule when an identifier is referencedin the argument list of a matching enum case.
SimplyDanny
#3852
Don't trigger the
return_value_from_void_function
warning from initializers.mrbkap
Fixes superfluous warnings about configurations for rules that were not
enabled, when the rules were enabled in a parent configuration.
Martin Redington
#4858
Add
all
pseudo-rule foranalyzer_rules
- enables all analyzer rulesthat are not listed in
disabled_rules
.woxtu
Martin Redington
#4999
Updates the reasons provided by violations of the
blanket_disable_command
to omit language about the end of the file, and to direct users to
re-enable the rule as soon as possible.
Martin Redington
#5450
v0.54.0
Compare Source
Breaking
SimplyDanny
JP Simard
Experimental
Enhancements
Add
only
configuration option totodo
rule which allows to specifywhether the rule shall trigger on
TODO
s,FIXME
s or both.gibachan
#5233
Make
unneeded_break_in_switch
auto correctable.KS1019
Speed up
closure_parameter_position
rule when there are no violations.Marcelo Fabri
Rewrite
cyclomatic_complexity
rule using SwiftSyntax.Marcelo Fabri
Rewrite
redundant_void_return
rule using SwiftSyntax.Also include redundant void return clauses for closures in addition to
functions. This can be disabled by configuring the rule with
include_closures: false
.Marcelo Fabri
JP Simard
Rewrite
discouraged_optional_collection
rule using SwiftSyntax, catchingmore violations.
JP Simard
Rewrite
duplicate_imports
rule using SwiftSyntax.JP Simard
Handle
viewIsAppearing
in thetype_contents_order
rule.u-abyss
#5259
Rewrite
vertical_parameter_alignment_on_call
rule using SwiftSyntax, fixingsome false positives.
Marcelo Fabri
#3581
Rewrite
no_grouping_extension
rule using SwiftSyntax.Marcelo Fabri
Bug Fixes
Fix false positive in
implicit_getter
rule when using unknown accessors.kabiroberai
#5300
Fix correction of
explicit_init
rule by keeping significant trivia.BB9z
#5289
Fix invalid corrections for opaque and existential optionals in
syntactic_sugar
rule.SimplyDanny
#5277
Fix false positive in
unused_import
rule that triggered on@_exported
imports which could break downstream modules if removed.jszumski
#5242
Fix false positive in
unused_import
rule when using a constructordefined in a transitive module.
jszumski
#5246
v0.53.0
Compare Source
Breaking
Hide all
Reporter
s from SwiftLint's' public interface.SimplyDanny
The options
inlcuded
,name
andmessage
are from now on ignored in theconfiguration for the
private_unit_test
rule. The optionregex
is stillsupported but is deprecated. It's recommended to use the list
test_parent_classes
instead which accepts names of parent test classes.SimplyDanny
Remove support for disable and enable commands in multiline comments.
Martin Redington
#4798
Experimental
Enhancements
Show specific violation message for the
attributes
rule when the optionalways_on_line_above
orattributes_with_arguments_always_on_line_above
is involved.
chrisngabp
5103
Rewrite
control_statement
rule using SwiftSyntax.SimplyDanny
Add new
non_overridable_class_declaration
rule that triggers onclass
function and variable declarations in final classes that are not final
themselves or private.
SimplyDanny
The Homebrew formula for SwiftLint now also installs completion scripts for
Bash, Zsh and fish.
SimplyDanny
Add new
private_swiftui_state
opt-in rule to encourage settingSwiftUI
@State
and@StateObject
properties to private.mt00chikin
#3173
The
implicit_return
rule now supports the kindssubscript
andinitializer
in theincluded
configuration list.SimplyDanny
Add
unneeded_override
rule to remove function overrides that onlycall super.
keith
5139
Show a rule's active YAML configuration in output of
swiftlint rules <rule>
.SimplyDanny
Add
invokeTest()
tooverridden_super_call
defaults.DylanBettermannDD
Add
--config-only
option torules
command allowing to print only the YAMLconfiguration of a single or all rules.
SimplyDanny
Add
--default-config
option torules
command allowing to use defaultvalues for configurations being printed for a single rule or all rules.
SimplyDanny
Add
include_bare_init
option to theexplicit_init
rule.include_bare_init
encourages using named constructors over
.init()
and type inference.Martin Redington
#5203
Improved the reported location and reasons provided for issues
detected by the
invalid_swiftlint_command
rule.Martin Redington
#5204
100 is no longer considered to be a magic number by the
no_magic_numbers
rule.
Martin Redington
#5215
Adds a
strict
configuration file setting, equivalent to the--strict
command line option.
Martin Redington
#5226
Extend
implicitly_unwrapped_optional
rule with the new modeweak_except_iboutlets
that only checksweak
variables.Ricky Tan
Bug Fixes
Respect grapheme clusters in counting the number of characters in the
collection_alignment
rule.kishikawakatsumi
#4837
Fix false positive in
control_statement
rule that triggered on conditionswith trailing closures where parentheses are recommended by the compiler.
SimplyDanny
#5135
Fix runtime error when an excluded directory does not exist.
SimplyDanny
#5078
Support
switch
expressions used in expression contexts inswitch_case_alignment
rule.SimplyDanny
#5191
#5227
#5080
Fix bug in
prefer_self_in_static_references
rule that triggered oninitializers of computed properties in classes when the property had an
accessor block.
SimplyDanny
#5118
Document
exclude_ranges
option fornumber_separator
rule.SimplyDanny
Rewrite
implicit_return
rule with SwiftSyntax fixing a few false positivesand false negatives in the process.
SimplyDanny
#5161
Make sure
severity
is configurable fortype_contents_order
rule.SimplyDanny
Bazel: Mark
rules_xcodeproj
as a development dependency.Thi Doãn
JP Simard
#4737
Fix false negatives for the
unneeded_synthesized_initializer
rulefor nested structs in classes.
Martin Redington
#5120
Fix some unexpected rule enablement interactions between parent and
child configurations.
Martin Redington
#4876
The
no_magic_numbers
rule will not trigger for violations in anextension, if the extended class inherits from one of the specified
test_parent_classes
, as long as the class declaration and theextension are in the same source file.
Martin Redington
#5137
Fix false positive in the
ns_number_init_as_function_reference
rulewhen calling
NSNumber.init(value:)
directly.Marcelo Fabri
#5172
The
no_magic_numbers
rule will not trigger for bitwise shiftoperations.
Martin Redington
#5171
The
accessibility_label_for_image
rule will no longer ignore theImage(systemName:)
constructor, as many system images do nothave good accessibility labels.
Martin Redington
#5165
Fix false positives for
superfluous_disable_command
rule.Martin Redington
#4798
Fix false positive in the
test_case_accessibility
rule.gibachan
#5211
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 becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.