Skip to content
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

Update dependency realm/SwiftLint to v0.57.0 #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 10, 2023

This PR contains the following updates:

Package Update Change
realm/SwiftLint minor 0.51.0 -> 0.57.0

Release Notes

realm/SwiftLint (realm/SwiftLint)

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-8
    String. This is due to the fact that the data to be converted
    can be arbitrary and especially doesn't need to represent a valid
    UTF-8-encoded string.
    Sam Rayner
    #​5263

Experimental
  • None.
Enhancements
  • Add ignore_multiline_type_headers and ignore_multiline_statement_conditions
    options to opening_brace rule to allow opening braces to be on a new line after
    multiline type headers or statement conditions. Rename allow_multiline_func to
    ignore_multiline_function_signatures.
    leonardosrodrigues0
    #​3720

  • Add new optional_data_string_conversion rule to enforce
    failable conversions of Data to UTF-8 String.
    Sam Rayner
    #​5263

  • The no_magic_numbers rule will now ignore violations in
    SwiftUI's Preview macro.
    Martin Redington
    #​5778

Bug Fixes

v0.56.2

Compare Source

Breaking
  • None.
Experimental
  • None.
Enhancements
  • None.
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 in contrasted_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
  • None.
Experimental
  • None.
Enhancements
  • None.
Bug Fixes
  • Let 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 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
  • Add new attribute_name_spacing rule to enforce no trailing whitespace between
    attribute 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 praisworthy 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 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 baseline and write_baseline configuration file settings, equivalent
    to 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 opening
    braces to be on a separate line after the preceding declaration.
    SimplyDanny

  • Add new unused_parameter rule that triggers on function/initializer/subscript
    parameters 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 to missing_docs
    rule. Setting it to true stops 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-updates command line option for the lint, analyze,
    and version subcommands to check for new versions of SwiftLint, and an
    equivalent check_for_updates configuration file setting.
    Martin Redington
    SimplyDanny
    Ian Leitch
    #​5613

  • Add new --only-rule command line option for the lint and analyze,
    subcommands that overrides configuration file rule enablement and
    disablement, in particular to facilitate running --fix for 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 mark rule on "mark" comments in the middle of another
    comment.
    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 for
    cases 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 violations
    as new, and also now sorts the violations from baseline compare
    deterministically.
    Martin Redington
    #​5606

  • Fix rewriting for implicit_return rule when violations are
    nested within each other.
    Martin Redington
    #​5660

  • Fix opening_brace correction and make sure that disable commands
    are taken into account before applying a fix.
    swiftty
    SimplyDanny
    #​5598

  • Violations of the typesafe_array_init rule will now be correctly
    reported as such, instead of as violations of the array_init
    rule.
    Martin Redington
    #​5709

v0.55.1

Compare Source

Breaking
  • None.
Experimental
  • None.
Enhancements
Bug Fixes
  • Fix Bazel build when bzlmod is 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_initializer rule to avoid
    compilation 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 checking
    initializers is actually enabled in the configuration.
    SimplyDanny
    #​5571

  • Respect comments before opening brace in opening_brace rule 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

Compare Source

