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

Reformat output. #162

Open
cowboy opened this issue Apr 9, 2014 · 7 comments
Open

Reformat output. #162

cowboy opened this issue Apr 9, 2014 · 7 comments

Comments

@cowboy
Copy link
Member

cowboy commented Apr 9, 2014

This is what I see now:

Compare that to >=0.8.0:

While I like the line number on the left and the reduction of colors in general, I don't really like the indentation of the ^ message because it's going to wrap oddly in many circumstances.

First, I'd remove the per-file indentation, and would intelligently compute the width of the "line number" column per-file using the grunt.log.table method, like so:

$ grunt
Running "jshint:all" (jshint) task

Gruntfile.js
20 |    (function() { /* need to test indentation and wrapping */ }(x));
                                                                    ^ 'x' is not defined.
index.js
211 |log.verbose = {};
     ^ 'log' is not defined.
212 |log.notverbose = {};
     ^ 'log' is not defined.
215 |Object.keys(log).filter(function(key) {
                 ^ 'log' is not defined.

Maybe after that, I'd go back to visually highlighting the invalid character and not indenting the warning message, simulated here with [].

$ grunt
Running "jshint:all" (jshint) task

Gruntfile.js
20 |    (function() { /* need to test indentation and wrapping */ }([x]));
    'x' is not defined.
index.js
211 |[l]og.verbose = {};
     'log' is not defined.
212 |[l]og.notverbose = {};
     'log' is not defined.
215 |Object.keys([l]og).filter(function(key) {
     'log' is not defined.

Basically, I'd like to see a hybrid between the old and the new way, because I don't think the new way is a clear-cut improvement.

@tigerclaw-az
Copy link

+1

@shama
Copy link
Member

shama commented Apr 9, 2014

+1 Seeing them side to side now, I like the color better and the highlighted error instead of the ^.

@zumek
Copy link

zumek commented Apr 19, 2014

Hi guys, a query about output colours; is it possible to change/customise output color of errors? The errors show up in navy blue against the black background of my terminal window (win 8), which makes it very difficult to read. See attached image.
output

@gruber76
Copy link
Contributor

@zumek, These colors are how grunt.log outputs "log," "warning," and "error" messages. They are currently not configurable, and you're only real option is to use --no-color (which loses you the red.) Just filed a request on grunt.log, if there's any interest I will put a patch together as well.

@stephanebachelier
Copy link

+1

@cowboy
Copy link
Member Author

cowboy commented Jul 21, 2014

Does anyone want to take a stab at changing the visual style? @shama? @vladikoff?

@acostaf
Copy link

acostaf commented Jun 3, 2015

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants