Skip to content

checkmake

GitHub stars GitHub release (latest SemVer) GitHub last commit GitHub commit activity GitHub contributors

This linter has been disabled in this version

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_COMMAND_REMOVE_ARGUMENTS User custom arguments to remove from command line before calling the linter
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
- 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_UNSECURED_ENV_VARIABLES List of env variables explicitly not filtered before calling MAKEFILE_CHECKMAKE and its pre/post commands None
MAKEFILE_CHECKMAKE_CONFIG_FILE checkmake configuration file nameUse 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
MAKEFILE_CHECKMAKE_CLI_EXECUTABLE Override CLI executable ['checkmake']

MegaLinter Flavours

This linter is available in the following flavours

Flavor Description Embedded linters Info
all Default MegaLinter Flavor 124 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 :
FROM mrtazz/checkmake:latest as checkmake
COPY --link --from=checkmake /checkmake /usr/bin/checkmake
  • APK packages (Linux):