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

Fix: Manage severity of 1 with TAP reporter (fixes #11110) #11221

Merged
merged 1 commit into from Jan 16, 2019

Conversation

GabrielCousin
Copy link
Contributor

@GabrielCousin GabrielCousin commented Dec 29, 2018

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update
[X] 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
[ ] Other, please explain:

What changes did you make? (Give an overview)
As reported in #11110, result with severity of 1 (ie. warning) were reported as errors (not ok)
This will allow:

  • a result with one or many messages and all of them are of severity of 1 to be ok
  • a result with many message with both severity of 1 and 2 to be still not ok

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

@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Dec 29, 2018
@platinumazure platinumazure added bug ESLint is working incorrectly accepted There is consensus among the team that this change meets the criteria for inclusion formatter Relates to the formatters bundled with ESLint and removed triage An ESLint team member will look at this issue soon labels Dec 29, 2018
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.

Thanks for contributing! I've identified one typo.

I also have two other thoughts:

  1. The string "not ok" does have the string "ok" in it, so do we want to be more specific about asserting that the formatter does not say "not ok"? (If a message says "not ok", then assert.include(message, "ok") will still be true, so any regression might not be caught!)
  2. Are there tests which show results for all errors, or a mix of warnings and errors? For the latter, I think I would expect a change (ok on warnings, not ok on errors), so it seems a new test should be added.

Let me know if you have any questions. Thanks again for working on this!

}]
}];

it("should return a an warning string", () => {
Copy link
Member

Choose a reason for hiding this comment

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

Typo: a an

When using TAP reporter, both messages with severity of 1 or 2 were listed as errors (`not ok`). This changes aims at reporting warnings as `ok` messages.
@GabrielCousin
Copy link
Contributor Author

Thanks for your feedback! First point must be fixed :)
Unless I misunderstood your 2nd point, I think those cases are already covered with:

@not-an-aardvark
Copy link
Member

not-an-aardvark commented Jan 4, 2019

@platinumazure Friendly ping; has your feedback been addressed?

@nzakas nzakas merged commit 9194f45 into eslint:master Jan 16, 2019
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jul 16, 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 Jul 16, 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

4 participants