checkmake
checkmake documentation
- Version in MegaLinter: 0.2.0
- Visit Official Web Site
- See How to configure checkmake rules
Configuration in MegaLinter
- Enable checkmake by adding
MAKEFILE_CHECKMAKE
in ENABLE_LINTERS variable - Disable checkmake by adding
MAKEFILE_CHECKMAKE
in DISABLE_LINTERS variable
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- 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 filesEx: [".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 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 | 113 | ||
ci_light | Optimized for CI items (Dockerfile, Jenkinsfile, JSON/YAML schemas,XML | 19 | ||
cupcake | MegaLinter for the most commonly used languages | 81 | ||
documentation | MegaLinter for documentation projects | 47 | ||
dotnet | Optimized for C, C++, C# or VB based projects | 59 | ||
go | Optimized for GO based projects | 49 | ||
java | Optimized for JAVA based projects | 51 | ||
python | Optimized for PYTHON based projects | 58 |
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):