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 nicklockwood/SwiftFormat to v0.55.2 #57

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

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Mar 12, 2024

This PR contains the following updates:

Package Update Change
nicklockwood/SwiftFormat minor 0.48.4 -> 0.55.2

Release Notes

nicklockwood/SwiftFormat (nicklockwood/SwiftFormat)

v0.55.2

Compare Source

  • Fixed bug where unusedArguments failed to remove arguments that matched switch variable bindings
  • Fixed bug where unusedArguments failed to remove arguments that matched nested function call labels
  • Fixed spurious lint errors for blankLinesAtStartOfScope when using organizeDeclarations rule
  • Fixed bug where indentation errors were incorrectly reported as wrap rule lint errors
  • The preferKeyPaths rule now handles the \\.self case for Swift 5.10 and later
  • Fixed parsing of keyPaths beginning with \.?

v0.55.1

Compare Source

  • Fixed bug where docCommentsBeforeModifiers got confused by enum cases that match modifier names
  • Fixed bug where wrapEnumCases would mangle nested or successive enum declarations
  • Artifact Bundle now includes pre-built binary for ARM-based Linux systems

v0.55.0

Compare Source

  • Added docCommentsBeforeModifiers rule to hoist doc comments above declaration modifiers
  • Added unusedPrivateDeclarations rule to remove unused private or fileprivate declarations
  • Added propertyTypes rule to control the use of inferred or explicit types for properties
  • Renamed the --redundanttype option to --propertytypes as it's shared by both rules
  • Added --ranges preserve and --operatorfunc preserve options
  • Added --languagemode option to specify if you are using Swift 5 or 6 language mode
  • The organizeDeclarations rule can now sort declarations by name/type/visibility/etc
  • Fixed organizeDeclarations bug where --beforemarks unexpectedly matched keywords in function bodies
  • Fixed missing lint output for organizeDeclarations rule
  • Fixed bug in markTypes rule for chained protocol extension names
  • Renamed the confusing --onelineforeach option to --inlinedforeach
  • Git info can now be used in header comments when formatting code from stdin
  • You can now use the --outputtokens option to print output as tokens in JSON format
  • Each rule and test is now defined in a separate file to make it easier to maintain/contribute
  • Updated minimum Swift version for building SwiftFormat to 5.3 (you can still format older Swift code)
  • Docker build now uses static Linux SDK

v0.54.6

Compare Source

  • Fixed incorrect wrapping of conditional bodies inside single-line string literals
  • Fixed properties inside type with where clause being treated as local scope
  • Fixed regression in wrapMultilineStatementBraces rule
  • Fixed tokenizing of a throwing closure type in a generics clause
  • Fixed bug in parseDeclarations where incorrect tokens could cause rules to time out
  • Fixed issue where organizeDeclarations would add extra blank lines if type had blank lines with spaces
  • Updated SwiftFormat for Xcode installation instructions for macOS 15 Sequoia
  • Added known issue to README for preferForLoop rule

v0.54.5

Compare Source

  • Fixed crash in unusedArguments rule
  • Fixed bug where preferForLoop failed if forEach contains guard ... else { return }

v0.54.4

Compare Source

  • Fixed bug where trailing comma was erroneously inserted into a wrapped array type extension
  • Fixed bug where return was incorrectly removed inside catch statement with where clause
  • Fixed opaqueGenericParameters rule being incorrectly applied to functions with typed throws
  • Fixed spaceAroundBrackets behaving incorrectly inside a macro invocation
  • Fixed unusedArguments false positive inside multiline string literal
  • Fixed a case where removing return resulted in non-compiling code for opaque return types
  • Redundant Void return type is now removed from functions in protocol declarations
  • Fixed a bug where unusedArguments didn't handle conditional assignment shadowing correctly
  • Fixed Xcode 16 Beta warnings related to unhandled files when building SwiftFormat package
  • The Swift runtime is now packaged with the installer on Windows as on Linux
  • The Windows installer now uses a more conventional directory structure
  • SwiftFormat for Windows now supports arm64

v0.54.3

Compare Source

  • Fixed issue where --wrapeffects never could unexpectedly remove unrelated code
  • Fixed --condassignment option (setting this previously had no effect)
  • The redundantReturn rule no longer removes conditional returns if conditionalAssignment is disabled
  • The redundantObjc rule now strips implicit @objc attribute for @IBSegueAction functions
  • Fixed bug where violations for rules that insert new lines were sometimes ignored in lint output

v0.54.2

Compare Source

  • Fixed broken formatter cache, which caused a significant performance regression since 0.54.0
  • The blankLinesBetweenChainedFunctions rule now removes blank line after comments in the chain
  • The blankLinesBetweenChainedFunctions rule no longer conflicts with blankLinesAroundMark
  • FixedredundantInternal removing required internal keyword in extensions with where clause
  • Fixed another case of spurious return removal in conditional blocks
  • Fixed redundantNilInit rule inserting nil after as keyword

v0.54.1

Compare Source

  • The --nilInit insert option is no longer applied to lazy or attributed properties
  • The blankLinesBetweenChainedFunctions rule now correctly handles comments in the chain
  • Fixed indenting of wrapped arguments in --fragment mode
  • 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 return in conditional blocks
  • Fixed --lint mode reporter output when using stdin

v0.54.0

Compare Source

  • Added blankLineAfterSwitchCase rule for inserting blank lines after switch cases
  • Added consistentSwitchCaseSpacing rule for ensuring consistent spacing between switch cases
  • Added redundantProperty rule for removing variable assignments where value is immediately returned
  • Added redundantTypedThrows rule for stripping redundant Never or any Error throws types
  • Setting --report without --reporter type now raises an error if type can't be inferred
  • Added XML reporter for Checkstyle-compatible lint reporting (use the --reporter xml option)
  • Added --typedelimiter option for controlling spacing around the colon in type definitions
  • Added --initcodernil option for returning nil instead of asserting in unavailable init?(coder:)
  • The fileHeader rule now uses git info for created date (if available) instead of file system
  • Added git author, author.name and author.email tokens for file header templates
  • Added --callsiteparen option for controlling closing paren placement at function call sites
  • The wrapAttributes rule can now be applied differently to computed properties vs stored properties
  • The wrapAttributes rule can now be applied differently to complex (parameterized) vs simple attributes
  • Replaced --varattributes with --storedvarattrs, --computedvarattrs and --complexattrs options
  • Added —-nilinit option for controlling whether redundantNilInit adds or removes explicit nil
  • Added ability to organize declarations by type over visibility (use --organizationmode type)
  • Fixed bug where enabling organizeDeclarations for structs caused sortDeclarations to 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 init and _modify property accessors
  • Fixed bug with preferForLoop rule and tuple argument matching
  • Extended conditionalAssignment rule to handle more cases
  • Added --condassignment after-property option
  • Fixed await being hoisted outside of macro arguments
  • Fixed unsafe adding/removal of self within macros
  • Added os_log to --selfrequired defaults

v0.53.10

Compare Source

  • Fixed creation of spurious stdout directory when using --output stdout
  • Fixed unusedArguments false positive for multiline function call arguments
  • Fixed parsing of generic arguments containing attributes or ~ operator
  • Fixed spurious errors about missing --report or --reporter arguments
  • Fixed strongifiedSelf removing required backticks around nonisolated self
  • Deprecated explicit default value for --reporter (introduced in 0.53.9)
  • Added support for sending keyword

v0.53.9

Compare Source

  • Fixed bug in unusedArguments when shadowing function argument with conditional assignment declaration
  • Individual --lint errors are no longer shown in --quiet mode (restores pre-0.53.8 behavior)

v0.53.8

Compare Source

  • Added --strict option to emit non-zero exit code after applying changes in formatting mode
  • The enumNamespaces rule is no longer applied to structs with macros that have generic arguments
  • The opaqueGenericParameters rule is no longer applied to structs with macros or attributes
  • Fixed another case where redundantParens spuriously removed parens inside a closure
  • Fixed bug where redundantInit mishandled a .init after a ternary operator

v0.53.7

Compare Source

  • Fixed bug with redundantParens where first parens inside a closure were spuriously removed
  • Fixed wrapEnumCases rule mangling unindented cases
  • The wrapEnumCases rule no longer wraps cases inside inline enum declarations
  • Improved the redundantInit metatype heuristic to reduce false positives

v0.53.6

Compare Source

  • Fixed bug where a space was incorrectly added before a . operator inside attribute arguments
  • The redundantType rule no longer strips required explicit type from @Model class default values
  • Fixed issue where redundantInit didn't work on collection types
  • The redundantParens rule now correctly handles @MainActor closures
  • Fixed bug where required parens were removed around each X parameter pack expressions
  • Fixed issue where --wrapreturntype if-multiline didn't work with arrays, dictionaries, tuples, or generic types
  • The spaceAroundParens/Brackets rules now correctly insert a space after borrowing/consuming and isolated
  • Fixed spurious line breaks inserted between scoped import statements
  • Added --doccomments preserve option to preserve all doc comments, even if not followed by a declaration

v0.53.5

Compare Source

  • Fixed bug with trailing comma being inserted into wrapped capture list
  • Fixed bugs with parsing nonisolated(unsafe) modifiers
  • Fixed bug with hoisting try or async after a string literal expression
  • Fixed issue with parsing expressions containing generic arguments
  • Lint warnings are now displayed as errors when not running in --lenient mode
  • Improved error message for unexpected static/class modifiers
  • Added Swift 6.0 to list of supported Swift versions

v0.53.4

Compare Source

  • The enumNamespaces rule is no longer applied to structs with attributes or macros
  • The new nonisolated(unsafe) modifier is now handled correctly
  • Added support for do throws(Type) { ... } clauses

v0.53.3

Compare Source

  • The preferForLoop rule now correctly singularizes loop conditions that end with "cases"
  • Fixed bug where preferForLoop mangled throwing or async forEach expressions
  • Fixed extension body not being sorted if organizeDeclarations was enabled but excluded declaration type
  • Fixed conditionalAssignment bugs with @unknown default cases
  • Fixed some unsafe applications of the enumNamespaces rule
  • Added preliminary support for typed throws

v0.53.2

Compare Source

  • Fixed bug where hoistAwait rule could move await before try keyword
  • Fixed bug where redundantSelf rule was confused by @MainActor annotation
  • Fixed edge case where unusedArguments removed required argument inside guard

v0.53.1

Compare Source

  • Fixed creation of spurious stdout directory when using --output stdout
  • Fixed unusedArguments false positive for multiline function call arguments
  • Fixed parsing of generic arguments containing attributes or ~ operator
  • Fixed spurious errors about missing --report or --reporter arguments
  • Fixed strongifiedSelf removing required backticks around nonisolated self
  • Deprecated explicit default value for --reporter (introduced in 0.53.9)
  • Added support for sending keyword

v0.53.0

Compare Source

  • Added preferForLoop rule to convert forEach { ... } calls to regular for loops
  • Added wrapLoopBodies rule to wrap single-line loop bodies over multiple lines
  • Added noExplicitOwnership rule to remove unwanted borrowing and consuming modifiers
  • Added wrapMultilineConditionalAssignment rule to wrap if or switch expressions to new line
  • The wrapAttributes rule no longer unwraps attributes if they would exceed --maxwidth
  • The typeSugar rule's --shortoptionals option now defaults to except-properties
  • Enabled blankLinesBetweenChainedFunctions rule by default
  • Enabled blankLineAfterImports rule by default
  • Fixed self being incorrectly inserted before set clause in computed properties
  • Fixed a bug in parseType() helper function where qualified types were not recognized
  • Fixed Xcode command plugin

v0.52.11

Compare Source

  • Updated if/switch expression workaround for Swift 5.9 bug to handle as! casts
  • Fixed indent logic for wrapped conditional assignment expressions
  • Fixed assertion failure in redundantSelf rule
  • Fixed raw string parsing bug

v0.52.10

Compare Source

  • Fixed enumNamespaces rule breaking import struct/class statements
  • Fixed unsafe application of conditionalAssignment rule to switch statements containing #if blocks

v0.52.9

Compare Source

  • Fixed redundantClosure removing required closure around conditional statements
  • Fixed redundantClosure removing closure containing conditional expressions inside a method call
  • Fixed redundantClosure generating invalid code when the redundantReturn rule is disabled
  • Fixed issue where if/switch expressions with as? cast would break build in Swift 5.9
  • Fixed blankLineAfterImports introducing spurious blank line before @preconcurrency attribute
  • Fixed bug where enumNamespaces rule wouldn't be applied immediately after an import statement
  • Fixed issue where switch case with multiple where clauses could be parsed incorrectly
  • The SwiftFormat SPM plugin now formats local dependencies, not just final product targets

v0.52.8

Compare Source

  • Fixed redundantClosure rule in cases where an if/switch expression is not permitted
  • The docComments rule now correctly handles macro comments
  • The docComments rule is now only applied to a comment block if all lines match the pattern

v0.52.7

Compare Source

  • Fixed bug where conditionalAssignment and redundantClosure rules would be applied incorrectly
  • Fixed redundantClosure rule leaving stray try or await keywords behind

v0.52.6

Compare Source

  • Fixed bug where redundantReturn rule was incorrectly applied to consecutive if statements in Swift 5.9

v0.52.5

Compare Source

  • Fixed bug where redundantReturn rule could break fallible initializers in Swift 5.9
  • Fixed incorrect application of docComments rule inside #if statements
  • The docComments rule no longer treats comments starting with Note: as a special directive
  • Fixed incorrect indenting inside #if statements immediately preceded by a comment
  • Removed arbitrary unwrap threshold for braces rule when no --maxwidth is specified
  • You can now include operators in the --asynccapturing list

v0.52.4

Compare Source

  • Fixed docComments rule incorrectly replacing comments inside switch cases and if/guard conditions
  • Fixed redundantLet rule removing required let inside ViewBuilder modifiers
  • Fixed redundantLet rule removing required let after @MainActor or @Sendable
  • Fixed bug when using --wrapconditions after-first if first line of condition is a comment
  • Added more context to "failed to terminate" error message to aid tracking down issues
  • Updated sortTypealiases rule to also remove duplicate protocols in declaration
  • Added some fixes to support parameter packs in Swift 5.9

v0.52.3

Compare Source

  • Fixed incorrect hoisting of try inside multiline string literal interpolations
  • Fixed incorrect hoisting of try inside generic type initializer calls
  • Fixed case where parens were incorrectly removed around optional function calls
  • Fixed bug where early return statements added while debugging would be incorrectly removed

v0.52.2

Compare Source

  • Fixed static Self being incorrectly removed in let or if let expressions
  • Fixed // swiftformat:disable directive not working for redundantReturn rule
  • Fixed spurious assertion failure

v0.52.1

Compare Source

  • Updated if/switch expression workaround for Swift 5.9 bug to handle as! casts
  • Fixed indent logic for wrapped conditional assignment expressions
  • Fixed assertion failure in redundantSelf rule
  • Fixed raw string parsing bug

v0.52.0

Compare Source

  • Added redundantInternal rule to remove redundant internal access modifiers
  • Added sortTypealiases rule to sort typealias types alphabetically
  • Added headerFileName rule to ensure filename in header comment matches actual file
  • Added redundantStaticSelf rule to remove redundant self inside static functions
  • Added blankLinesBetweenChainedFunctions rule to remove blank lines inside function chains
  • Added applicationMain rule to remove obsolete @UIApplicationMain and @NSApplicationMain attributes
  • Renamed sortedSwitchCases rule to sortSwitchCases for consistency
  • Renamed sortedImports rule to sortImports for consistency
  • Redundant return is now correctly removed in switch cases with associated values
  • Fixed failure to terminate when removing returns from long switch statement
  • Fixed spurious "unexpected static" error in redundantSelf rule
  • Deliberate blank line before else statement is now preserved
  • Rule options are now case-insensitive

v0.51.15

Compare Source

  • Fixed regression in unusedArguments rule that caused used parameters to be marked unused
  • Fixed some additional cases where regex literal was mistaken for / operator
  • Vertical tab and form feed characters in source file no longer cause spurious errors

v0.51.14

Compare Source

  • Withdrawn

v0.51.13

Compare Source

  • Fixed bug where importing a type caused the redundantSelf rule to be silently disabled
  • Fixed bug where unusedArguments would remove an argument that was used after an if
  • Fixed Windows support and added Windows release binaries (thanks to Saleem Abdulrasool)
  • Fixed bug where backticks were incorrectly stripped from standalone $ identifier
  • Added support for package keyword in organizeDeclarations rule

v0.51.12

Compare Source

  • Fixed hoistTry bugs with generics, subscripts and collection literals
  • Fixed hoisting bugs with statements containing both try? and try
  • Fixed hoisting of try inside an optional function
  • Fixed function argument wrapping bug
  • Fixed bug where nested closure in was mistaken for part of a for loop
  • Added preliminary support for wrapping Swift 5.9 macro declarations
  • Added preliminary support for Swift 5.9 package access modifier
  • Added preliminary support for Swift 5.9 consume and discard operators
  • Added preliminary support for Swift 5.9 borrowing and consuming modifiers

v0.51.11

Compare Source

  • Fixed unexpected static function error false positive in redundantSelf rule
  • Fixed failure to report lint error when removing a duplicate blank line at the end of the file
  • Fixed bug where hoistTry rule failed with more than 10 try expressions at the same scope level
  • Comments containing TODO: directives are no longer converted by the docComments rule

v0.51.10

Compare Source

  • Fixed bug in wrapAttributes rule due to class declaration being mistaken for class-scoped var
  • Fixed another case of incorrect indenting inside an #ifdef block
  • Fixed line breaks being incorrectly removed by sortedSwitchCases

v0.51.9

Compare Source

  • Fixed typeSugar rule unwrapping Optional some/any without inserting required parentheses
  • Fixed indenting of function arguments inside an #ifdef block after a closing brace
  • Fixed comment directive state leaking between rules

v0.51.8

Compare Source

  • Fixed redundantSelf removing non-unwrapped weak self inside closures
  • Fixed fileprivate rule making init private when inherited by subclass in the same file
  • Fixed hoistPatternLet rule inserting let inside dictionary type literal
  • Fixed indenting for chained members inside conditional compilation blocks
  • Fixed unusedArguments incorrectly removing used argument after conditional compilation block
  • Improved unusedArguments rule error handling

v0.51.7

Compare Source

  • Fixed redundantSelf incorrectly inserting self for local variables declared in capture list
  • Fixed blankLineAfterImports rule inserting blank line before @_spi imports
  • Fixed fileHeader rule ignoring headers containing URLs

v0.51.6

Compare Source

  • Required self is now preserved in function bodies inside closures with [weak self] captures
  • Fixed bug with hoistTry inside chains of concatenated interpolated strings
  • Fixed indenting of dot-prefixed identifiers inside #else and #elseif blocks
  • Fixed parsing bug in redundantSelf rule

v0.51.5

Compare Source

  • Added --baseconfig option to replicate old --config behavior
  • Fixed self being incorrectly inserted inside capture list
  • Fixed indenting of .init inside #if statements
  • Fixed redundantInit glitch inside #if statements
  • Fixed redundantSelf inside if case expressions
  • Fixed hoistTry for strings containing multiple interpolation clauses
  • Fixed redundant parens not being removed after return keyword
  • Fixed spacing after attribute when using --funcattributes same-line
  • Fixed false positive in collection literals for unusedArguments
  • Fixed file access permissions errors not being reported

v0.51.4

Compare Source

  • Limited redundantReturn inside if / switch expressions to Swift 5.9+
  • Fixed hoistTry and hoistAwait inside multiline string literals
  • Fixed invalid indenting of blank lines inside multiline string literals

v0.51.3

Compare Source

  • Fixed hoistTry and hoistAwait rule breaking string interpolations
  • Fixed bug where opaqueGenericParameters rule would remove non-redundant generic type
  • Fixed parsing bug with trailing closures on optional methods
  • Fixed redundantSelf rule parsing bug affecting string literals
  • Updated if / switch expression features to be enabled only in Swift 5.9+

v0.51.2

Compare Source

  • Fixed hoistTry rule breaking multiline function chains
  • Added --asynccapturing and --throwcapturing options for hoistTry and hoistAwait rules
  • Fixed changes in last line of file not being correctly tracked

v0.51.1

Compare Source

  • Fixed regression in unusedArguments rule that caused used parameters to be marked unused
  • Fixed some additional cases where regex literal was mistaken for / operator
  • Vertical tab and form feed characters in source file no longer cause spurious errors

v0.51.0

Compare Source

  • Added hoistAwait and hoistTry rules to hoist inline await/try to start of expression
  • Extended redundantPattern rule to remove redundant let in patterns
  • The wrapMultilineStatementBraces rules is now applied more consistently
  • Updated redundantReturn/Closure rules to support if/switch expressions in Swift 5.8
  • Added conditionalAssignment rule to assign variables using if/switch expressions in Swift 5.8
  • Updated redundantType rule to support if/switch expression assignment Swift 5.8
  • Extended redundantSelf rule to support implicit self in eligible closures in Swift 5.8
  • SwiftFormat now ignores .swiftformat files when explicit --config file is provided
  • Added --wrapenumcases with-values option to only wrap enum cases with values
  • Added --wrapeffects option for wrapping function effects
  • Removed unsafe preferDouble rule

v0.50.9

Compare Source

  • Added GitHub actions log reporter (see --reporter option for details)
  • Fixed bug where redundantType sometimes stripped in cases where it couldn't be inferred
  • The redundantType rule now supports removing type in more cases where supported
  • Made SwiftFormat for Xcode instructions dynamic according to OS version
  • Fixed bug where a trailing comma could be left behind by opaqueGenericParameters rule
  • Fixed bug where wrapAttributes rule sometimes wrapped inline attributes like @MainActor
  • Improved support for // swiftformat:options comment directives
  • Removed deprecated options from the example .swiftformat file

v0.50.8

Compare Source

  • The redundantBackticks rule no longer removes required comments around self
  • Associated type headerdoc comments are now handles correctly by the docComments rule
  • Fixed mangled comments when using the sortedSwitchCases rule
  • Hex, octal or binary literals are now sorted correctly in sortedSwitchCases rule
  • Fixed regression in closed brace indentation (introduced in 0.50.7)
  • Fixed unsafe semicolon removal after inferred var properties
  • Added fileHeader placeholder documentation

v0.50.7

Compare Source

  • Fixed parsing of regex literals preceded by try or await
  • Fixed required parens being removed around await keyword
  • Fixed indent for nested, wrapped parameters

v0.50.6

Compare Source

  • Fixed regression in fileHeader rule where blank lines were removed after header
  • Fixed globs matching when command-line tool is invoked from a directory such as /var/tmp
  • Fixed bug in parsing regex literals beginning with ^ character

v0.50.5

Compare Source

  • Fixed incorrect macOS command line binary that accidentally shipped with 0.50.4

v0.50.4

Compare Source

  • Added Swift package command plugin
  • Added docComments rule to convert between regular and documentation comments
  • Fixed redundantLet rule incorrectly stripping let inside Result Builders
  • Fixed void rule in cases where Void has been locally shadowed
  • Fixed fileHeader rule when file only contains header comment
  • Fixed unexpected indent and spurious wrap warning for blank lines
  • Fixed parsing bug in redundantSelf rule

v0.50.3

Compare Source

  • Fixed bug where redundantFileprivate rule could break Array extensions using type sugar
  • Fixed bug and crash in wrapSingleLineComments rule relating to long URLs
  • Improved wrapSingleLineComments handling of comments containing long URLs
  • The opaqueGenericParameters rule is now correctly applied to initializers and subscripts
  • Added some known issues for opaqueGenericParameters and genericExtensions to README

v0.50.2

Compare Source

  • Fixed redundantImports dropping @_implementationOnly or @_exported annotations
  • Fixed blankLineAfterImports bug affecting @_implementationOnly or @_exported imports
  • Fixed case where regex literals were incorrectly interpreted as division operators
  • Fixed bug with genericExtensions and nested generics
  • Fixed crash in opaqueGenericParameters rule

v0.50.1

Compare Source

  • Fixed bug in opaqueGenericParameters where type constraint depended on another type parameter
  • Fixed crash in opaqueGenericParameters rule where type constraint contained closure type
  • Fixed bug where opaqueGenericParameters broke variadic parameter expressions
  • Fixed several bugs in wrapSingleLineComments rule
  • Fixed crash in andOperator rule

v0.50.0

Compare Source

  • Added genericExtensions rule for simplifying conditional type extensions in Swift 5.7
  • Added markTypes support for type definitions in extensions
  • Added opaqueGenericParameters rule to use opaque generic parameter syntax where equivalent
  • Added blankLineAfterImports rule
  • Added redundantOptionalBinding rule for simplifying if let expressions in Swift 5.7
  • Added --enumnamespaces structs-only option
  • Added wrapSingleLineComments rule
  • A --swiftversion in the .swiftformat config now takes precedence over .swift-version file
  • Multiline string interpolations can now wrap inside parenthesized expression
  • Comma-delimited options in descendent .swiftformat config files are no longer merged
  • SwiftFormat now requires a minimum of Swift 5.1 to build

v0.49.18

Compare Source

  • Fixed bug in unusedArguments when argument is shadowed in a switch case statement
  • Fixed enumNamespaces rule breaking open class declarations
  • Fixed redundantLet removing let incorrectly in async let statement
  • Fixed indent regression when using --xcodeindentation option

v0.49.17

Compare Source

  • Fixed unexpected token error occurring at end of scope after a << operator
  • Fixed bug where function arguments named async: would expectedly be indented
  • SwiftFormat command-line tool now logs the location and version of .swift-version files it encounters
  • Added Docker image (thanks to Arthur Semenyutin for the script, see README for details)

v0.49.16

Compare Source

  • Fixed async let indenting regression (broken in 0.49.15)

v0.49.15

Compare Source

  • Fixed illegal wrapping of ternary expressions inside single-line string interpolation
  • Fixed bug where await case was incorrectly interpreted as ending the current scope
  • Fixed issue where async throws was indented incorrectly
  • Fixed bug where a pair of less-than, greater-than operators could be interpreted as generics
  • Fixed case where andOperator rule could introduce parser ambiguity

v0.49.14

Compare Source

  • Fixed unusedArguments rule incorrectly removing async keyword from closure arguments
  • Fixed unusedArguments not being applied correctly to throwing closures
  • Fixed assertion failure when parsing @unchecked Sendable enum
  • Fixed assertion failure after applying typeSugar rule to array/dictionary extensions
  • Fixed line indent after wrapAttributes rule is applied
  • Fixed issue where redundantClosure would break build for Void closures calling @​discardableResult functions
  • Added --typeblankline option for blankLinesAtStartOfScope and blankLinesAtEndOfScope rules
  • Added support for Xcode SCRIPT_INPUT_FILE arguments

v0.49.13

Compare Source

  • Fixed for...in mistaken for closure in in indent rule
  • Fixed incorrect spacing around @MainActor

v0.49.12

Compare Source

  • Fixed bug with parsing ternary chains containing chevron
  • Added another fix for / operator
  • Fixed indent after wrapped closure in
  • Improved rule search in SwiftFormat for Xcode app
  • Fixed enum popups in SwiftFormat for Xcode options
  • Added prebuilt SPM binary target

v0.49.11

Compare Source

  • Fixed parsing of prefix / operator (as used in CasePath library)
  • Fixed bug with indenting of trailing closures after a conditional statement
  • Fixed bug with wrapMultilineStatementBraces rule
  • Added Swift 5.6 and 5.7 to supported versions

v0.49.10

Compare Source

  • Added preliminary support for Swift 5.7 regular expression literals
  • Fixed conflict between wrapMultilineStatementBraces and indent rules
  • Fixed bug where arguments referenced using $ prefix were incorrectly marked as unused
  • Fixed enumNamespaces bug where class modifiers were mistakenly converted to enum
  • Fixed bug where preferKeyPath mangled functions using multiple trailing closure syntax
  • Unterminated string literals are now treated as an error

v0.49.9

Compare Source

  • Fixed bug where trailing comma was incorrectly added inside collection types
  • Fixed some cases where redundantVoidReturnType failed to remove Void
  • Fixed unusedArguments regression introduced in 0.49.8

v0.49.8

Compare Source

  • Fixed redundantInit rule removing required init when instantiating type variables
  • Fixed unusedArguments incorrectly marking shadowed parameters as used or unused in some cases

v0.49.7

Compare Source

  • Redundant self is now correctly removed in if let assignments
  • Fixed infinite recursion bug that would cause formatting to time out for some inputs
  • Lint failure now returns an error code when using stdin, matching behavior for file inputs
  • Fixed bug where parens were incorrectly removed around optional ranges
  • Updated unusedParens rule for new shorthand if let syntax in Swift 5.7
  • Updated indenting of function chains to match latest Xcode behavior
  • Fixed build error on macOS 10.11 and earlier

v0.49.6

Compare Source

  • Fixed bug where redundantParens rule removed required parens in any type expressions
  • Fixed whitespace behavior around some/any keywords
  • Fixed crash when // swiftformat:sort was applied to an enum with only one case
  • SwiftFormat can now be built on Windows

v0.49.5

Compare Source

  • Fixed bug where redundantClosure incorrectly inlined throwing closures
  • Fixed bug where in --exclude path matching failed when using --stdinpath
  • Fixed a bug with typeSugar rule when overriding stdlib types locally in your code
  • Multiline statement braces are now unwrapped if wrapMultilineStatementBraces disabled
  • Added // swiftformat:sort directive to sort declarations by name
  • You can now use --disable all or --enable all as shorthand for all rules
  • The rules in the Rules.md file are now grouped by their default/enabled status

v0.49.4

Compare Source

  • Fixed creation date being modified on formatted files
  • Fixed case where a closure inside an if condition was mistaken for the body
  • Fixed blockComments rule removing leading *s used as bullet points
  • Fixed bug when parsing a raw string containing three consecutive unescaped quotes
  • Fixed spurious warning about unused --wrapparameters option
  • Fixed edge case when using --allman indenting

v0.49.3

Compare Source

  • Fixed required let being removed inside View Builders
  • Fixed blockComments rule mangling code on next line after comment (really this time)
  • Fixed unsafe removal of self inside if statements containing postfix operators
  • Fixed --selfrequired behavior inside interpolated strings
  • Fixed indenting of labelled trailing closures

v0.49.2

Compare Source

  • Fixed literal values being incorrectly removed by redundantType rule
  • Fixed redundantSelf rule removing self from shadowed variables after an as/is condition
  • Fixed bug where redundantClosure rule could break the build for certain Void closures
  • Fixed parsing error in function calls followed by a subscript
  • Fixed blockComments rule mangling code on next line after comment
  • The redundantClosure rule is no longer applied if closure calls a method that returns Never
  • Fixed meaningless warning for deprecated options

v0.49.1

Compare Source

  • Fixed bug in unusedArguments when argument is shadowed in a switch case statement
  • Fixed enumNamespaces rule breaking open class declarations
  • Fixed redundantLet removing let incorrectly in async let statement
  • Fixed indent regression when using --xcodeindentation option

v0.49.0

Compare Source

  • The redundantType rule can now remove redundant types for properties initialized with literal values
  • The redundantType rule now removes types only for local variables by default (to aid compilation performance)
  • Added assertionFailures rule for automatically converting assert(false, ...) to assertionFailure(...)
  • Added acronyms rule to auto-capitalize acronyms (disabled by default)
  • Added preferDouble rule to replace CGFloat with Double on Swift 5.5 and above (disabled by default)
  • Added wrapConditionalBodies rule to unwrap single-line guard and if statements (disabled by default)
  • Added blockComments rule to replace multiline block comments with line comments (disabled by default)
  • Added blankLinesBetweenImports rule to remove blank lines between import statements (disabled by default)
  • Added redundantClosure rule to remove unnecessary closure wrappers
  • Added --lineaftermarks option to add/remove a blank line after // MARK: comments
  • Added --markCategories option for organizeDeclarations rule
  • Added --wrapternary option for controlling how ternary operators are wrapped
  • Added --wraptypealiases option for controlling how typealiases are wrapped
  • Added --indentstrings option for controlling how multiline strings are indented
  • Extended redundantParens rule to handle more cases
  • Extended wrapMultilineStatementBraces rule to handle more cases
  • Extended redundantVoidReturnType rule to apply to closure return values
  • Fixed bug where consecutiveBlankLines rule would strip linebreaks inside multiline string
  • Fixed bug with indenting of wrapped method chains when using --xcodeindentation
  • SwiftFormat for Xcode app binary is no longer hosted in source repository

v0.48.18

Compare Source

  • Fixed redundantObjc bug where private(set) prevented @objc attribute from being stripped
  • Fixed indenting of wrapped member chains in or after #if/#else/#endif blocks
  • The --selfrequired exclusion list is now applied to nested expressions within function's arguments
  • Fixed parsing bug in redundantSelf rule that raised spurious error about missing }
  • Fixed bug where error is --filelist files were incorrectly reported

v0.48.17

Compare Source

  • Fixed bug where trailingCommas rule added comma to wrapped capture list with comment
  • Fixed indenting of closure with wrapped capture list
  • Fixed bug where redundantArguments rule stripped params used in pattern matching with inline let
  • Fixed bug where redundantArguments failed to detect shadowed param after tuple assignment
  • Fixed compilation error introduced when removing redundant parens with inner spaces

v0.48.16

Compare Source

  • Fixed unexpected indentation of next line after a trailing closure
  • Fixed unexpected indentation of try expressions
  • Fixed bug where redundantInit could cause compilation failure
  • Fixed indenting of multiple trailing closures

v0.48.15

Compare Source

  • Fixed false positives in unusedArgument rule when using try/await
  • Closing paren indent is now balanced for double-indented closures
  • Fixed bug where comment directive failed to disable redundantSelf rule
  • Fixed bug where redundantSelf exclusion list was not always applied
  • Fixed regression introduced in 0.48.5 affecting indenting of wrapped closure bodies
  • SwiftFormat directives are now recognized in the middle of a comment

v0.48.14

Compare Source

  • Fixed some cases where function arguments were incorrectly treated as unused
  • Fixed incorrect removal of self for some shadowed variables when swift version is >= 5.4
  • Fixed indenting of wrapped method chains after a closing paren
  • Rules listed in swiftformat comment directives are now case-insensitive

v0.48.13

Compare Source

  • Fixed bug where unusedArguments incorrectly marked shadowed parameters as unused
  • Fixed wrapped chained functions after an indented closing paren or square bracket
  • Fixed Mint install

v0.48.12

Compare Source

  • The redundantSelf rule now removes self from shadowed variable references where permitted
  • Fixed bug where self was not correctly removed on the line following an assignment
  • Fixed some cases where self was incorrectly removed from @dynamicMemberLookup members
  • Fixed error raised where removing self caused ambiguity with global Swift functions
  • Function parameters with shadowed names are now correctly marked as unused
  • The --selfrequired option now applies to members, not just @autoclosure arguments
  • Fixed trailing comment placement when using wrapEnumCases rule
  • Fixed indenting of wrapped chained functions after a closing paren or square bracket
  • Fixed bug where some(Void) was converted to someVoid
  • Fixed potential range bounds crash in editDistance() function
  • Now uses automatic test discovery on Linux instead of XCTestManifests file

v0.48.11

Compare Source

  • Fixed parsing error introduced in 0.48.10 involving inline closures inside conditional statements
  • Fixed bug where redundantSelf could potentially misidentify tuple labels as local variables

v0.48.10

Compare Source

  • Fixed issue with redundantBackticks rule incorrectly removing required backticks around underscore
  • Fixed parsing error in redundantSelf with guard conditions containing inline closures

v0.48.9

Compare Source

  • Fixed regression introduced in 0.48.7 where parens around prefix expressions were incorrectly removed

v0.48.8

Compare Source

  • Fixed regression introduced in 0.48.7 where parens around operator literals were incorrectly removed

v0.48.7

Compare Source

  • Fixed bug where redundantParens rule could introduce an ambiguity by removing parens around a range argument
  • Fixed bug where unowned(unsafe) capture argument would be mangled by unusedArguments rule
  • Fixed spurious double-indenting of trailing closures in some cases

v0.48.6

Compare Source

  • Fixed bug where actor variables were incorrectly interpreted as a keyword in certain cases
  • The redundantBackticks rule no longer removes required backticks around actor properties
  • Doc comments c

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.


  • 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 force-pushed the renovate/nicklockwood-swiftformat-0.x branch from b74eb29 to 2a97f6e Compare March 17, 2024 12:16
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.53.4 Update dependency nicklockwood/SwiftFormat to v0.53.5 Mar 17, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 2a97f6e to ffb9e84 Compare April 11, 2024 07:41
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.53.5 Update dependency nicklockwood/SwiftFormat to v0.53.6 Apr 11, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from ffb9e84 to 78a873b Compare April 14, 2024 12:38
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.53.6 Update dependency nicklockwood/SwiftFormat to v0.53.7 Apr 14, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 78a873b to b470e58 Compare April 23, 2024 01:47
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.53.7 Update dependency nicklockwood/SwiftFormat to v0.53.8 Apr 23, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from b470e58 to 74fa657 Compare May 12, 2024 22:53
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.53.8 Update dependency nicklockwood/SwiftFormat to v0.53.9 May 12, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 74fa657 to 1934c03 Compare May 18, 2024 18:23
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.53.9 Update dependency nicklockwood/SwiftFormat to v0.53.10 May 18, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 1934c03 to 4fdd928 Compare June 11, 2024 09:58
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.53.10 Update dependency nicklockwood/SwiftFormat to v0.54.0 Jun 11, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 4fdd928 to 32fd294 Compare July 10, 2024 20:32
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.54.0 Update dependency nicklockwood/SwiftFormat to v0.54.1 Jul 10, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 32fd294 to 37b7bcd Compare July 22, 2024 10:45
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.54.1 Update dependency nicklockwood/SwiftFormat to v0.54.2 Jul 22, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 37b7bcd to 55e140d Compare July 28, 2024 18:23
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.54.2 Update dependency nicklockwood/SwiftFormat to v0.54.3 Jul 28, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 55e140d to 02f84cd Compare September 7, 2024 01:12
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.54.3 Update dependency nicklockwood/SwiftFormat to v0.54.4 Sep 7, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 02f84cd to df552de Compare September 11, 2024 21:57
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.54.4 Update dependency nicklockwood/SwiftFormat to v0.54.5 Sep 11, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from df552de to 264159a Compare October 8, 2024 19:57
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.54.5 Update dependency nicklockwood/SwiftFormat to v0.54.6 Oct 8, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 264159a to 73165cd Compare November 16, 2024 21:33
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.54.6 Update dependency nicklockwood/SwiftFormat to v0.55.0 Nov 16, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 73165cd to 41c13b5 Compare November 21, 2024 00:22
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.55.0 Update dependency nicklockwood/SwiftFormat to v0.55.1 Nov 21, 2024
@renovate renovate bot force-pushed the renovate/nicklockwood-swiftformat-0.x branch from 41c13b5 to 52ccc42 Compare November 24, 2024 09:29
@renovate renovate bot changed the title Update dependency nicklockwood/SwiftFormat to v0.55.1 Update dependency nicklockwood/SwiftFormat to v0.55.2 Nov 24, 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