Sign inSign up

backplane/checkmake

By backplane

•Updated about 22 hours ago

scratch-based single-binary dockerization of checkmake, the Makefile linter

Image
0

10K+

backplane/checkmake repository overview

⁠checkmake

scratch⁠-based single-binary dockerization of checkmake⁠, the Makefile linter

The image runs as a non-root user in the single-binary container. It has its workdir set to /work. The multi-stage image build clones the upstream repo and then checks-out the latest git tag before compiling the app.

The source code for this image is hosted on GitHub in the backplane/conex repo⁠.

⁠Usage

⁠Interactive

This shell function demonstrates using this image in place of having the binary installed.

checkmake() {
  docker run \
    --rm \
    --interactive \
    --tty \
    --volume "$(pwd):/work" \
    "backplane/checkmake" \
    "$@"
}

Examples sessions using the function:

$ checkmake
checkmake.

  Usage:
  checkmake [options] <makefile>
  checkmake -h | --help
  checkmake --version
  checkmake --list-rules

  Options:
  -h --help               Show this screen.
  --version               Show version.
  --debug                 Enable debug mode
  --config=<configPath>   Configuration file to read
  --format=<format>       Output format as a Golang text/template template
  --list-rules            List registered rules

Checking against this repo's Makefile:

$ checkmake Makefile 
                                                                
      RULE                 DESCRIPTION             LINE NUMBER  
                                                                
  maxbodylength   Target body for "push" exceeds   25           
                  allowed length of 5 (10).                     
  minphony        Missing required phony target    0            
                  "all"                                         
  minphony        Missing required phony target    0            
                  "test"                                        

Tag summary

Content type

Image

Digest

sha256:8aa21faa8…

Size

4.7 MB

Last updated

about 22 hours ago

docker pull backplane/checkmake