Breaking
  • Rewrite SwiftLintBuildToolPlugin using BUILD_WORKSPACE_DIRECTORY without relying
    on 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 the analyze
    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 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 lint and analyze commands: --write-baseline
    to save a baseline to disk, and --baseline to read a saved baseline and
    use 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 to
    nesting rule. It excludes typealias and associatedtype
    declarations from the analysis.
    marunomi
    #​3183

  • Prevent from compiling SwiftLint target when only using SwiftLintPlugin 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 be
    configured.
    SimplyDanny

  • Add new ignore_one_liners option to switch_case_alignment
    rule to ignore switch statements written in a single line.
    tonell-m
    #​5373

  • Add new shorthand_argument rule 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 --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 a
    single class/struct/enum/protocol declaration per file.
    Extensions are an exception; more than one is allowed.
    Muhammad Zeeshan
    #​2802

  • Add new ignore_attributes option to redundant_type_annotation rule
    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_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 and throw in
    superfluous_else rule.
    SimplyDanny

  • Trigger on -> () return signatures in return_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 or class keywords in the explicit_acl rule.
    SimplyDanny

  • Allow to configure more operators in identifier_name rule. The new option
    is named additional_operators. Use it to add more operators to the list
    of default operators known to the rule.
    SimplyDanny
    #​1762

  • Stop triggering no_magic_numbers rule on literals used in range
    expressions assigned to variables.
    SimplyDanny
    #​5430

  • Add affect_initializers option to allow unneeded_override rule
    to 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 enforce
    non-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 to
    avoid unexpected ordering.
    Oleg Kokhtenko

  • Add excluded_lines_patterns to line_length to avoid linting lines
    that 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 prefer static over
    final class declaration.
    phlippieb
    #​5471

  • Extends unused_enumerated rule to cover closure parameters, to
    detect cases like list.enumerated().map { idx, _ in idx } and
    list.enumerated().map { $1 }.
    Martin Redington
    #​5470

  • Include Double, Int and String to the exiting redundant type validation
    check of Bool in the redundant_type_annotation rule. Add
    consider_default_literal_types_redundant option supporting Bool,
    Double, Int and String. Setting this option to true lets the rule
    consider said types in declarations like let i: Int = 1 or
    let s: String = "" as redundant.
    Garric Nahapetian

  • Add new prefer_type_checking rule to prefer a is X over a as? X != nil.
    ikelax
    mildm8nnered
    #​5295

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 and set accessors correctly and consider implicit returns.
    SimplyDanny
    #​4801

  • Fix some false positives in let_var_whitespace rule that would happen
    when 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 would
    happen 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 and redundant_self_in_closure even in case
    the surrounding declaration is nested in an extension.
    SimplyDanny

  • Fixed false positives for the no_magic_numbers rule, when they
    are defined in a tuple like let (a, b) = (5, 10) or let 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 referenced
    in 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 for analyzer_rules - enables all analyzer rules
    that 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

  • Add a --working-directory command line option, for users who cannot
    otherwise control which directory SwiftLint is run from.
    Martin Redington
    #​5424

v0.54.0

Compare Source

Breaking
Experimental
  • None.
Enhancements
  • Add only configuration option to todo rule which allows to specify
    whether the rule shall trigger on TODOs, FIXMEs 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, catching
    more violations.
    JP Simard

  • Rewrite duplicate_imports rule using SwiftSyntax.
    JP Simard

  • Handle viewIsAppearing in the type_contents_order rule.
    u-abyss
    #​5259

  • Rewrite vertical_parameter_alignment_on_call rule using SwiftSyntax, fixing
    some 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 constructor
    defined in a transitive module.
    jszumski
    #​5246

v0.53.0

Compare Source

Breaking
  • Hide all Reporters from SwiftLint's' public interface.
    SimplyDanny

  • The options inlcuded, name and message are from now on ignored in the
    configuration for the private_unit_test rule. The option regex is still
    supported 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
  • None.
