blinter
Community plugin: Plugins are maintained by their community authors, not by the MegaLinter team. Using a plugin means trusting its author. This plugin is maintained by tboy1337: report its problems on its repository, not to MegaLinter.
Static analysis linter for Windows batch files (.bat and .cmd)
- Documentation: https://github.com/BatchLang/Blinter/blob/main/docs/MegaLinter.md
- Descriptor: https://raw.githubusercontent.com/BatchLang/Blinter/main/mega-linter-plugin-blinter/blinter.megalinter-descriptor.yml
- Maintainer: tboy1337
⚠️ Required items are missing in this plugin (native mode): see MegaLinter checks.
Blinter is a static analysis linter for Windows batch scripts ('.bat' and '.cmd'). Error and Security findings fail the run. Warning, Style, and Performance findings do not.
blinter documentation
- Visit Official Web Site
- See How to configure blinter rules
- See How to disable blinter rules in files
- See Index of problems detected by blinter
Configuration in MegaLinter
- Enable blinter by adding
BATCH_BLINTERin ENABLE_LINTERS variable - Disable blinter by adding
BATCH_BLINTERin DISABLE_LINTERS variable
| Variable | Description | Default value |
|---|---|---|
| BATCH_BLINTER_ARGUMENTS | User custom arguments to add in linter CLI call Ex: -s --foo "bar" |
|
| BATCH_BLINTER_COMMAND_REMOVE_ARGUMENTS | User custom arguments to remove from command line before calling the linter Ex: -s --foo "bar" |
|
| BATCH_BLINTER_FILTER_REGEX_INCLUDE | Custom regex including filter Ex: (src\|lib)⚠️ Not available with BATCH_BLINTER_CLI_LINT_MODE = project |
Exclude no file |
| BATCH_BLINTER_FILTER_REGEX_EXCLUDE | Custom regex excluding filter Ex: (test\|examples)⚠️ Not available with BATCH_BLINTER_CLI_LINT_MODE = project |
Exclude no file |
| BATCH_BLINTER_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 |
| BATCH_BLINTER_FORWARD_EXCLUDED_DIRECTORIES | In project CLI lint mode, forward excluded directories (EXCLUDED_DIRECTORIES + ADDITIONAL_EXCLUDED_DIRECTORIES, and .gitignored directories when IGNORE_GITIGNORED_FILES is true) to the linter through its native exclusion arguments or generated ignore/config files | true |
| BATCH_BLINTER_FILE_EXTENSIONS | Allowed file extensions. "*" matches any extension, "" matches empty extension. Empty list excludes all filesEx: [".py", ""] |
[".bat", ".cmd"] |
| BATCH_BLINTER_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"] |
Include every file |
| BATCH_BLINTER_PRE_COMMANDS | List of bash commands to run before the linter | None |
| BATCH_BLINTER_POST_COMMANDS | List of bash commands to run after the linter | None |
| BATCH_BLINTER_UNSECURED_ENV_VARIABLES | List of env variables explicitly not filtered before calling BATCH_BLINTER and its pre/post commands | None |
| BATCH_BLINTER_CONFIG_FILE | blinter configuration file nameUse LINTER_DEFAULT to let the linter find it |
blinter.ini |
| BATCH_BLINTER_RULES_PATH | Path where to find linter configuration file | Workspace folder |
| BATCH_BLINTER_DISABLE_ERRORS | Run linter but consider errors as warnings | false |
| BATCH_BLINTER_DISABLE_ERRORS_IF_LESS_THAN | Maximum number of errors allowed | 0 |
| BATCH_BLINTER_TIMEOUT_SECONDS | Maximum duration in seconds of the linter run, after which the linter process and its child processes are killed and reported as an error (exit code 124). Overrides LINTER_TIMEOUT_SECONDS. 0 disables the timeout | 300 |
| BATCH_BLINTER_CLI_EXECUTABLE | Override CLI executable | ['blinter'] |
Use this plugin
Add the descriptor URL of the plugin to PLUGINS in .mega-linter.yml. MegaLinter installs the plugin when it starts, whatever the flavor:
PLUGINS:
- https://raw.githubusercontent.com/BatchLang/Blinter/main/mega-linter-plugin-blinter/blinter.megalinter-descriptor.yml
Behind the scenes
How are identified applicable files
- File extensions:
.bat,.cmd
How the linting is performed
blinter is called once on the whole project directory (project CLI lint mode)
- filtering can not be done using MegaLinter configuration variables,it must be done using blinter configuration or ignore file (if existing)
VALIDATE_ALL_CODEBASE: falsedoesn't make blinter analyze only updated files
Example calls
blinter script.bat --summary
blinter script.cmd --config blinter.ini --summary
blinter . --summary
Installation in Docker
MegaLinter runs these commands when it loads the plugin (only RUN instructions):
RUN pip install --no-cache-dir "Blinter==1.1.74"
Installation without Docker (native mode)
Native mode does not run plugins yet: this section shows what the plugin declares for native mode.
Not available: see the MegaLinter checks of the plugin.
MegaLinter checks
These results last changed on 2026-11-28, and MegaLinter checks the plugins every day. The checks only look at the descriptor of the plugin: they do not review the plugin, nor the tool it runs.
| Check | Result |
|---|---|
| Descriptor | ⚠️ Incomplete |
| Native mode | ❌ Not supported |
| SARIF output | ✅ |
| Native lock | ⚠️ No lock shipped by the plugin author |
Required
Missing required items:
native_installdeclared and valid for the 5 native platforms (BATCH_BLINTER): Native mode (MegaLinter without Docker) can not install the linter. Declarenative_install, listing each of linux/amd64, linux/arm64, darwin/amd64, darwin/arm64 and windows/amd64 inplatformsor inunsupported(with a reason)
Recommended
Missing recommended items:
- Native lock shipped next to the descriptor (
<name>.megalinter-native-lock.json), for verified native installs - Ignore file documentation URL (
linter_rules_ignore_config_url) (BATCH_BLINTER) - Speed (
linter_speed, 1 to 5) (BATCH_BLINTER) - Icon (
linter_icon_png_url) (BATCH_BLINTER) - IDE extensions (
ide) (BATCH_BLINTER) - Test fixtures (
test_folder) (BATCH_BLINTER)
Plugin authors
The requirements and how to fix them are described in Create your own plugin.