You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then run it with your Makefile attached, below is an example of it assuming the Makefile is in your current working directory:
docker run -v "$PWD"/Makefile:/Makefile checker
pre-commit usage
This repo includes a pre-commit hook, which you may choose to use in your own
repos. Simply add a .pre-commit-config.yaml to your repo's top-level directory
repos:
- repo: https://github.com/mrtazz/checkmake.git# Or another commit hash or versionrev: 0.2.2hooks:
# Use this hook to let pre-commit build checkmake in its sandbox
- id: checkmake# OR Use this hook to use a pre-installed checkmark executable# - id: checkmake-system
There are two hooks available:
checkmake (Recommended)
pre-commit will set up a Go environment from scratch to compile and run checkmake.
See the pre-commit golang plugin docs for more information.
checkmake-system
pre-commit will look for checkmake on your PATH.
This hook requires you to install checkmake separately, e.g. with your package manager or a prebuilt binary release.
Only recommended if it's permissible to require all repository users install checkmake manually.
Then, run pre-commit as usual as a part of git commit or explicitly, for example:
pre-commit run --all-files
pre-commit in GitHub Actions
You may also choose to run this as a GitHub Actions workflow. To do this, add a
.github/workflows/pre-commit.yml workflow to your repo:
The pandoc document converter utility is required to run checkmake. You can find out if you have it via which pandoc. Install pandoc if the command was not found.
With Go
With go 1.16 or higher:
go install github.com/mrtazz/checkmake/cmd/checkmake@latest
checkmake Makefile
Or alternatively, run it directly:
go run github.com/mrtazz/checkmake/cmd/checkmake@latest Makefile
Packages
There are packages for linux up on packagecloud.io or build it yourself with the steps below.
Build
To build checkmake you will need to have golang installed. Once you have Go installed, you can simply clone the repo and build the binary and man page yourself with the following commands.
git clone https://github.com/mrtazz/checkmake
cd checkmake
make