You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I exclude the identifier_name no, all other excluded variable names are ignored.
Source
leta=1letno=2letb=3
.swiftlint.yml
identifier_name:
excluded:
- a
- no #Commenting this line will cause a,b to be excluded
- b
Using this swift lint file causes a, no, and b to be marked as violations.
$ swiftlint lint
Loading configuration from '.swiftlint.yml'
Linting Swift files in current working directory
Linting 'test.swift' (1/1)
/Users/craig/Desktop/SwiftLintTest/test.swift:1:1: error: Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'a' (identifier_name)
/Users/craig/Desktop/SwiftLintTest/test.swift:2:1: warning: Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'no' (identifier_name)
/Users/craig/Desktop/SwiftLintTest/test.swift:3:1: error: Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'b' (identifier_name)
Done linting! Found 3 violations, 2 serious in 1 file.
Commenting out the no exclusion in the swift lint file allows a, and b to be ignored properly.
$ swiftlint lint
Loading configuration from '.swiftlint.yml'
Linting Swift files in current working directory
Linting 'test.swift' (1/1)
/Users/craig/Desktop/SwiftLintTest/test.swift:2:1: warning: Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'no' (identifier_name)
Done linting! Found 1 violation, 0 serious in 1 file.
Also tried wrapping the names in the swift lint file in both double and single quotes but that had no effect.
The text was updated successfully, but these errors were encountered:
Using version 0.19.0. Worked fine in 0.17.0.
When I exclude the identifier_name
no
, all other excluded variable names are ignored.Source
.swiftlint.yml
Using this swift lint file causes
a
,no
, andb
to be marked as violations.Commenting out the
no
exclusion in the swift lint file allowsa
, andb
to be ignored properly.Also tried wrapping the names in the swift lint file in both double and single quotes but that had no effect.
The text was updated successfully, but these errors were encountered: