Skip to content

shellcheck action: add extra-glob input for extensionless sourced bash files #64

Description

@kyle-sexton

Problem

The shellcheck action discovers *.sh/*.bash files, so extensionless bash dotfiles (dot_bashrc, dot_bash_profile in a chezmoi source tree, or .bashrc/.profile generally) are invisible to it. They also have no shebang, so an exec-bit/shebang-detection model won't close the gap.

Consumers work around this by hand-duplicating a second shellcheck invocation with the same exclude flags in two places (the CI workflow and the local Lefthook config), which must then be kept in sync. Example in kyle-sexton/dotfiles: .github/workflows/ci.yml "Lint the extensionless bash dotfiles" step + lefthook.yml shellcheck-bash-dotfiles lane, both running shellcheck --exclude=SC1090,SC1091 dot_bash*.

Ask

Add a configurable extra-glob / extra-paths input to the shellcheck action so a consumer can name extensionless sourced files (and their excludes) once, without duplicating a bespoke step. Once available, downstreams delete both local copies.

Found during the kyle-sexton/dotfiles repo audit (kyle-sexton/dotfiles#110).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions