Skip to content

BASH

Linters

Linter Additional
bash-exec
BASH_EXEC
shellcheck
BASH_SHELLCHECK
GitHub stars sarif
shfmt
BASH_SHFMT
GitHub stars formatter

Linted files

  • File extensions:
    • ``
    • .sh
    • .bash
    • .dash
    • .ksh
  • Detected file content:
    • ^#!/usr/bin/env bash
    • ^#!/bin/bash
    • ^#!/bin/sh

Configuration in MegaLinter

Variable Description Default value
BASH_PRE_COMMANDS List of bash commands to run before the linters None
BASH_POST_COMMANDS List of bash commands to run after the linters None
BASH_FILTER_REGEX_INCLUDE Custom regex including filter
BASH_FILTER_REGEX_EXCLUDE Custom regex excluding filter

Behind the scenes

Installation

  • APK packages (Linux):