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
Split and Organize Checkstyle inputs by Test #3891
Taken from #3887 (comment)
It makes it hard to review changes to one Check when multiple Checks are using the same input file and users modify that one file. It makes sense, imo, to add new stuff to an existing input file for simple fixes instead of always creating a new one.
We already restrict inputs to only be used by tests in a single folder. We should take this further and restrict inputs to a single test so no 2 tests use the same input file.
Each PR should be one single Test class and it's inputs for quicker review, unless an admin has specified otherwise.
We should start by renaming all inputs to
Each test's inputs should be alone in their own directory. If Test was in directory
We expect no changes to the test's expected violation positions (line or column number). If that does happen because of any of the requested changes, then some of the changes need to be undone.
Once all inputs are renamed, we should see if we can use sevntu's Test to verify all current and future inputs are named after their tests and we have no isolated inputs. https://github.com/sevntu-checkstyle/sevntu.checkstyle/blob/master/sevntu-checks/src/test/java/com/github/sevntu/checkstyle/internal/AllChecksTest.java#L111
Very good ideas as for me. It is really annoying to read a huge input file for a test especially when there is a mixed content (two check's options use the same file, etc).
By the way, if we have individual input file for each test, we can add
This was referenced
Mar 2, 2017
Small update to issue to describe that
Originally I thought this was ok, but the downside to this is we won't have the same input file for different runs with different properties of the check. We could see something by turning properties on/off on same file.