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
Given the following code, let_var_whitespace will fire at lines 4 and 8.
internal struct Foo {
@Flag(name: [.long, .customLong("autocorrect")], help: "Correct violations whenever possible.")
internal var fix = false
@Flag(help: """
Should reformat the Swift files using the same mechanism used by Xcode (via SourceKit).
Only applied with `--fix`/`--autocorrect`.
""")
internal var format = false
@Flag(help: "Use an alternative algorithm to exclude paths for `excluded`, which may be faster in some cases.")
internal var useAlternativeExcluding = false
}
This code is actually from LintOrAnalyzeArguments.swift
Complete output when running SwiftLint, including the stack trace and command used
% swiftlint lint --no-cache --enable-all-rules Foo.swift
Linting Swift files at paths Foo.swift
Linting 'Foo.swift' (1/1)
The `anyobject_protocol` rule is now deprecated and will be completely removed in a future release.
/tmp/Foo.swift:3:14: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
/tmp/Foo.swift:8:14: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
/tmp/Foo.swift:10:14: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
/tmp/Foo.swift:4:5: warning: Variable Declaration Whitespace Violation: Let and var should be separated from other statements by a blank line. (let_var_whitespace)
/tmp/Foo.swift:8:5: warning: Variable Declaration Whitespace Violation: Let and var should be separated from other statements by a blank line. (let_var_whitespace)
Done linting! Found 5 violations, 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)? Homebrew
Paste your configuration file:
none
Are you using nested configurations?
If so, paste their relative paths and respective contents.
no
Which Xcode version are you using (check xcodebuild -version)?
Xcode 14.2
Build version 14C18
Do you have a sample that shows the issue? Run echo "[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 use swiftlint lint --path [file here] --no-cache --enable-all-rules.
See above.
The text was updated successfully, but these errors were encountered:
New Issue Checklist
Describe the bug
Given the following code,
let_var_whitespace
will fire at lines 4 and 8.This code is actually from LintOrAnalyzeArguments.swift
Complete output when running SwiftLint, including the stack trace and command used
Environment
swiftlint version
to be sure)? 0.50.3none
If so, paste their relative paths and respective contents.
no
xcodebuild -version
)?echo "[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 use
swiftlint lint --path [file here] --no-cache --enable-all-rules
.See above.
The text was updated successfully, but these errors were encountered: