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
Negative numbers (except for -1) will trigger the no_magic_numbers - e.g. case negative = -2. Equivalent positive numbers (e.g. 2) are fine.
Complete output when running SwiftLint, including the stack trace and command used
swiftlint lint Example.swift --enable-all-rules
Linting Swift files at paths Example.swift
Linting 'Example.swift' (1/1)
The `anyobject_protocol` rule is now deprecated and will be completely removed in a future release.
./Example.swift:3:22: warning: No Magic Numbers Violation: Magic numbers should be replaced by named constants. (no_magic_numbers)
Done linting! Found 1 violation, 0 serious in 1 file.
Environment
SwiftLint version (run swiftlint version to be sure)? 0.50.3
Installation method used (Homebrew, CocoaPods, building from source, etc)? Portable
Which Xcode version are you using (check xcodebuild -version)? 14.2
Do you have a sample that shows the issue?echo "internal enum Example {\n case positive = 2\n case negative = -2\n}" | swiftlint lint --no-cache --use-stdin --enable-all-rules
New Issue Checklist
Describe the bug
Negative numbers (except for -1) will trigger the
no_magic_numbers
- e.g.case negative = -2
. Equivalent positive numbers (e.g.2
) are fine.Complete output when running SwiftLint, including the stack trace and command used
Environment
SwiftLint version (run
swiftlint version
to be sure)? 0.50.3Installation method used (Homebrew, CocoaPods, building from source, etc)? Portable
Paste your configuration file: None
Are you using nested configurations? No
Which Xcode version are you using (check
xcodebuild -version
)? 14.2Do you have a sample that shows the issue?
echo "internal enum Example {\n case positive = 2\n case negative = -2\n}" | swiftlint lint --no-cache --use-stdin --enable-all-rules
The text was updated successfully, but these errors were encountered: