-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change excludingSyntaxKinds for VerticalWhitespaceBetweenCasesRule.swift #5612
Labels
bug
Unexpected and reproducible misbehavior.
good first issue
Issue to be taken up by new contributors yet unfamiliar with the project.
Comments
What's an example that would work correctly with this change? |
SimplyDanny
added
the
discussion
Topics that cannot be categorized as bugs or enhancements yet. They require further discussions.
label
Jun 12, 2024
Currently running the fix argument against a file such as: import Foundation
enum TestCase: String {
case one = "1"
case two = "2"
case three = "3"
var caseToString: String {
switch self {
case .one:
return "one"
case .two:
return "two"
case .three:
return "three"
}
}
var rawToString: String {
switch rawValue {
case "1":
return "one"
case "2":
return "two"
case "3":
return "three"
}
}
} does not change anything. With the above change to only exclude import Foundation
enum TestCase: String {
case one = "1"
case two = "2"
case three = "3"
var caseToString: String {
switch self {
case .one:
return "one"
case .two:
return "two"
case .three:
return "three"
}
}
var rawToString: String {
switch rawValue {
case "1":
return "one"
case "2":
return "two"
case "3":
return "three"
}
}
} |
Would you like to open a PR to fix this, @ilendemli? |
SimplyDanny
added
bug
Unexpected and reproducible misbehavior.
good first issue
Issue to be taken up by new contributors yet unfamiliar with the project.
and removed
discussion
Topics that cannot be categorized as bugs or enhancements yet. They require further discussions.
labels
Jun 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Unexpected and reproducible misbehavior.
good first issue
Issue to be taken up by new contributors yet unfamiliar with the project.
Hi I was applying this ruleset and saw it skip some parts of my code
Regarding this:
SwiftLint/Source/SwiftLintBuiltInRules/Rules/Style/VerticalWhitespaceBetweenCasesRule.swift
Line 6 in b42f6ff
I think it should also apply for String cases and only exclude
SyntaxKind.commentKinds
The text was updated successfully, but these errors were encountered: