Skip to content

checkmake GitHub last commit

checkmake documentation

checkmake - GitHub

Configuration in MegaLinter

Variable Description Default value
MAKEFILE_CHECKMAKE_ARGUMENTS User custom arguments to add in linter CLI call
Ex: -s --foo "bar"
MAKEFILE_CHECKMAKE_FILTER_REGEX_INCLUDE Custom regex including filter
Ex: (src\|lib)
Include every file
MAKEFILE_CHECKMAKE_FILTER_REGEX_EXCLUDE Custom regex excluding filter
Ex: (test\|examples)
Exclude no file
MAKEFILE_CHECKMAKE_CLI_LINT_MODE Override default CLI lint mode
- file: Calls the linter for each file
- list_of_files: Call the linter with the list of files as argument
- project: Call the linter from the root of the project
file
MAKEFILE_CHECKMAKE_FILE_EXTENSIONS Allowed file extensions. "*" matches any extension, "" matches empty extension. Empty list excludes all files
Ex: [".py", ""]
Exclude every file
MAKEFILE_CHECKMAKE_FILE_NAMES_REGEX File name regex filters. Regular expression list for filtering files by their base names using regex full match. Empty list includes all files
Ex: ["Dockerfile(-.+)?", "Jenkinsfile"]
["Makefile"]
MAKEFILE_CHECKMAKE_PRE_COMMANDS List of bash commands to run before the linter None
MAKEFILE_CHECKMAKE_POST_COMMANDS List of bash commands to run after the linter None
MAKEFILE_CHECKMAKE_CONFIG_FILE checkmake configuration file name
Use LINTER_DEFAULT to let the linter find it
.checkmake.ini
MAKEFILE_CHECKMAKE_RULES_PATH Path where to find linter configuration file Workspace folder, then MegaLinter default rules
MAKEFILE_CHECKMAKE_DISABLE_ERRORS Run linter but consider errors as warnings false
MAKEFILE_CHECKMAKE_DISABLE_ERRORS_IF_LESS_THAN Maximum number of errors allowed 0

MegaLinter Flavours

This linter is available in the following flavours

Flavor Description Embedded linters Info
all Default MegaLinter Flavor 105 Docker Image Size (tag) Docker Pulls
ci_light Optimized for CI items (Dockerfile, Jenkinsfile, JSON/YAML schemas,XML 19 Docker Image Size (tag) Docker Pulls
dotnet Optimized for C, C++, C# or VB based projects 53 Docker Image Size (tag) Docker Pulls

Behind the scenes

How are identified applicable files

  • File names (regex): Makefile

How the linting is performed

  • checkmake is called one time by identified file (file CLI lint mode)

Example calls

checkmake Makefile
checkmake --config .checkmake.ini Makefile

Help content

checkmake.

  Usage:
  checkmake [options] <makefile>
  checkmake -h | --help
  checkmake --version
  checkmake --list-rules

  Options:
  -h --help               Show this screen.
  --version               Show version.
  --debug                 Enable debug mode
  --config=<configPath>   Configuration file to read
  --format=<format>       Output format as a Golang text/template template
  --list-rules            List registered rules

Installation on mega-linter Docker image

  • Dockerfile commands :
RUN ( [ -d /usr/local/bin ] || mkdir -p /usr/local/bin ) \
    && wget -q "https://github.com/mrtazz/checkmake/releases/download/0.2.1/checkmake-0.2.1.linux.amd64" -O /usr/local/bin/checkmake \
    && chmod 755 /usr/local/bin/checkmake