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.54.6
->0.55.4
0.57.0
->0.57.1
Release Notes
nicklockwood/SwiftFormat (nicklockwood/SwiftFormat)
v0.55.4
Compare Source
where
clause forswitch ... case
statementsunusedArguments
could remove required arguments in some casessortTypealiases
rule now correctly handlesany
keywordv0.55.3
Compare Source
sortTypealiases
rule could mangle generic types, or ones using theany
keywordpreferKeyPaths
rule now only uses\\.self
for Swift 6 and later (fix din't land yet in 5.10)artifactbundle
not working onubuntu-latest
v0.55.2
Compare Source
unusedArguments
failed to remove arguments that matched switch variable bindingsunusedArguments
failed to remove arguments that matched nested function call labelsblankLinesAtStartOfScope
when usingorganizeDeclarations
rulewrap
rule lint errorspreferKeyPaths
rule now handles the\\.self
case for Swift 5.10 and later\.?
v0.55.1
Compare Source
docCommentsBeforeModifiers
got confused byenum
cases that match modifier nameswrapEnumCases
would mangle nested or successiveenum
declarationsv0.55.0
Compare Source
docCommentsBeforeModifiers
rule to hoist doc comments above declaration modifiersunusedPrivateDeclarations
rule to remove unusedprivate
orfileprivate
declarationspropertyTypes
rule to control the use of inferred or explicit types for properties--redundanttype
option to--propertytypes
as it's shared by both rules--ranges preserve
and--operatorfunc preserve
options--languagemode
option to specify if you are using Swift 5 or 6 language modeorganizeDeclarations
rule can now sort declarations by name/type/visibility/etcorganizeDeclarations
bug where--beforemarks
unexpectedly matched keywords in function bodiesorganizeDeclarations
rulemarkTypes
rule for chained protocol extension names--onelineforeach
option to--inlinedforeach
--outputtokens
option to print output as tokens in JSON formatrealm/SwiftLint (realm/SwiftLint)
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
Configuration
📅 Schedule: Branch creation - "every 2nd week starting on the 2 week of the year before 4am on Monday" (UTC), 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.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.