-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
JUnit formatter should output passing <test> entries for rules that pass #9843
Comments
Does the formatter need to expose a test element per rule per file? Or just one passing test per suite/file? Having a test element for every file sounds verbose to me, but I don't know JUnit. |
What about putting just one “linting passed” test in the suite if the file has no errors or warnings? |
Note: I mistakenly wrote It seems cleaner (and yes, verbose) to me to have a Glancing at the code in #9094, it looks like there's a A single passing |
@brettdh Would it be possible to link to a section of the JUnit specification (if there is one) to describe the correct behavior here? I'm honestly wondering if we should have only one testcase per rule per file even on failure (and put multiple error messages in a description, or assertion/failure, or something), and then have one testcase with no failures to indicate success... |
That would make test results a lot less useful. Tools like Jenkins and CircleCI use the individual test cases to track failures over time by testcase name, and they assume a A quick google search turns up lots of possible specs (including some XSD files). Not sure if any are authoritative. Maybe one of these? |
Thanks for your interest in improving ESLint. Unfortunately, it looks like this issue didn't get consensus from the team, so I'm closing it. We define consensus as having three 👍s from team members, as well as a team member willing to champion the proposal. This is a high bar by design -- we can't realistically accept and maintain every feature request in the long term, so we only accept feature requests which are useful enough that there is consensus among the team that they're worth adding. Since ESLint is pluggable and can load custom formatters at runtime, the lack of consensus among the ESLint team doesn't need to be a blocker for you using this in your project, if you'd find it useful. It just means that you would need to implement the formatter yourself, rather than using a bundled formatter that is packaged with ESLint. |
Related: #9093, #9094
#9094 introduced junit output for the all-rules-passing case, which fixed a problem with Jenkins. However, CircleCI displays no test summary for eslint if the Junit XML contains only empty
<testsuite>
s and no<test>
s.Tell us about your environment
What did you expect to happen?
A non-zero number of (passing)
<test>
s in the XML output - one per rule per file (<testsuite>
).What actually happened? Please include the actual, raw output from ESLint.
Many
<testsuite>
s, all of which contained zero<test>
s.The text was updated successfully, but these errors were encountered: