-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Support multi-file validation FileSet Modules in Checkstyle #3540
Comments
Oh.This issue is quite interesting and challenging.What is interesting for me,can we consider this issue like an idea for GSOC? |
@GitToasterhub , please stay off issues that do not have "approved" label. GSoC have only doable and clear tasks that has to be done and merged to repo on the moment of GSoC completion. List of GSoC projects will not be changed. |
additional problem is multi file support is that when all violations are collected from file and put them to loggers. in case of XML logger, it opens and close but it works like this for many many probably it is not a problem at all, it is like this for 10 years - https://github.com/checkstyle/checkstyle/blame/1cc3442facbbe8e62806996a4bacd92e809ff9a9/src/main/java/com/puppycrawl/tools/checkstyle/Checker.java#L293. |
This can be seen for TranslationCheck as it is already doing this. |
After long thoughts ..... I am ok to extend checkstyle to be multi-file validator, as for now only text processing (no class-path), only for FileSetChecks (TreeWalker should not be changed, and should stay single file module). some details of current hacks are at #4869 (comment) @rnveach , if you are agree, please feel free to make issue as approved. |
#3539 also needs to be solved for full multi-file support, otherwise the cache will either hide violations or create false violations.
Why not include Checks too? It won't be much to handle them too.
As a multi-file module, it is the job the FileSet/Check to call |
I posted proposal for solution in issue #3539
lets grow functionality step by step. For now we need only FileSet. Multifile mode force API to change. Lets change it on this level first and see what other conner case we forgot.
yes, this requirement as we converting Checkstyle to multi-file mode so violation should have file on which is fired.
Checker already do
so we will do:
no more need for @rnveach am I missing smth ? |
No that is everything.
This is similar to how I have implemented and there hasn't been any issues. |
for FileSet Check yes. if you agree, please label issue as approved. |
I was referring to both. Java is no different then non-Java. |
This issue is blocked by cache usage discussion at #3539. |
Adding support will need to handle exceptions properly as seen in #6340 (comment) . Checker should handle exceptions itself like it does for non-multi-file checks and not require the checks to change them into violations. Halt on exception should be looked into for this too. |
Right now Checkstyle is single-file validation tool, with cache that heavily depends on this design pattern.
We need to find solution to support multi-file validation Checks.
The text was updated successfully, but these errors were encountered: