-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add customizable key to disable checks customization for certain checks #550
Conversation
0e02b70
to
7fbbec0
Compare
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.
Thanks Eugen, just a couple of comments.
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.
@EMaksy One comment.
I see that the customizable
field is check wide.
This means, that you cannot make one value customizable and other not.
Did you consider adding this field to the values
entries?
0319781
to
36e3bd8
Compare
@arbulu89 just reworked that part 👍 and added additional docs |
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.
Noice! Just a couple of adjustments.
guides/specification.md
Outdated
Built-in checks are considered **customizable** by **default**, so the `customizable` flag disables customization for a particular check. | ||
|
||
The customizability flag can be set global in the check and|or in [values](#customizable-values). | ||
When both levels are set, the **global** flag takes **precedence**, overriding any value-level customizability. |
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.
When both levels are set, the **global** flag takes **precedence**, overriding any value-level customizability. | |
When customization is globally disabled for a check, that is it has been marked with `customizable: false`, it overrides any values specifics, otherwise specific values customizability is considered. |
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 split it up into two sentences. I hope this is a bit easier for the reader :)
But do we need both versions (general and value specific)? Edit: Anyway, up to you. Having both satisfies what I commented as well |
@arbulu89 |
The thing to enable things that are not permitted looks like a conundrum XD |
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.
Let's go with this initial version
Description
This PR is one of the first steps to enable users to customize checks.
It adds a new key "customization" for checks. By default all checks with values are customization.
In order to disable this behavior it needs to be explicitly set to false .
This is needed to disable checks like 3A59DC as changing it's value may cause issues.
To Do:
After merging this we need to update tlint repo reference to the new reference.