Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support a "is_global" and "is_private" member on Rules. (#130)
* Support a "is_global" and "is_private" member on Rules. When writing linters it is currently impossible to know (via rule introspection) if a given rule is private or global. We have banned global rules for our use case and we have to resort to a janky regex against our rules files to know if anyone is about to commit a global rule. I figure exposing these two flags via python will be useful for programatically checking those bits. I'm not very pleased with the name "is_global" - I wanted to go with just "global" and "private" but "global" is a reserved keyword and rule.global breaks the python interpreter. I'm open to changing the member names if you have any suggestions. * Decrement reference counts on global and private. * Update global and private checks after API changes.
- Loading branch information