MCPcopy Create free account
hub / github.com/CSSLint/csslint / outputHelp

Function outputHelp

src/cli/common.js:177–207  ·  view source on GitHub ↗

* Outputs the help screen to the CLI. * @return {void}

()

Source from the content-addressed store, hash-verified

175 * @return {void}
176 */
177 function outputHelp() {
178 var lenToPad = 40,
179 toPrint = "",
180 formatString = "";
181
182 api.print([
183 "\nUsage: csslint-rhino.js [options]* [file|dir]*",
184 " ",
185 "Global Options"
186 ].join("\n"));
187
188 for (var optionName in globalOptions) {
189 if (globalOptions.hasOwnProperty(optionName)) {
190 // Print the option name and the format if present
191 toPrint += " --" + optionName;
192 if (globalOptions[optionName].format !== "") {
193 formatString = "=" + globalOptions[optionName].format;
194 toPrint += formatString;
195 } else {
196 formatString = "";
197 }
198
199 // Pad out with the appropriate number of spaces
200 toPrint += new Array(lenToPad - (optionName.length + formatString.length)).join(" ");
201
202 // Print the description
203 toPrint += globalOptions[optionName].description + "\n";
204 }
205 }
206 api.print(toPrint);
207 }
208
209 /**
210 * Given an Array of filenames, print wrapping output and process them.

Callers 2

validateOptionsFunction · 0.85
cliFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…