[deps]: Update mint minor
This PR contains the following updates:
| Package | Update | Change |
|---|---|---|
| nicklockwood/SwiftFormat | minor | 0.53.8 -> 0.54.3 |
| realm/SwiftLint | minor | 0.54.0 -> 0.56.2 |
| yonaskolb/xcodegen | minor | 2.40.1 -> 2.42.0 |
Release Notes
nicklockwood/SwiftFormat (nicklockwood/SwiftFormat)
v0.54.3
- Fixed issue where
--wrapeffects nevercould unexpectedly remove unrelated code - Fixed
--condassignmentoption (setting this previously had no effect) - The
redundantReturnrule no longer removes conditionalreturns ifconditionalAssignmentis disabled - The
redundantObjcrule now strips implicit@objcattribute for@IBSegueActionfunctions - Fixed bug where violations for rules that insert new lines were sometimes ignored in lint output
v0.54.2
- Fixed broken formatter cache, which caused a significant performance regression since 0.54.0
- The
blankLinesBetweenChainedFunctionsrule now removes blank line after comments in the chain - The
blankLinesBetweenChainedFunctionsrule no longer conflicts withblankLinesAroundMark - Fixed
redundantInternalremoving requiredinternalkeyword in extensions withwhereclause - Fixed another case of spurious
returnremoval in conditional blocks - Fixed
redundantNilInitrule insertingnilafteraskeyword
v0.54.1
- The
--nilInit insertoption is no longer applied to lazy or attributed properties - The
blankLinesBetweenChainedFunctionsrule now correctly handles comments in the chain - Fixed indenting of wrapped arguments in
--fragmentmode - Fixed bug where attributes were mistaken for an accessor in a computer property
- Fixed indenting of commented code after an opening bracket
- Fixed spurious removal of
returnin conditional blocks - Fixed
--lintmode reporter output when usingstdin
v0.54.0
- Added
blankLineAfterSwitchCaserule for inserting blank lines after switch cases - Added
consistentSwitchCaseSpacingrule for ensuring consistent spacing between switch cases - Added
redundantPropertyrule for removing variable assignments where value is immediately returned - Added
redundantTypedThrowsrule for stripping redundantNeverorany Errorthrowstypes - Setting
--reportwithout--reportertype now raises an error if type can't be inferred - Added XML reporter for Checkstyle-compatible lint reporting (use the
--reporter xmloption) - Added
--typedelimiteroption for controlling spacing around the colon in type definitions - Added
--initcoderniloption for returningnilinstead of asserting in unavailableinit?(coder:) - The
fileHeaderrule now uses git info forcreateddate (if available) instead of file system - Added git
author,author.nameandauthor.emailtokens for file header templates - Added
--callsiteparenoption for controlling closing paren placement at function call sites - The
wrapAttributesrule can now be applied differently to computed properties vs stored properties - The
wrapAttributesrule can now be applied differently to complex (parameterized) vs simple attributes - Replaced
--varattributeswith--storedvarattrs,--computedvarattrsand--complexattrsoptions - Added
—-nilinitoption for controlling whetherredundantNilInitadds or removes explicitnil - Added ability to organize declarations by type over visibility (use
--organizationmode type) - Fixed bug where enabling
organizeDeclarationsfor structs causedsortDeclarationsto have no effect - Fixed bug where if statement body could be incorrectly parsed as a trailing closure
- Improved attribute handling in
opaqueGenericParameters rule - SwiftFormat now recognizes
initand_modifyproperty accessors - Fixed bug with
preferForLooprule and tuple argument matching - Extended
conditionalAssignmentrule to handle more cases - Added
--condassignment after-propertyoption - Fixed await being hoisted outside of macro arguments
- Fixed unsafe adding/removal of
selfwithin macros - Added
os_logto--selfrequireddefaults
v0.53.10
- Fixed creation of spurious
stdoutdirectory when using--output stdout - Fixed
unusedArgumentsfalse positive for multiline function call arguments - Fixed parsing of generic arguments containing attributes or
~operator - Fixed spurious errors about missing
--reportor--reporterarguments - Fixed
strongifiedSelfremoving required backticks around nonisolatedself - Deprecated explicit
defaultvalue for--reporter(introduced in 0.53.9) - Added support for
sendingkeyword
v0.53.9
- Fixed bug in
unusedArgumentswhen shadowing function argument with conditional assignment declaration - Individual
--linterrors are no longer shown in--quietmode (restores pre-0.53.8 behavior)
realm/SwiftLint (realm/SwiftLint)
v0.56.2
Breaking
- None.
Experimental
- None.
Enhancements
- None.
Bug Fixes
-
Ignore initializers with attributes in
unneeded_synthesized_initializerrule.
SimplyDanny #5153 -
Silence
prefer_key_pathrule on macro expansion expressions.
SimplyDanny #5744 -
Check
ifexpressions nested arbitrarily deep incontrasted_opening_bracerule.
SimplyDanny #5752 -
Align left closure brace with associated parent function call in
contrasted_opening_bracerule.
SimplyDanny #5752 -
Align left brace of additional trailing closures with right brace of previous trailing closure in
contrasted_opening_bracerule.
SimplyDanny #5752 -
Trigger on empty closure blocks in
no_empty_blockrule.
SimplyDanny #5762 -
Silence
unneeded_overriderule on methods and initializers with attributes.
SimplyDanny #5753
v0.56.1
Breaking
- None.
Experimental
- None.
Enhancements
- None.
Bug Fixes
- Let
contrasted_opening_bracebe an opt-in rule.
SimplyDanny
v0.56.0
Breaking
-
The deprecated
--pathand--in-process-sourcekitarguments have now been removed 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
- None.
Enhancements
-
Linting got up to 30% faster due to the praisworthy performance improvements done in the SwiftSyntax library.
-
Rewrite the following rules with SwiftSyntax:
missing_docs
-
Add new
prefer_key_pathrule that triggers when a trailing closure on a standard function 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
baselineandwrite_baselineconfiguration file settings, equivalent to the--baselineand--write-baselinecommand line options.
Martin Redington #5552 -
Add
no_empty_blockopt-in rule to validate that code blocks are not empty. They should at least contain a comment.
Ueeek #5615 -
Add new
contrasted_opening_bracerule that enforces opening braces to be on a separate line after the preceding declaration.
SimplyDanny -
Add new
unused_parameterrule that triggers on function/initializer/subscript parameters that are not used inside of the function/initializer/subscript.
SimplyDanny #2120 -
Support
--targetpaths 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_leveltomissing_docsrule. Setting it totruestops the rule from triggering on declarations inside of types with lower visibility. These declarations effectively have at most the same access level.
SimplyDanny -
Add new
--check-for-updatescommand line option for thelint,analyze, andversionsubcommands to check for new versions of SwiftLint, and an equivalentcheck_for_updatesconfiguration file setting.
Martin Redington SimplyDanny Ian Leitch #5613 -
Add new
--only-rulecommand line option for thelintandanalyze, subcommands that overrides configuration file rule enablement and disablement, in particular to facilitate running--fixfor single rules without 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
markrule on "mark" comments in the middle of another comment.
SimplyDanny #5592 -
Don't consider specialized imports with attributes as duplicates in
duplicate_importsrule.
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_initializerrule.
SimplyDanny #5153 -
Make
vertical_whitespace_between_casesrule work for cases ending with a string literal.
ilendemli #5612 -
Ignore access level modifiers restricted to value setting in
extension_access_modifierrule.
SimplyDanny #5623 -
Fix
baseline compareincorrectly reporting some violations as new, and also now sorts the violations frombaseline comparedeterministically.
Martin Redington #5606 -
Fix rewriting for
implicit_returnrule when violations are nested within each other.
Martin Redington #5660 -
Fix
opening_bracecorrection and make sure that disable commands are taken into account before applying a fix.
swiftty SimplyDanny #5598 -
Violations of the
typesafe_array_initrule will now be correctly reported as such, instead of as violations of thearray_initrule.
Martin Redington #5709
v0.55.1
Breaking
- None.
Experimental
- None.
Enhancements
- Clarify wording of
static_over_final_classrule's violation message.
SimplyDanny #5570
Bug Fixes
-
Fix Bazel build when
bzlmodis not in use by adding transitive dependencies explicitly.
SimplyDanny #5568 -
Treat condionally activatable variable declarations and initializer as if they were always active in
unneeded_synthesized_initializerrule to avoid compilation issues when unexpected items are there after all.
SimplyDanny #5574 -
Silence
unused_enumeratedrule when$0in a closure is explicitly unpacked.
SimplyDanny #5573 -
Remove redundant initializers in
unneeded_overriderule only when checking initializers is actually enabled in the configuration.
SimplyDanny #5571 -
Respect comments before opening brace in
opening_bracerule when there is one 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
Breaking
-
Rewrite
SwiftLintBuildToolPluginusingBUILD_WORKSPACE_DIRECTORYwithout relying on the--configoption.
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_commandrule will now be enabled for theanalyzecommand, 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_redundantoption to theredundant_type_annotationrule,Boolliterals will no longer be considered redundant by default. Set this option to true to preserve the previous behavior.
Garric Nahapetian
Experimental
- Add two new options to the
lintandanalyzecommands:--write-baselineto save a baseline to disk, and--baselineto read a saved baseline and use it to filter out detected pre-existing violations. A newbaselinecommand 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_associatedtypestonestingrule. It excludestypealiasandassociatedtypedeclarations from the analysis. marunomi #3183 -
Prevent from compiling
SwiftLinttarget when only usingSwiftLintPluginon macOS.
Julien Baillon #5372 -
Allow to set the severity of rules (if they have one) in the short form
rule_name: warning|errorprovided that no other attributes need to be configured.
SimplyDanny -
Add new
ignore_one_linersoption toswitch_case_alignmentrule to ignore switch statements written in a single line.
tonell-m #5373 -
Add new
shorthand_argumentrule that triggers on shorthand arguments like$0,$1, etc. in closures if they are too far away from the beginning of the closure. Options allow further cases to always trigger.
SimplyDanny #70 -
Warn when
--fixcomes together with--strictor--lenientas only--fixtakes effect then.
SimplyDanny #5387 -
Add new
one_declaration_per_filerule that allows only a single class/struct/enum/protocol declaration per file. Extensions are an exception; more than one is allowed.
Muhammad Zeeshan #2802 -
Add new
ignore_attributesoption toredundant_type_annotationrule that 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_aclextension_access_modifieridentifier_namelet_var_whitespacemarkmultiline_literal_bracketsnestingnimble_operatoropening_braceorphaned_doc_commentredundant_type_annotationtrailing_closurevoid_return
SimplyDanny
kishikawakatsumi
Marcelo Fabri
swiftty
KS1019
tonell-m -
Print invalid keys when configuration parsing fails.
SimplyDanny #5347 -
Add new
final_test_caserule that triggers on non-final test classes.
SimplyDanny -
Make
superfluous_elserule auto-correctable.
SimplyDanny -
Support other scope-exiting statements
continue,breakandthrowinsuperfluous_elserule.
SimplyDanny -
Trigger on
-> ()return signatures inreturn_value_from_void_functionrule. Moreover, support automatic fixes for obvious cases.
SimplyDanny -
Refine violation position of
trailing_closurerule.
SimplyDanny -
Trigger on the declaration keyword (i.e.
let,var,func,subscript) instead of thestaticorclasskeywords in theexplicit_aclrule.
SimplyDanny -
Allow to configure more operators in
identifier_namerule. The new option is namedadditional_operators. Use it to add more operators to the list of default operators known to the rule.
SimplyDanny #1762 -
Stop triggering
no_magic_numbersrule on literals used in range expressions assigned to variables.
SimplyDanny #5430 -
Add
affect_initializersoption to allowunneeded_overriderule to affect initializers.
leonardosrodrigues0 #5265 -
Respect scattered disable commands in auto-correction of
duplicate_importsrule.
SimplyDanny #5418 -
Add new
non_optional_string_data_conversionrule to enforce non-failable conversions of UTF-8String<->Data.
Ben P #5263 -
Refine violation position of
superfluous_elserule.
SimplyDanny -
Make
sorted_enum_casesrule's comparison case-insensitive to avoid unexpected ordering.
Oleg Kokhtenko -
Add
excluded_lines_patternstoline_lengthto avoid linting lines that contain one of the patterns.
kasrababaei -
Make
empty_countauto-correctable.
KS1019 -
Make
private_swiftui_stateauto-correctable.
mt00chikin -
Make
trailing_closurecorrectable.
KS1019 -
Add new
static_over_final_classrule to preferstaticoverfinal classdeclaration.
phlippieb #5471 -
Extends
unused_enumeratedrule to cover closure parameters, to detect cases likelist.enumerated().map { idx, _ in idx }andlist.enumerated().map { $1 }.
Martin Redington #5470 -
Include
Double,IntandStringto the exiting redundant type validation check ofBoolin theredundant_type_annotationrule. Addconsider_default_literal_types_redundantoption supportingBool,Double,IntandString. Setting this option totruelets the rule consider said types in declarations likelet i: Int = 1orlet 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_observerrule in closures. Furthermore, handlegetandsetaccessors correctly and consider implicit returns.
SimplyDanny #4801 -
Fix some false positives in
let_var_whitespacerule that would happen when attributes attached to declarations were spread over multiple lines.
SimplyDanny #4801 -
Support
private_over_fileprivaterule for actors.
SimplyDanny #5489 -
Ensure that declarations referenced only as extended types do not count as used by means of the
unused_declarationrule.
SimplyDanny #5550 -
Fix some false positives in
multiline_literal_bracketsrule that would happen when comments are present.
Marcelo Fabri -
Fix some false positives in the
opening_bracerule.
kishikawakatsumi SimplyDanny
#4610 #5114 #3470 #3574 #2632 #3476 #3756 #3690 -
Ignore overridden functions with default parameters in the
unneeded_overriderule as they might change behavior.
SimplyDanny #5355 -
Trigger
nsobject_prefer_isequalandredundant_self_in_closureeven in case the surrounding declaration is nested in an extension.
SimplyDanny -
Fixed false positives for the
no_magic_numbersrule, when they are defined in a tuple likelet (a, b) = (5, 10)orlet a = (2, 3).
Martin Redington #5305 -
Take array and nested types into account in
redundant_type_annotationrule.
SimplyDanny #3141 #3146 -
Silence
pattern_matching_keywordsrule when an identifier is referenced in the argument list of a matching enum case.
SimplyDanny #3852 -
Don't trigger the
return_value_from_void_functionwarning 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
allpseudo-rule foranalyzer_rules- enables all analyzer rules that are not listed indisabled_rules.
woxtu Martin Redington #4999 -
Updates the reasons provided by violations of the
blanket_disable_commandto omit language about the end of the file, and to direct users to re-enable the rule as soon as possible.
Martin Redington #5450 -
Add a
--working-directorycommand line option, for users who cannot otherwise control which directory SwiftLint is run from.
Martin Redington #5424
yonaskolb/xcodegen (yonaskolb/xcodegen)
v2.42.0
Added
- Better support for local Swift packages in Xcode 15 #1465 @kinnarr
- Added
macroExpansionto test actions in schemes #1468 @erneestoc
Changed
- Better default macroExpansion target in schemes #1471 @erneestoc
Removed
- Removed
xcodegen dump --type graphvizas graphviz no longer builds in Swift 6 and is no longer maintained. If anyone uses this feature and wishes to keep it, please submit a PR providing a suitable alternative. #1485 @giginet
v2.41.0
Added
- Added
xcodegen cachecommand that writes the cache. Useful forpost-commitgit hook integration #1476 @yonaskolb
Changed
- Include folders in file sorting #1466 @jflan-dd
Fixed
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.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.
Checkmarx One – Scan Summary & Details – deb345a9-0816-4415-8fe6-517d006432c3
No New Or Fixed Issues Found
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 61.69%. Comparing base (
e6b61ad) to head (115fab0). Report is 3 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #93 +/- ##
==========================================
- Coverage 61.73% 61.69% -0.05%
==========================================
Files 199 199
Lines 6766 6766
==========================================
- Hits 4177 4174 -3
- Misses 2589 2592 +3
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.