Skip to content
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

New: Add classname attribute to JUnit testcase (refs #11068) #11683

Merged
merged 3 commits into from May 27, 2019

Conversation

hspazio
Copy link
Contributor

@hspazio hspazio commented May 7, 2019

What is the purpose of this pull request? (put an "X" next to item)
This PR is a follow up from the discussion in issue #11068.
With this change we are adding classname attribute to the <testcase> item.

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain: Add new attribute to JUnit formatter

What changes did you make? (Give an overview)

The value of classname is defined as the file path without extension.
Similar implementation to TSlint: palantir/tslint#4327

example:

<?xml version="1.0" encoding="utf-8"?>
<testsuites>
  <testsuite package="org.eslint" time="0" tests="1" errors="1" name="/path/to/foo.js">
    <testcase time="0" name="org.eslint.foo" classname="/path/to/foo">
      <failure message="Unexpected foo.">
        <![CDATA[line 5, col 10, Error - Unexpected foo. (foo)]]>
      </failure>
    </testcase>
  </testsuite>
</testsuites>

Is there anything you'd like reviewers to focus on?

Does this schema also need to be updated? https://eslint.org/docs/user-guide/formatters/#junit

@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label May 7, 2019
@jsf-clabot
Copy link

jsf-clabot commented May 7, 2019

CLA assistant check
All committers have signed the CLA.

@not-an-aardvark not-an-aardvark added accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly formatter Relates to the formatters bundled with ESLint and removed triage An ESLint team member will look at this issue soon labels May 11, 2019
tigefa4u pushed a commit to tigefa4u/gitlabhq that referenced this pull request May 17, 2019
tigefa4u pushed a commit to tigefa4u/gitlabhq that referenced this pull request May 17, 2019
@hspazio
Copy link
Contributor Author

hspazio commented May 22, 2019

@not-an-aardvark @platinumazure Is there anything missing with this PR that I can help? Thank you.

Copy link
Member

@platinumazure platinumazure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! I would like another team member (or more than one) to review before merging.

Copy link
Member

@ilyavolodin ilyavolodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks good to me. Can you rebase on the latest master please?

@hspazio hspazio force-pushed the add-classname-to-junit-testcase branch from 9a5e73c to a7449e9 Compare May 27, 2019 14:39
@hspazio
Copy link
Contributor Author

hspazio commented May 27, 2019

Thank you @ilyavolodin. Rebased.

@ilyavolodin ilyavolodin merged commit d662b17 into eslint:master May 27, 2019
@dosuken123
Copy link

Awesome! @hspazio

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Nov 24, 2019
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Nov 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly formatter Relates to the formatters bundled with ESLint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants