Code Monkey home page Code Monkey logo

shellcheck-buildkite-plugin's Introduction

Shellcheck Buildkite Plugin Build status

A Buildkite plugin that runs shellcheck against your shell scripts using the koalaman/shellcheck docker image.

Example

This will check all shellscripts with shellcheck.

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

Configuration

Required

files (string or array of strings)

The files (or globs) to run shellcheck on.

Optional

extended_glob (boolean)

Enable using extended glob patterns, e.g. *.+(sh|bash)

Default: false

recursive_glob (boolean)

Enable using recursive globbing, e.g. **/*.sh

Note: requires at least Bash 4 on the Buildkite Agent

Default: false

options (string or array of strings)

Command line options to pass to shellcheck.

Default: "--color=always"

version (string)

Version of docker image to use.

Default: latest

License

MIT (see LICENSE)

shellcheck-buildkite-plugin's People

Contributors

boomper-bot[bot] avatar durkode avatar huonw avatar lox avatar mckern avatar nsuma8989 avatar pzeballos avatar renovate-bot avatar renovate[bot] avatar tomowatt avatar toolmantim avatar toote avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

shellcheck-buildkite-plugin's Issues

show building this plugin code supposed to work out the box?

Im getting errors in all my tests.
spellcheck, lint, tests etc.

Here's an example error from spellcheck:

Running global environment hook 0s
Β  Setting up elastic stack environment (v4.4.0)
Β  Downloading secrets fromΒ Β buildkiteec2stack-1-managedsecretsbucket-ojcfogfb902s
Β  Preparing plugins
Β  Preparing working directory
Β  Running global pre-command hook
Β  Running plugin shellcheck command hook
Β  $ /var/lib/buildkite-agent/plugins/github-com-buildkite-plugins-shellcheck-buildkite-plugin-v1-1-2/hooks/command
Β  No files found to shellcheck
  🚨 Error: The command exited with status 1
Β  Running global pre-exit hook
Β  $ /etc/buildkite-agent/hooks/pre-exit

Im new to Buildkite and is using this to test

Pass args to shellcheck

I would love to use this plugin, however what is blocking me is the inability to pass args to shellcheck, specifically rules to ignore and the -x option at the moment.

Would you welcome a PR for this? If so, are you happy with being able to pass through any options, or would you prefer to explicitly define what can be passed (such as rules to ignore)?

Support recursive glob

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)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

buildkite
.buildkite/pipeline.yml
  • docker-compose v3.9.0
  • plugin-linter v3.0.0
docker-compose
docker-compose.yml

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Preset name not found within published preset config (monorepo:angularmaterial). Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.