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

TAP formatter only display one message per file. #4975

Closed
SimonDegraeve opened this Issue Jan 16, 2016 · 7 comments

Comments

Projects
None yet
4 participants
@SimonDegraeve
Copy link
Contributor

SimonDegraeve commented Jan 16, 2016

Version :
1.10.3

File to lint :

var a = 'foo';
var b = 'bar';

Configuration :

{
  "extends": "airbnb"
}

Result with default formatter:

/my/path/test.js
  1:1  error  Unexpected var, use let or const instead  no-var
  1:5  error  "a" is defined but never used             no-unused-vars
  2:1  error  Unexpected var, use let or const instead  no-var
  2:5  error  "b" is defined but never used             no-unused-vars

✖ 4 problems (4 errors, 0 warnings)

Result with TAP formatter:

TAP version 13
1..1
not ok 1 - /my/path/test.js
  ---
  message: 'Unexpected var, use let or const instead.'
  severity: error
  data:
    line: 1
    column: 1
    ruleId: no-var
  messages:
    - message: '"b" is defined but never used'
      severity: error
      data:
        line: 2
        column: 5
        ruleId: no-unused-vars
  ...

Problem:

The TAP formatter swallow messages and only display the first and the last one.

@eslintbot

This comment has been minimized.

Copy link

eslintbot commented Jan 16, 2016

@SimonDegraeve Thanks for the issue! If you're reporting a bug, please be sure to include:

  1. The version of ESLint you are using (run eslint -v)
  2. What you did (the source code and ESLint configuration)
  3. The actual ESLint output complete with numbers
  4. What you expected to happen instead

Requesting a new rule? Please see Proposing a New Rule for instructions.

@eslintbot eslintbot added the triage label Jan 16, 2016

@ilyavolodin

This comment has been minimized.

Copy link
Member

ilyavolodin commented Jan 16, 2016

Can you provide console output with a TAP formatter please?

@ilyavolodin ilyavolodin added bug core evaluating and removed triage labels Jan 16, 2016

@SimonDegraeve

This comment has been minimized.

Copy link
Contributor Author

SimonDegraeve commented Jan 17, 2016

I updated the first comment with the TAP output.

@nzakas

This comment has been minimized.

Copy link
Member

nzakas commented Jan 17, 2016

Can you provide some narrative around what's going on? What does before and after mean? Before and after what?

Also, what version are you using? (Did you see #4975 (comment) ?)

@SimonDegraeve

This comment has been minimized.

Copy link
Contributor Author

SimonDegraeve commented Jan 18, 2016

Sorry about the lack of informations. I updated the issue.

@ilyavolodin

This comment has been minimized.

Copy link
Member

ilyavolodin commented Jan 18, 2016

Looks like an obvious bug, especially based on the PR changes.

@ilyavolodin ilyavolodin added accepted and removed evaluating labels Jan 18, 2016

@SimonDegraeve

This comment has been minimized.

Copy link
Contributor Author

SimonDegraeve commented Jan 18, 2016

Indeed. I was even a bit confused to see how easy it was to fix... almost to good to be true ;-)

@nzakas nzakas closed this in b8fbaa0 Jan 18, 2016

nzakas added a commit that referenced this issue Jan 18, 2016

Merge pull request #4972 from SimonDegraeve/tap-formatter
Fix: multiple message in TAP formatter (fixes #4975)

@eslint eslint bot locked and limited conversation to collaborators Feb 6, 2018

@eslint eslint bot added the archived due to age label Feb 6, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.