buildkite-plugins/shellcheck-buildkite-plugin

Support recursive glob

raven opened this issue · 0 comments

raven commented

It was unexpected to discover that file patterns that are supported by the artefact plugin **/*.zip, are not supported by the shellcheck plugin, and also when using such patterns there is not output to indicate that recursive glob will not resolve.

I understand that the artefact plugin does its file pattern matching via Go's builtin glob matching, and the shellcheck plugin is relying on the agent's default shell (setting shopt -s globstar is not a guarantee to be available), but it would be great if somehow they behaved the same.

Unexpected behaviour

Given the directory structure of:

.
├── 1
│   └── secondlevel.sh
├── 2
│   └── anothersecondlevel.sh
├── 3
│   └── A
│       └── thirdlevel.sh
└── rootlevel.sh

steps:
  - plugins:
      - shellcheck#v1.1.2:
          files: **/*.sh

**/*.sh will only match secondlevel.sh, anothersecondlevel.sh (doesn't match root or any deeper levels)