Install Additional Dependencies
Super-linter supports installing additional dependencies at runtime, on each run. This is useful when a linter requires project-specific packages to perform its analysis correctly (e.g., pylint
needing your project's Python dependencies).
Currently, Super-Linter supports installing Operating System (OS) packages.
How to Install OS Packages
To install OS packages from the Alpine Linux repository, follow these steps:
-
Create a JSON configuration file. This file should contain a JSON array of strings, where each string is a package to be installed.
Example:
os-packages.json
The package names are passed directly to the[ "restic>0.17.0-r1", "rsync" ]
apk add
command. For more information on available packages, see the Alpine Linux package repository. -
Place the file in your rules directory. By default, Super-Linter looks for this file at
.github/linters/os-packages.json
. You can customize the name and location using the following environment variables:LINTER_RULES_PATH
: The directory where your configuration files are stored (defaults to.github/linters
).OS_PACKAGES_CONFIG_FILE_NAME
: The name of the JSON file (defaults toos-packages.json
).