kokuwaio/shellcheck

By kokuwaio

Updated 4 days ago

A WoodpeckerCI plugin for shellcheck to lint shell files.

Image
Integration & delivery
Developer tools
0

5.6K

kokuwaio/shellcheck repository overview

Shellcheck WoodpeckerCI Plugin

pulls size dockerfile license prs issues

A WoodpeckerCI plugin for shellsheck to lint shell files.
Also usable with Gitlab, Github or locally, see examples for usage.

Features

  • preconfigure Shellcheck parameters
  • searches for shell files recursive
  • runnable with local docker daemon

Example

Woodpecker:

steps:
  shellcheck:
    depends_on: []
    image: kokuwaio/shellcheck:v0.11.0
    settings:
      shell: bash
      severity: error
    when:
      event: pull_request
      path: "**/*.sh"

Gitlab: (using script is needed because of https://gitlab.com/gitlab-org/gitlab/-/issues/19717)

shellcheck:
  needs: []
  stage: lint
  image:
    name: kokuwaio/shellcheck:v0.11.0
    entrypoint: [""]
  script: [/usr/local/bin/entrypoint.sh]
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
      changes: ["**/*.sh"]

CLI:

docker run --rm --volume=$(pwd):$(pwd):ro --workdir=$(pwd) kokuwaio/shellcheck --shell=bash --severity=error

Settings

Settings NameEnvironmentDefaultDescription
shellPLUGIN_SHELLnoneSpecify dialect (sh, bash, dash, ksh, busybox)
severityPLUGIN_SEVERITYstyleMinimum severity of errors to consider (error, warning, info, style)
includePLUGIN_INCLUDEnoneConsider only given types of warnings
excludePLUGIN_EXCLUDEnoneExclude types of warnings
colorPLUGIN_COLORalwaysUse color (auto, always, never)
formatPLUGIN_FORMATttyOutput format (checkstyle, diff, gcc, json, json1, quiet, tty)

Alternatives

ImageCommentamd64arm64
kokuwaio/shellcheckWoodpecker pluginsizesize
koalaman/shellchecknot a Woodpecker plugin, officialsizesize
pipelinecomponents/shellchecknot a Woodpecker pluginsizesize

Tag summary

Content type

Image

Digest

sha256:ef019b457

Size

10.1 MB

Last updated

4 days ago

docker pull kokuwaio/shellcheck:v0.11.0