FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...

CodeChecker CLI

   ______          __     ________              __                ________    ____
  / ____/___  ____/ /__  / ____/ /_  ___  _____/ /_____  _____   / ____/ /   /  _/
 / /   / __ \/ __  / _ \/ /   / __ \/ _ \/ ___/ //_/ _ \/ ___/  / /   / /    / /  
/ /___/ /_/ / /_/ /  __/ /___/ / / /  __/ /__/ ,< /  __/ /     / /___/ /____/ /   
\____/\____/\__,_/\___/\____/_/ /_/\___/\___/_/|_|\___/_/      \____/_____/___/  

CodeChecker CLI

A CLI wrapper for the CodeChecker project. This CLI bundles the CodeChecker core libraries for use in the command line.

Installation

install commandbox-codechecker

Usage

To start a code review against your code, run this command:

codechecker run

Arguments

  • categories - Comma delimited list of categories of rules to run. Applies on top of existing include and excludes specified in .codechecker.json.
  • paths - Comma delimited list of file globbing paths to scan. i.e. **.cf? (overrides paths in JSON)
  • minSeverity - Minimum rule severity to consider. Level 1-5. (overrides paths in JSON)
  • excelReportPath - Path to write Excel report to
  • verbose = "false" - Output full list of files being scanned and all items found to the console

JSON Configuration

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:

  • paths - Comma delimited list of file globbing paths to scan if nothing is passed to the command
  • minSeverity - Minimum rule severity to consider if nothing is passed to the command
  • includeRules - A struct of arrays where each struct key is a rule category and the array contains rule names to run. Instead of an array, the value in the struct can also be the string "*" which will include all rules in that category
  • excludeRules - Same format as includeRules but these rules are EXCLUDED from the final list.
  • ruleFiles - Array of absolute or relative (to the JSON file) paths to JSON files containing an arary of structs defining rules to run
  • customRules - An array of structs defining rules to run.

Here is an example .codechecker.json file:

{
	"paths" : "**.cf?",
	"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"
		}
	]
}

View all Categories/Rules

To view all the categories and rules available to you, run this command:

codechecker categories

Here are all the versions for this package. Please note that you can leverage CommandBox package versioning to install any package you like. Please refer to our managing package version guide for more information.

Version Created Last Update Published By Stable Download
1.1.0 Mar 12 2019 06:58 PM Mar 12 2019 06:58 PM Ortus Solutions (ortus)
1.0.7 Oct 16 2018 10:41 PM Oct 16 2018 10:41 PM Ortus Solutions (ortus)
1.0.6 Oct 14 2018 08:36 PM Oct 14 2018 08:36 PM Ortus Solutions (ortus)
1.0.5 Oct 13 2018 06:45 PM Oct 13 2018 06:45 PM Ortus Solutions (ortus)
1.0.4 Oct 13 2018 12:09 PM Oct 13 2018 12:09 PM Ortus Solutions (ortus)
1.0.3 Oct 13 2018 12:06 PM Oct 13 2018 12:06 PM Ortus Solutions (ortus)
1.0.2 Oct 12 2018 11:08 PM Oct 12 2018 11:08 PM Ortus Solutions (ortus)
1.0.1 Oct 11 2018 06:57 PM Oct 11 2018 06:57 PM Ortus Solutions (ortus)
1.0.0 Oct 11 2018 12:34 AM Oct 11 2018 12:34 AM Ortus Solutions (ortus)

 

No collaborators yet.
   
  • Oct 11 2018 12:34 AM
  • Mar 12 2019 06:58 PM
  • 465
  • 0
  • 62