-
Notifications
You must be signed in to change notification settings - Fork 231
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
Allow to customize severity of Rules #879
Comments
In order to customize the severity of rules, I added the possibility to do so via the configuration files. If no severity is specified, we use the one pre-determined by the Rule itself. Example: ``` { "ruleSeverity": { "AlwaysUseLowerCamelCase": "warning", "AmbiguousTrailingClosureOverload": "error", } } ``` Issue: swiftlang#879
Synced to Apple’s issue tracker as rdar://140346103 |
In order to customize the severity of rules, I added the possibility to do so via the configuration files. If no severity is specified, we use the one pre-determined by the Rule itself. Example: ``` { "ruleSeverity": { "AlwaysUseLowerCamelCase": "warning", "AmbiguousTrailingClosureOverload": "error", } } ``` Issue: swiftlang#879
#626 is a related issue; it talks about a different idea (allowing format rules to be configured to turn off the changes they would make but still emit findings), but it also discusses the idea of leveraging that configuration to do things like change the severity. I'm inclined to leave this issue open though since the severity thing is more of an aside in that issue. |
In order to check during CI for propper formatting, it is now also possible to specify severity for the formating rules. Issue: swiftlang#879
In order to customize the severity of rules, I added the possibility to do so via the configuration files. If no severity is specified, we use the one pre-determined by the Rule itself. Example: ``` { "rules": { "AlwaysUseLowerCamelCase": "warning", "AmbiguousTrailingClosureOverload": "error", "UseLetInEveryBoundCaseVariable": "true", // use rule default "UseWhereClausesInForLoops": "false", // disabled } } ``` In addition, one can now control how pretty-print violations should be treated in the same way Example: ``` { "rules": { "TrailingComma": "warning", "LineLength": "error", "Indentation": "true", // use rule default "TrailingWhitespace": "false", // disabled } } ``` Issue: swiftlang#879
In order to customize the severity of rules, I added the possibility to do so via the configuration files. If no severity is specified, we use the one pre-determined by the Rule itself. Example: ``` { "rules": { "AlwaysUseLowerCamelCase": "warning", "AmbiguousTrailingClosureOverload": "error", "UseLetInEveryBoundCaseVariable": "true", // use rule default "UseWhereClausesInForLoops": "false", // disabled } } ``` In addition, one can now control how pretty-print violations should be treated in the same way Example: ``` { "rules": { "TrailingComma": "warning", "LineLength": "error", "Indentation": "true", // use rule default "TrailingWhitespace": "false", // disabled } } ``` Issue: swiftlang#879
In order to customize the severity of rules, I added the possibility to do so via the configuration files. If no severity is specified, we use the one pre-determined by the Rule itself. Example: ``` { "rules": { "AlwaysUseLowerCamelCase": "warning", "AmbiguousTrailingClosureOverload": "error", "UseLetInEveryBoundCaseVariable": "true", // use rule default "UseWhereClausesInForLoops": "false", // disabled } } ``` In addition, one can now control how pretty-print violations should be treated in the same way Example: ``` { "rules": { "TrailingComma": "warning", "LineLength": "error", "Indentation": "true", // use rule default "TrailingWhitespace": "false", // disabled } } ``` Issue: swiftlang#879
In order to customize the severity of rules, I added the possibility to do so via the configuration files. If no severity is specified, we use the one pre-determined by the Rule itself. Example: ``` { "rules": { "AlwaysUseLowerCamelCase": "warning", "AmbiguousTrailingClosureOverload": "error", "UseLetInEveryBoundCaseVariable": "true", // use rule default "UseWhereClausesInForLoops": "false", // disabled } } ``` In addition, one can now control how pretty-print violations should be treated in the same way Example: ``` { "rules": { "TrailingComma": "warning", "LineLength": "error", "Indentation": "true", // use rule default "TrailingWhitespace": "false", // disabled } } ``` Issue: swiftlang#879
At the moment there is no way to way to customize the severity of a rule. There is a TODO already in the code for that, but I cannot find the associated issue.
The text was updated successfully, but these errors were encountered: