Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
NPathComplexityCheck: set of tokens should not be customizable by user #3797
This check can not work with reliably if user can change set of TokenTypes, if user miss QUESTION in config, algorithm will work incorrectly. So user should now have ability to change this.
Current code is:
Looks like the intend was to let user control on what blocks of code to run Check: on methods, on ctors, on static initializations, or instance init. But in this case all other tokens should be hardcoded in Check and Check need to walk on them itself.
We should not continue that intend (code is not doing this even now) and user should not have ability to control tokens set, so all methods should call getAcceptableTokens.