-
Notifications
You must be signed in to change notification settings - Fork 8
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
Deactivation of style checks #1079
Comments
It seems to me that the CLI switch fits best for prototyping, and the comments are best for generated code. Ideally we would have both solutions then. A way to make the comments work for prototyping would be to have a single comment at the top of the file that disables all style checking. |
I have found the "pragma style" proposed in the snippet a bit misleading, since What about: Untagged_Value_data_trap_Value_specific_trap_Untagged_Length : Prelude::Asn_Length
then Untagged_Value_data_trap_Value_specific_trap_Untagged_Value
with Size => Untagged_Value_data_trap_Value_specific_trap_Untagged_Length * 8;
-- style: disable-next = line-too-long
Untagged_Value_data_get_next_request_Value_variable_bindings_Untagged_Value : RFC1157_SNMP::Asn_Raw_SEQUENCE_OF_VarBind
then null; See also: |
@rami3l The example just shows one example for disabling style checks on a block level. The description of O2 explicitly mentions that the checks could also be disabled for single lines or the whole file, similarly as it is done with pylint. The |
@treiher I had carefully read the description for O2 and the I just wanted to point out that:
|
Context and Problem Statement
In some cases, the style checks cannot be fulfilled or it is not intended to fulfill all style checks. In such cases, it should be possible to disable certain style checks.
Use Cases
UC1: Generated specifications
In particular, the line length checks cannot be guaranteed in all cases.
UC2: Protyping
During prototyping, the style checks could be annoying.
Considered Options
O1 Global deactivation of style checks (e.g., by CLI option)
− No differentiation between different files possible (e.g., manually written specification vs. generated specification)
O2 Local deactivation using comments
Specific style checks can be disabled using comments on a file level, block level or line level similar to the messages control of pylint.
All checks can be disabled using
style: disable = all
.Example
+ Flexible
Decision Outcome
O2 (initially, only support
style:
tag at the beginning of the file)The text was updated successfully, but these errors were encountered: