Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Printing config file rules on the command line

32 views
Skip to first unread message

Jonathan Klein

unread,
Nov 13, 2012, 10:53:29 AM11/13/12
to css-...@googlegroups.com
One minor oddity that I found with the CLI is that if you have a .csslintrc then the rules from that config file are printed out in the function readConfigFile.  The impact of this is that if you are using a config file and any XML based output format, you have to do something like this if you want valid XML output:

csslint /path/to/directory | sed '1,3d' > checkstyle_output.xml 

This seems strange, and I think it might be worth changing for the 1.0.0 release.  I would go ahead and patch it, but there are a number of ways we could go:
  1. Default to not printing out the rules, and provide an argument to explicitly print out the rules from the config file.
  2. Default to printing them, and provide an argument to hide them.
  3. Roll this into the --quiet flag (not ideal).
  4. Look at the output format that was specified, and if it is some sort of XML, don't print the rules.
Nicholas, do you have an opinion on this? 

-Jonathan

Nicholas Zakas

unread,
Nov 13, 2012, 3:37:16 PM11/13/12
to css-...@googlegroups.com
Yikes, that's a bug! Yes, it should be removed, it makes no sense
whatsoever. I remember adding that in for debugging and must have just
forgotten to remove it before pushing out the release.

-N
--

______________________________
Nicholas C. Zakas
@slicknet

Author, Professional JavaScript for Web Developers
Buy it at Amazon.com:
http://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691/ref=sr_1_3

Jonathan Klein

unread,
Nov 13, 2012, 5:14:10 PM11/13/12
to css-...@googlegroups.com
Cool, thanks.  I thought that might be case as well. 
Reply all
Reply to author
Forward
0 new messages