0.50300.0
This release is compatible with Swift 5.3.
Significant changes since the last release:
- Support is added for rules to be opt-in rather than on-by-default. (40bab4e)
- The following rules have been made opt-in, because they are either too strict for many real-world use cases or are not yet correct enough to enable universally. Existing configuration files will not be affected, but when using the default configuration, these rules will be off by default: (1c2a5a2, 642c2d1)
AllPublicDeclarationsHaveDocumentation
NeverForceUnwrap
NeverUseForceTry
NeverUseImplicitlyUnwrappedOptionals
NoLeadingUnderscores
ValidateDocumentationComments
- Improvements to
AlwaysUseLowerCamelCase
:- It is now applied to closure arguments and variables bound in
if/guard let
patterns. (7867cda) - Diagnostics are now clearer about the kind of declaration affected. (97628a8)
- Functions that look like test case methods are excluded; for example, to support common naming schemes like
testSomeObject_inSomeState_actsSomeWay
. (9080762)
- It is now applied to closure arguments and variables bound in
- Improvements to
ValidateDocumentationComments
: - Multiple trailing closures are formatted. (e286081)
- Fix a crash when linting a collection literal with single element and a trailing comma. (483580f)
- Fixed invalid locations in some diagnostics. (ea02880)
- Keep
try
keyword next to the expression following it whenever possible, only breaking between them when necessary. (35fdb4f) - Recursively apply
NoParensAroundCondition
to pick up nested occurrences. (ed45527) - Do not remove semicolons between a
do
block and awhile
block. (cb4e621) - Fix some situations where
OneVariableDeclarationPerLine
would incorrectly break declarations. (2b4364b) - Add a
indentSwitchCaseLabels
configuration option to control whethercase
statements inside aswitch
are indented. (2107603) - Speed and memory usage improvements when formatting and linting.