new require("lib/Cli")(fsContainer, pathContainer)
CLI services
Parameters:
Name | Type | Description |
---|---|---|
fsContainer |
type | |
pathContainer |
type |
A module representing Cli
Members
Methods
-
<inner> applyToEveryFileInDir(pathArg, fn)
-
Apply callback to every file within the directory recursively
Parameters:
Name Type Description pathArg
string fn
dirIteratorCb -
<inner> applyToEveryFileInPath(pathArg, fn)
-
Apply callback to every file within the path recursively
Parameters:
Name Type Description pathArg
string fn
dirIteratorCb -
<inner> applyToFile(pathArg, fn)
-
Apply callback to the file
Parameters:
Name Type Description pathArg
string fn
dirIteratorCb -
<inner> define(factory)
-
Override AMD `define` function for RequireJS
Parameters:
Name Type Description factory
function -
<inner> extractExistingReportBody(file) → {string}
-
If checkstyle already exists (e.g. built by phpcs), extend it with actual report body
Parameters:
Name Type Description file
string Returns:
- Type
- string
-
<inner> findPathsInCliArgs(args) → {string[]}
-
Find file name or path given in CLI arguments
Parameters:
Name Type Description args
string[] Returns:
- Type
- string[]
-
<inner> getElapsedTime() → {String}
-
Determine script execution time
Returns:
- Type
- String
-
<inner> getProjectInfo() → {Object}
-
Get object with project info
Returns:
- Type
- Object
-
<inner> parseCliOptions(args, options) → {Object}
-
Populate options with ones founds in args
Parameters:
Name Type Description args
Array options
Object reference Returns:
- Type
- Object
-
<inner> printFooter()
-
Display footer information
-
<inner> printHeader(version)
-
Display header information (copyright)
Parameters:
Name Type Description version
string -
<inner> printSuccess(standard)
-
Display boy in the case of successful bypass
Parameters:
Name Type Description standard
string -
<inner> readRealtimeConfig(pathArg) → {Object}
-
Find in project root (any parent) directory and read local sniffer configuration Just like .jshintrc
Parameters:
Name Type Description pathArg
string Returns:
- Type
- Object