Enhancements
  • Show specific violation message for the attributes rule when the option
    always_on_line_above or attributes_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 on class
    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 setting
    SwiftUI @State and @StateObject properties to private.
    mt00chikin
    #​3173

  • The implicit_return rule now supports the kinds subscript and
    initializer in the included configuration list.
    SimplyDanny

  • Add unneeded_override rule to remove function overrides that only
    call super.
    keith
    5139

  • Show a rule's active YAML configuration in output of
    swiftlint rules <rule>.
    SimplyDanny

  • Add invokeTest() to overridden_super_call defaults.
    DylanBettermannDD

  • Add --config-only option to rules command allowing to print only the YAML
    configuration of a single or all rules.
    SimplyDanny

  • Add --default-config option to rules command allowing to use default
    values for configurations being printed for a single rule or all rules.
    SimplyDanny

  • Add include_bare_init option to the explicit_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 mode
    weak_except_iboutlets that only checks weak 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 conditions
    with 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 in
    switch_case_alignment rule.
    SimplyDanny
    #​5191
    #​5227
    #​5080

  • Fix bug in prefer_self_in_static_references rule that triggered on
    initializers of computed properties in classes when the property had an
    accessor block.
    SimplyDanny
    #​5118

  • Document exclude_ranges option for number_separator rule.
    SimplyDanny

  • Rewrite implicit_return rule with SwiftSyntax fixing a few false positives
    and false negatives in the process.
    SimplyDanny
    #​5161

  • Make sure severity is configurable for type_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 rule
    for 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 an
    extension, if the extended class inherits from one of the specified
    test_parent_classes, as long as the class declaration and the
    extension are in the same source file.
    Martin Redington
    #​5137

  • Fix false positive in the ns_number_init_as_function_reference rule
    when calling NSNumber.init(value:) directly.
    Marcelo Fabri
    #​5172

  • The no_magic_numbers rule will not trigger for bitwise shift
    operations.
    Martin Redington
    #​5171

  • The accessibility_label_for_image rule will no longer ignore the
    Image(systemName:) constructor, as many system images do not
    have 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

v0.52.4

Compare Source

Breaking
  • None.
Experimental
  • None.
Enhancements
  • Handle static spec methods in quick_discouraged_call rule. The method
    type changed from an instance method to a class method in Quick 7.
    SimplyDanny
    #​5072

  • Prettify the rule configuration presentation on the command line as well as
    on the website.
    SimplyDanny

Bug Fixes
  • Fix false positives for the unneeded_synthesized_initializer rule, when
    no argument initializers had side-effects.
    Martin Redington
    #​5075

  • Ignore switch expressions assigned to variables in switch_case_alignment
    rule.
    SimplyDanny
    #​5080

  • Fix auto-correction for the direct_return rule, when statements have
    trailing comments.
    Martin Redington
    #​5081

  • Fix false positives for the private_subject rule when creating subjects
    inside initializers.
    kasrababaei

  • Fix false positive for prefer_self_in_static_references when a class
    inherits from another class with generic types.
    kasrababaei

v0.52.3

Compare Source

Breaking
  • None.
Experimental
  • None.
Enhancements
  • Make severity for unallowed symbols configurable. The option name is
    unallowed_symbols_severity. It accepts the two values warning and error
    (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 to Equatable.
    SimplyDanny
    #​4990

  • Add grouping option to the sorted_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 idenfier x in
    scope shadows the field accessed by self.x to avoid semantical changes.
    SimplyDanny
    #​5010

  • Rewrite todo rule with SwiftSyntax.
    woxtu

  • Adds an unneeded_synthesized_initializer rule, based on
    swift-format's UseSynthesizedInitializer 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
    to off.
    SimplyDanny
    #​5036

  • Do not trigger prefer_self_in_static_references rule on typealias
    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 in legacy_cggeometry_functions
    rule.
    Haoocen
    #​5023

  • Fix false positives on sorted_first_last rule when first/last have
    a predicate.
    woxtu
    #​3023

  • Work around dyld warning about duplicate SwiftSyntax classes with Xcode 15
    betas.
    keith
    JP Simard
    #​4782

v0.52.2

Compare Source

Breaking
  • None.
Experimental
  • None.
Enhancements
  • Exclude simple assignments of the form self.x = x from being reported by
    the redundant_self_in_closure rule.
    SimplyDanny
    #​4988
Bug Fixes
  • Make unhandled_throwing_task opt-in instead of enabled by default. The rule
    is still prone to false positives at this point, so this makes enabling the
    rule a conscious decision by end-users.
    JP Simard
    #​4987

  • Fix unhandled_throwing_task false positives when the Task is returned or
    where the throwing code is handled in a Result initializer.
    JP Simard
    #​4987

v0.52.1

Compare Source

Breaking
  • None.
Experimental
  • None.
Enhancements
  • None.
Bug Fixes
  • Let the validates_start_with_lowercase option in name configurations
    expect a severity (warning or error). Not setting it disables the check.
    Boolean values are now deprecated. A true value enables the check as an
    error for the time being to keep the previous behavior.
    SimplyDanny
    #​2180

  • Fixed a false positive in unhandled_throwing_task.
    kylebshr
    #​4984

  • Fix Bazel release tarball for compiling on macOS.
    JP Simard
    #​4985

v0.52.0

Compare Source

Breaking
  • The attributes rule now expects attributes with arguments to be placed
    on their own line above the declaration they are supposed to influence.
    This applies to attributes with any kinds of arguments including single
    key path arguments which were previously handled in a different way. This
    behavior can be turned off by setting attributes_with_arguments_always_on_line_above
    to `false.
    SimplyDanny
    #​4843

  • The internal module structure for SwiftLint has changed to split the
    monolithic SwiftLintFramework into new SwiftLintCore for core linter
    infrastructure, SwiftLintBuiltInRules for built-in rules and
    SwiftLintExtraRules to add your own native rules to SwiftLint.
    JP Simard

Experimental
  • None.
Enhancements
  • Add new superfluous_else rule that triggers on if-statements when an
    attached else-block can be removed, because all branches of the previous
    if-block(s) would certainly exit the current scope already.
    SimplyDanny

  • Add sorted_enum_cases rule which warns when enum cases are not sorted.
    kimdv

  • Add new redundant_self_in_closure rule that triggers in closures on
    explicitly used self when it's actually not needed due to:

    • Strongly captured self ({ [self] in ... })
    • Closure used in a struct declaration (self can always be omitted)
    • Anonymous closures that are directly called ({ ... }()) as they are
      definitly not escaping
    • Weakly captured self with explicit unwrapping

    SimplyDanny
    #​59

  • Extend xct_specific_matcher rule to check for boolean asserts on (un)equal
    comparisons. The rule can be configured with the matchers that should trigger
    rule violations. By default, all matchers trigger, but that can be limited to
    just one-argument-asserts or two-argument-asserts.
    SimplyDanny
    JP Simard
    #​3726

  • Trigger prefer_self_in_static_references rule on more type references.
    SimplyDanny

  • Adds a new reporters command, to improve discoverability of reporters.
    Martin Redington
    #​4819

  • Adds test_parent_classes option to the no_magic_numbers rule.
    Violations within test classes will now be ignored by default.
    Martin Redington
    #​4896

  • Stop enforcing calls to super from the override functions setUp(),
    tearDown(), setUpWithError(), and tearDownWithError() in XCTestCase
    subclasses.
    AndrewDMontgomery
    #​4875

  • Prepend warning: to error messages so that they show in Xcode.
    whiteio
    #​4923

  • The attributes rule received a new boolean option
    attributes_with_arguments_always_on_line_above which is true by default.
    Setting it to false ensures that attributes with arguments like
    @Persisted(primaryKey: true) don't violate the rule if they are on the same
    line with the variable declaration.
    SimplyDanny
    #​4843

  • Add new unhandled_throwing_task rule that triggers when a Task with an
    implicit error type has unhandled trys or errors thrown inside its body.
    This results in errors being silently discarded, which may be unexpected.
    See this forum thread for more details.
    kylebshr

Bug Fixes
  • Fix lower_acl_than_parent rule rewriter by preserving leading whitespace.
    SimplyDanny
    #​4860

  • Ignore block comments in let_var_whitespace rule.
    SimplyDanny
    #​4871

  • Fix false positives in indentation_width rule.
    Sven Münnich

  • Do not trigger reduce_boolean on reduce methods with a first named
    argument that is different from into.
    SimplyDanny
    #​4894

  • Work around dyld warning about duplicate SwiftSyntax classes.
    keith
    #​4782

  • Improve lint times of SwiftLintPlugin by moving the
    excludedPaths(fileManager:) operation out of the linting iterations.
    andyyhope
    #​4844


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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot changed the title Update dependency realm/SwiftLint to v0.52.0 Update dependency realm/SwiftLint to v0.52.1 May 11, 2023
@renovate renovate bot force-pushed the renovate/realm-swiftlint-0.x branch from 8695171 to 3a66a37 Compare May 11, 2023 18:31
@renovate renovate bot changed the title Update dependency realm/SwiftLint to v0.52.1 Update dependency realm/SwiftLint to v0.52.2 May 12, 2023
@renovate renovate bot force-pushed the renovate/realm-swiftlint-0.x branch from 3a66a37 to 29b54bb Compare May 12, 2023 16:02
@renovate renovate bot changed the title Update dependency realm/SwiftLint to v0.52.2 Update dependency realm/SwiftLint to v0.52.3 Jun 22, 2023
@renovate renovate bot force-pushed the renovate/realm-swiftlint-0.x branch from 29b54bb to 72a7c87 Compare June 22, 2023 16:19
@renovate renovate bot force-pushed the renovate/realm-swiftlint-0.x branch from 72a7c87 to 6179546 Compare July 6, 2023 20:05
@renovate renovate bot changed the title Update dependency realm/SwiftLint to v0.52.3 Update dependency realm/SwiftLint to v0.52.4 Jul 6, 2023
@renovate renovate bot changed the title Update dependency realm/SwiftLint to v0.52.4 Update dependency realm/SwiftLint to v0.53.0 Sep 26, 2023
@renovate renovate bot force-pushed the renovate/realm-swiftlint-0.x branch from 6179546 to e9d8907 Compare September 26, 2023 17:00
@renovate renovate bot changed the title Update dependency realm/SwiftLint to v0.53.0 Update dependency realm/SwiftLint to v0.54.0 Nov 10, 2023
@renovate renovate bot force-pushed the renovate/realm-swiftlint-0.x branch from e9d8907 to 5cb9988 Compare November 10, 2023 21:56
@renovate renovate bot force-pushed the renovate/realm-swiftlint-0.x branch from 5cb9988 to afdedab Compare May 12, 2024 00:03
@renovate renovate bot changed the title Update dependency realm/SwiftLint to v0.54.0 Update dependency realm/SwiftLint to v0.55.0 May 12, 2024
@renovate renovate bot force-pushed the renovate/realm-swiftlint-0.x branch from afdedab to c13d762 Compare May 17, 2024 00:29
@renovate renovate bot changed the title Update dependency realm/SwiftLint to v0.55.0 Update dependency realm/SwiftLint to v0.55.1 May 17, 2024
@renovate renovate bot force-pushed the renovate/realm-swiftlint-0.x branch from c13d762 to 86a33c6 Compare August 6, 2024 22:39
@renovate renovate bot changed the title Update dependency realm/SwiftLint to v0.55.1 Update dependency realm/SwiftLint to v0.56.0 Aug 6, 2024
@renovate renovate bot force-pushed the renovate/realm-swiftlint-0.x branch from 86a33c6 to e6adad3 Compare August 7, 2024 01:50
@renovate renovate bot changed the title Update dependency realm/SwiftLint to v0.56.0 Update dependency realm/SwiftLint to v0.56.1 Aug 7, 2024
@renovate renovate bot force-pushed the renovate/realm-swiftlint-0.x branch from e6adad3 to d59a710 Compare August 22, 2024 12:34
@renovate renovate bot changed the title Update dependency realm/SwiftLint to v0.56.1 Update dependency realm/SwiftLint to v0.56.2 Aug 22, 2024
@renovate renovate bot force-pushed the renovate/realm-swiftlint-0.x branch from d59a710 to 5527d89 Compare September 8, 2024 19:49
@renovate renovate bot changed the title Update dependency realm/SwiftLint to v0.56.2 Update dependency realm/SwiftLint to v0.57.0 Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants