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:
- Default to not printing out the rules, and provide an argument to explicitly print out the rules from the config file.
- Default to printing them, and provide an argument to hide them.
- Roll this into the --quiet flag (not ideal).
- 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