______ __ ________ __ ________ ____
/ ____/___ ____/ /__ / ____/ /_ ___ _____/ /_____ _____ / ____/ / / _/
/ / / __ \/ __ / _ \/ / / __ \/ _ \/ ___/ //_/ _ \/ ___/ / / / / / /
/ /___/ /_/ / /_/ / __/ /___/ / / / __/ /__/ ,< / __/ / / /___/ /____/ /
\____/\____/\__,_/\___/\____/_/ /_/\___/\___/_/|_|\___/_/ \____/_____/___/
A CLI wrapper for the CodeChecker project. This CLI bundles the CodeChecker core libraries for use in the command line.
install commandbox-codechecker
To start a code review against your code, run this command:
codechecker run
.codechecker.json
.paths
in JSON)paths
in JSON)If a .codechecker.json
file is found in the current working directory, it will be picked up and used. This file can contain the following keys:
"*"
which will include all rules in that categoryHere is an example .codechecker.json
file:
{
"paths" : "**.cf?",
"excludePaths" : "modules/,test**",
"minSeverity" : 1,
"includeRules" : {
"Maintenance" : "*",
"Security Risks - Best Practices" : "*",
"One-off Rules" : "*",
"Standards" : [
"Don't use IS or GT for boolean tests"
]
},
"excludeRules" : {
"Maintenance" : [
"Don't use Log"
]
},
"ruleFiles" : [
"myRules.json"
],
"customRules" : [
{
"pattern": "cfoutput",
"message": "CFoutput is lame",
"category": "One-off Rules",
"name": "Don't use CFoutput",
"extensions": "cfm,cfc",
"severity": "3"
}
]
}
To view all the categories and rules available to you, run this command:
codechecker categories