Page MenuHomePhabricator

Add Shell linting to heritage repo
Closed, ResolvedPublic

Description

We have been informally running our scripts through ShellCheck, but that should be enforced by CI.

Event Timeline

Looks like Shellcheck has been explored in T148494, but as far as I can see in rCICF there are no usage of it (yet).

Change 378006 had a related patch set uploaded (by Jean-Frédéric; owner: Jean-Frédéric):
[labs/tools/heritage@master] Add Bash linting using bashate

https://gerrit.wikimedia.org/r/378006

Digging a bit in what we could do with our existing entry-points (tox, npm and composer) I came across bashate from OpenStack, and added it to heritage.

Looks like Shellcheck has been explored in T148494, but as far as I can see in rCICF there are no usage of it (yet).

@hashar How would you recommend we go about running ShellCheck on CI for the heritage repo ? ShellCheck is a Haskell application, so we cannot install it for our usual entry-points (tox, npm test or composer test). Unless shellcheck is already installed globally on Jenkins slaves, in which case we can just use whichever (I’d go for tox) to run it.

Change 378006 merged by jenkins-bot:
[labs/tools/heritage@master] Add Bash linting using bashate

https://gerrit.wikimedia.org/r/378006

Yeah, I did not find how to integrate Shellcheck but bashate is good enough for now :) Thanks!