IntersectMBO / cardano-cli

This repository contains sources for the command-line interface (CLI) tool for interacting with the Cardano blockchain.
Apache License 2.0
39 stars 14 forks source link

CI: run shellcheck #734

Closed smelc closed 4 months ago

smelc commented 4 months ago

Changelog

- description: |
    CI: add a job to run shellcheck
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - improvement    # QoL changes e.g. refactoring
  # - bugfix         # fixes a defect
  - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

While working on https://github.com/IntersectMBO/cardano-cli/pull/733, I witnessed there was no check of the quality of shell scripts in this repo. This PR adds one.

You may think hey all versioned *.sh scripts are being ignored right now. That is correct: I didn't want to interleave fixing the existing scripts and adding this new check. The point is that this pipeline will automatically start checking new shell scripts, for example the one added by https://github.com/IntersectMBO/cardano-cli/pull/733.

So this pipeline will effectively start checking things when https://github.com/IntersectMBO/cardano-cli/pull/733 is merged. And it will also check future scripts we add (since, by default, we won't think of augmenting .github/workflows/shellcheck-exceptions.txt :wink:).

How to trust this PR

Look at output of recent runs of the new pipeline: https://github.com/IntersectMBO/cardano-cli/actions/workflows/shellcheck.yml

Checklist

smelc commented 4 months ago

Nice. I think we should add that to cardano-node and cardano-api as well.

@carbolymer> sure, will do :+1: