-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
bugUnexpected and reproducible misbehavior.Unexpected and reproducible misbehavior.
Description
New Issue Checklist
- Updated SwiftLint to the latest version
- I searched for existing GitHub issues
Describe the bug
If I have a function containing a compiler directive and a function below that should trigger the opening brace rule, it gets missed.
Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint
Linting Swift files in current working directory
Linting 'TestFile.swift' (1/1)
Done linting! Found 0 violations, 0 serious in 1 file.
Environment
-
SwiftLint version: 0.44.0
-
Installation method used: Downloaded from the
portable_swiftlint.zip
from the 0.44.0 release tag -
Paste your configuration file: None/default/anything with
opening_brace
enabled -
Are you using nested configurations? No
-
Which Xcode version are you using? 12.5.1 (although not relevant)
-
Do you have a sample that shows the issue?
class TestFile {
func problemFunction() {
#if DEBUG
#endif
}
func openingBraceViolation()
{
print("Brackets")
}
}
The openingBraceViolation
function does not trigger the opening_brace rule as expected.
Metadata
Metadata
Assignees
Labels
bugUnexpected and reproducible misbehavior.Unexpected and reproducible misbehavior.