Duhemm/sbt-errors-summary

Changes from @japgolly's branch

Opened this issue · 6 comments

As first mentioned in #8, on my branch I made the following changes:

  • changed colours of filenames
  • made most colours bold so they are more readable on black backgrounds (at least in my envs)
  • in the by-filename report at the end
    • sort by filename
    • only print if more than one file
    • print total error/warning count per file
    • don't print line numbers
    • consolidate problem ids where possible (eg. [1-4,9] instead of [1,2,3,4,9])
  • print total errors and warnings

image

@Duhemm said:

Hey @japgolly, I've been looking in more details at your changes, and I had missed that you removed the line numbers from the summary. That's basically the reason why I created this reporter :( Can you think of a way of adapting your changes while keeping the line numbers from the summary? Maybe a flag that would let users switch between the 2 modes?

Hi, I've made some changes just now to put back the line numbers in the summary lines at the bottom. I've also put the total number of errors per file on the right. It's nice and easy to read but still not intuitive if one doesn't know what the numbers mean...

Anyway, here's how it looks now. WDYT?

image

@japgolly Really cool! Can you put the colors and other potentially configurable options in the contraband schema? Do you know when you can PR it? I would like to open a PR to sbt/sbt soon. Hopefully this can make it into sbt 1.0 (probably not as default though).

Are the blue numbers (error id) in the summary necessary? It might be clearer to only display the filename and line numbers.

They can be useful to quickly find the error message for a given line. I'm fine with getting rid of them. I think that @dwijnand found them confusing too. Can you remove them @japgolly ?

My confusion is I thought one number was identifying the error and the other the number of occurrences in the file, rather than the line number.

Anyways, cross-linking that conversation here: #12.