Closed rcritz closed 3 years ago
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!
You need to escape [
and ]
. I suggest using something like https://rubular.com to validate your regex against several input examples.
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!
New Issue Checklist
Describe the bug
Custom rule correctly detects a violation in the source file but flags line 1 rather than the actual violation.
Complete output when running SwiftLint, including the stack trace and command used
Environment
swiftlint version
to be sure)? 0.40.0xcodebuild -version
)? 11.5echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules
to quickly test if your example is really demonstrating the issue. If your example is more complex, you can useswiftlint lint --path [file here] --no-cache --enable-all-rules
.Flags the error on line 1 rather than line 4.