Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Improve error output #453

Closed
markelog opened this issue Jun 18, 2014 · 13 comments
Closed

Improve error output #453

markelog opened this issue Jun 18, 2014 · 13 comments

Comments

@markelog
Copy link
Member

Recent release of 1.5.0 showed, on my opinion, that we need to improve error output, either provide warning module or adapt current error module API (rename maybe) to show notifications/warnings, without line and column number.

Also this change is required for #238 issue, just like it might beneficial for plugins and rules notification.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@mikesherov mikesherov added this to the 1.6 milestone Jun 24, 2014
@mikesherov mikesherov modified the milestone: 1.6 Jun 24, 2014
@mikesherov
Copy link
Contributor

@markelog, for something like #238 it's easy to adapt the current error output simply number truncating the error array.

However, the overall problem stems from the fact that most tools simply read the output of one of the error formats, all of which assume line and column. I'm not sure we can get away from reporting dropped rules in the normal error output without breaking the world.

Thoughts?

@markelog
Copy link
Member Author

it's easy to adapt the current error output simply number truncating the error array

It's an easy way yes, but i was thinking that we need a correct message for it, if we would output say 100 errors when there could be a thousand, without any message, user would thought that we found only 100 errors in total, he would fix one, and still get a 100 errors, he would fix 10 and... you get the picture, whereas people might not look in doc for it, similar to a problem we have with nulling rules of the preset.

I'm not sure we can get away from reporting dropped rules in the normal error output without breaking the world

2.0 and break stuff, like in Limp Bizkit song

@mikesherov
Copy link
Contributor

It's an easy way yes, but i was thinking that we need a correct message for it, if we would output say 100 errors when there could be a thousand,

But the default would be show all errors. Only by specifying a max would the user be seeing a possibly truncated list. But I get what you're saying.

@mikesherov mikesherov modified the milestones: 1.6, 2.0 Jul 28, 2014
@SgtPooki
Copy link

Are there any issues open or talks or plans for doing some sort of summarized report?

I would love to be able to just get a general consensus of how my code is looking, without actually seeing the specifics. Something like:
disallowNewlineBeforeBlockStatements: 45 errors in 5 files
disallowTrailingComma: 200 errors in 20 files
validateIndentation: 12,345 errors in 678 files

etc..

@qfox
Copy link
Member

qfox commented Aug 26, 2014

@SgtPooki These stats you talking about can be generated by custom reporter (afaik). Take a look at https://github.com/wurmr/jscs-teamcity-reporter

@SgtPooki
Copy link

@zxqfox Thanks but that reporter seems to output each error for each line for each file, the same as all other reporters. I did attempt to use that one before commenting here. It's output was quite ugly tbh.

Would we just need to create an additional "summary" reporter, or is there a way to pass options to reporters?

EDIT: Disregard, i'm going to write up a quick summary reporter.. it looks fairly simple.

@SgtPooki
Copy link

No time to submit it in a PR right this moment, but https://gist.github.com/SgtPooki/f13f24517b7a69b93017
http://imgur.com/FBX0C75

@qfox
Copy link
Member

qfox commented Aug 27, 2014

@SgtPooki That's what I mean. Well done! 🌴

@mdevils
Copy link
Member

mdevils commented Aug 27, 2014

Wow, nice one.

@markelog
Copy link
Member Author

@SgtPooki could you send us a PR?

@SgtPooki
Copy link

I sure will. I will get it done tonight.. Finally got the wheel hub pried off my car last night, so tonight is free for a todo item of my choosing. I chose you. :)

SgtPooki pushed a commit to SgtPooki/node-jscs that referenced this issue Aug 28, 2014
@SgtPooki
Copy link

PR = #601

SgtPooki pushed a commit to SgtPooki/node-jscs that referenced this issue Aug 29, 2014
SgtPooki pushed a commit to SgtPooki/node-jscs that referenced this issue Sep 3, 2014
SgtPooki pushed a commit to SgtPooki/node-jscs that referenced this issue Sep 3, 2014
SgtPooki pushed a commit to SgtPooki/node-jscs that referenced this issue Sep 3, 2014
ghost pushed a commit to bochap-opensource/node-jscs that referenced this issue Jul 2, 2015
    The reporter has been modified to add an additional table to report errors by rule type in the following format
        ┌──────────────────┬──────────────┬───────────────────┐
        │ Rule             │ Total Errors │ Files With Errors │
        ├──────────────────┼──────────────┼───────────────────┤
        │ disallowKeywords │ 1            │ 1                 │
        └──────────────────┴──────────────┴───────────────────┘

    Fixes jscs-dev#453
@markelog markelog modified the milestones: 2.0, 3.0 Jul 15, 2015
@hzoo
Copy link
Member

hzoo commented Oct 17, 2015

Any updates on this?

@hzoo hzoo added the revisit label Feb 26, 2016
@hzoo hzoo closed this as completed Feb 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants