Skip to content

A Continuous Integration Reference Implementation for Bash/Sh Scripts

License

Notifications You must be signed in to change notification settings

CalvinRodo/bash-sh-ci-reference-implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BASH/SH CI Implementations

Implementations

Travis CI

Build Status

We use the go language environment since it's required by shfmt, this saves us from having to install go ourselves.

Linters - Static Code Analysis

Linters or Static Code Analyzers will check the programs source code for bugs, errors, and formatting issues.

Static Code Analysis Satisfies the ITSG33 Control SA-11(1) Static Code Analysis

Error Checking

Use ShellCheck to check your bash/sh for known issues.

Link to tool: ShellCheck GitHub Page

Command to Run ShellCheck

To simplify installation of this tool we are running it from inside a docker container

docker run --rm -v "$PWD:/mnt" koalaman/shellcheck:stable script-to-test.sh

Pretty Printers

Use shfmt to ensure your script is formatted using a standard format. We are using the Google Shell Style Guide to format our scripts.

Link to tool: shfmt GitHub Page

Command to run shfmt

Unfortunately we cannot run shfmt from within a docker container as the diff functionality currently doesn't work

shfmt -d -i 2 -ci -w script-to-test.sh

About

A Continuous Integration Reference Implementation for Bash/Sh Scripts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages