dclint
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 Wesley Dean: report its problems on its repository, not to MegaLinter.
Plugin to lint docker-compose files
- Documentation: https://github.com/wesley-dean/mega-linter-plugin-dclint/blob/main/README.md
- Descriptor: https://github.com/wesley-dean/mega-linter-plugin-dclint/blob/main/mega-linter-plugin-dclint/dclint.megalinter-descriptor.yml
- Maintainer: Wesley Dean
⚠️ Required items are missing in this plugin (native mode, SARIF output): see MegaLinter checks.
dclint documentation
- Visit Official Web Site
- See How to disable dclint rules in files
- See Index of problems detected by dclint
Configuration in MegaLinter
- Enable dclint by adding
DOCKERFILE_DCLINTin ENABLE_LINTERS variable - Disable dclint by adding
DOCKERFILE_DCLINTin DISABLE_LINTERS variable
- Enable autofixes by adding
DOCKERFILE_DCLINTin APPLY_FIXES variable
| Variable | Description | Default value |
|---|---|---|
| DOCKERFILE_DCLINT_ARGUMENTS | User custom arguments to add in linter CLI call Ex: -s --foo "bar" |
|
| DOCKERFILE_DCLINT_COMMAND_REMOVE_ARGUMENTS | User custom arguments to remove from command line before calling the linter Ex: -s --foo "bar" |
|
| DOCKERFILE_DCLINT_FILTER_REGEX_INCLUDE | Custom regex including filter Ex: (src\|lib) |
Exclude no file |
| DOCKERFILE_DCLINT_FILTER_REGEX_EXCLUDE | Custom regex excluding filter Ex: (test\|examples) |
Exclude no file |
| DOCKERFILE_DCLINT_CLI_LINT_MODE | Override default CLI lint mode - list_of_files: Call the linter with the list of files as argument |
list_of_files |
| DOCKERFILE_DCLINT_FILE_EXTENSIONS | Allowed file extensions. "*" matches any extension, "" matches empty extension. Empty list excludes all filesEx: [".py", ""] |
Exclude every file |
| DOCKERFILE_DCLINT_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"] |
["^(docker-)?compose.*\\.ya?ml$"] |
| DOCKERFILE_DCLINT_PRE_COMMANDS | List of bash commands to run before the linter | None |
| DOCKERFILE_DCLINT_POST_COMMANDS | List of bash commands to run after the linter | None |
| DOCKERFILE_DCLINT_UNSECURED_ENV_VARIABLES | List of env variables explicitly not filtered before calling DOCKERFILE_DCLINT and its pre/post commands | None |
| DOCKERFILE_DCLINT_CONFIG_FILE | dclint configuration file nameUse LINTER_DEFAULT to let the linter find it |
.dclintrc |
| DOCKERFILE_DCLINT_RULES_PATH | Path where to find linter configuration file | Workspace folder |
| DOCKERFILE_DCLINT_DISABLE_ERRORS | Run linter but consider errors as warnings | false |
| DOCKERFILE_DCLINT_DISABLE_ERRORS_IF_LESS_THAN | Maximum number of errors allowed | 0 |
| DOCKERFILE_DCLINT_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 |
| DOCKERFILE_DCLINT_CLI_EXECUTABLE | Override CLI executable | ['dclint'] |
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/wesley-dean/mega-linter-plugin-dclint/main/mega-linter-plugin-dclint/dclint.megalinter-descriptor.yml
Behind the scenes
How are identified applicable files
- File names (regex):
^(docker-)?compose.*\.ya?ml$
How the linting is performed
- dclint is called once with the list of files as arguments (
list_of_filesCLI lint mode)
Example calls
dclint docker-compose.yml
dclint --config .dclintrc compose/docker-compose-service.yml
Installation in Docker
MegaLinter runs these commands when it loads the plugin (only RUN instructions):
RUN npm install --global dclint@3.1.0
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 (DOCKERFILE_DCLINT): 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)- SARIF output (
DOCKERFILE_DCLINT): The findings are missing from SARIF reports (GitHub code scanning, SARIF viewers, coding agents). Setcan_output_sarif: truewithcli_sarif_argswhen the tool outputs SARIF, otherwisesarif_text_regex(one finding per line of text) orsarif_unified_diff: true(formatters printing a diff)
Recommended
Missing recommended items:
- Native lock shipped next to the descriptor (
<name>.megalinter-native-lock.json), for verified native installs - Configuration documentation URL (
linter_rules_configuration_url) (DOCKERFILE_DCLINT) - Ignore file documentation URL (
linter_rules_ignore_config_url) (DOCKERFILE_DCLINT) - SPDX license (
linter_spdx_license) (DOCKERFILE_DCLINT) - Speed (
linter_speed, 1 to 5) (DOCKERFILE_DCLINT) - IDE extensions (
ide) (DOCKERFILE_DCLINT) - Test fixtures (
test_folder) (DOCKERFILE_DCLINT)
Plugin authors
The requirements and how to fix them are described in Create your own plugin.