-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
make SwiftLintViolation properties public #377
make SwiftLintViolation properties public #377
Conversation
public internal(set) var reason: String | ||
public internal(set) var line: Int | ||
public internal(set) var severity: Severity | ||
public internal(set) var file: String | ||
|
||
var messageText: String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this also can be public 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is mainly for the PR message, so given they are automatically posted I think this can stay internal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR, I think this is a reasonable change, we are returning the violations so makes sense to make them usable
public internal(set) var reason: String | ||
public internal(set) var line: Int | ||
public internal(set) var severity: Severity | ||
public internal(set) var file: String | ||
|
||
var messageText: String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is mainly for the PR message, so given they are automatically posted I think this can stay internal
In our project, we use swiftlint to flag todos as warnings in addition to style warnings. For todos, we have a limit of ~10 before we want to block the build, while we don't want any style / compiler warnings allowed, so I'd like to write a danger rule like so:
but currently cannot as
ruleID
is markedinternal