Skip to content

Commit

Permalink
track go tools with go mod
Browse files Browse the repository at this point in the history
  • Loading branch information
mcandre committed Feb 13, 2025
1 parent 5728989 commit a526a99
Show file tree
Hide file tree
Showing 501 changed files with 238,955 additions and 117 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: "Actionlint"
on: # yamllint disable-line rule:truthy
push:
pull_request:
workflow_dispatch:
jobs:
Actionlint:
runs-on: "ubuntu-24.04"
steps:
- uses: "actions/checkout@v4"
- name: "actionlint"
uses: "raven-actions/actionlint@v2"
- uses: "raven-actions/actionlint@v2"
28 changes: 17 additions & 11 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,26 @@ on: # yamllint disable-line rule:truthy
pull_request:
schedule:
- cron: "0 0 * * 1"
workflow_dispatch:
jobs:
Audit:
runs-on: "ubuntu-24.04"
env:
SNYK_TOKEN: "${{ secrets.SNYK_TOKEN }}"
steps:
- uses: "actions/checkout@v4"
- uses: actions/setup-go@v5
with:
go-version: '1.23.3'
- uses: "actions/checkout@v4"
- run: "sudo apt-get update"
- run: "sudo apt-get install -y curl python3-venv"
- run: "curl -LO https://downloads.snyk.io/cli/stable/snyk-linux"
- run: "sudo cp snyk-linux /bin/snyk"
- run: "sudo chmod a+x /bin/snyk"
- run: "./install"
- run: "./build audit"
env:
SNYK_TOKEN: "${{ secrets.SNYK_TOKEN }}"
go-version: "1.24.0"
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: "1.75.0"
- name: "install snyk"
run: |
curl -LO https://downloads.snyk.io/cli/stable/snyk-linux
sudo cp snyk-linux /bin/snyk
sudo chmod a+x /bin/snyk
- run: "make audit"
25 changes: 15 additions & 10 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,24 @@ name: "Lint"
on: # yamllint disable-line rule:truthy
push:
pull_request:
workflow_dispatch:
jobs:
Lint:
runs-on: "ubuntu-24.04"
steps:
- uses: "actions/checkout@v4"
- uses: actions/setup-go@v5
with:
go-version: '1.23.3'
- run: "echo \"${HOME}/bin\" >> \"$GITHUB_PATH\""
- uses: "actions/checkout@v4"
- run: "sudo apt-get update"
- run: "sudo apt-get install -y bash curl python3-venv shellcheck zsh"
- run: "mkdir -p \"$HOME/bin\""
- run: "curl -Lo \"$HOME/bin/kirill\" https://raw.githubusercontent.com/mcandre/kirill/v0.0.1/bin/kirill"
- run: "chmod +x \"$HOME/bin/kirill\""
- run: "./install"
- run: "./build lint"
go-version: "1.24.0"
- name: "install shell linting accessories"
run: |
sudo apt-get update
sudo apt-get install -y shellcheck zsh
- name: "install kirill"
run: |
echo "${HOME}/bin" >>"$GITHUB_PATH"
mkdir -p "$HOME/bin"
curl -Lo "$HOME/bin/kirill" https://raw.githubusercontent.com/mcandre/kirill/v0.0.1/bin/kirill
chmod +x "$HOME/bin/kirill"
- run: "make -f install.mk -j 4"
- run: "make lint"
36 changes: 21 additions & 15 deletions .github/workflows/rubberstamp.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
#
# Rubberstamp
# Rubberstamp v0.0.2
# https://github.com/mcandre/rubberstamp
#
name: "Rubberstamp"
Expand All @@ -12,22 +12,28 @@ on: # yamllint disable-line rule:truthy
# - cron: "*/5 * * * *"
# Once a month
- cron: "0 0 1 * *"
workflow_dispatch:
jobs:
Audit:
runs-on: "ubuntu-24.04"
env:
RUBBERSTAMP_GH_REPO: "${{ github.repository }}"
SSH_KEY: "${{ secrets.SSH_KEY }}"
steps:
- uses: "actions/checkout@v4"
- run: "sudo apt-get update"
- run: "sudo apt-get install -y git"
- run: "date -u >.rubberstamp"
- run: "git remote set-url origin \"[email protected]:${RUBBERSTAMP_GH_REPO}.git\""
env:
RUBBERSTAMP_GH_REPO: "${{ github.repository }}"
- run: "git remote get-url origin"
- run: "git config --global user.email '[email protected]'"
- run: "git config --global user.name 'Rubberstamp'"
- run: "git add .rubberstamp"
- run: "git commit -am 'rubberstamp'"
- run: "echo \"$SSH_KEY\" >/tmp/key && chmod 0600 /tmp/key && git -c 'core.sshCommand=ssh -i /tmp/key' push"
env:
SSH_KEY: "${{ secrets.SSH_KEY }}"
- name: "provision git"
run: |
sudo apt-get update
sudo apt-get install -y git
git config --global user.email '[email protected]'
git config --global user.name 'Rubberstamp'
git config --global core.sshCommand 'ssh -i /tmp/key'
echo "$SSH_KEY" >/tmp/key
chmod 0600 /tmp/key
git remote set-url origin "[email protected]:${RUBBERSTAMP_GH_REPO}.git"
- name: "stamp"
run: |
date -u >.rubberstamp
git add .rubberstamp
git commit -m 'rubberstamp'
git push
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
golang 1.23.3
python 3.12.1
rust 1.75.0
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,23 @@ BSD-2-Clause

# REQUIREMENTS

* GNU or BSD [findutils](https://en.wikipedia.org/wiki/Find_(Unix))html)
* [GNU](https://www.gnu.org/)/[BSD](https://en.wikipedia.org/wiki/Berkeley_Software_Distribution) [findutils](https://en.wikipedia.org/wiki/Find_(Unix))
* POSIX compatible [grep](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html)
* POSIX compatible [sh](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html)
* [ShellCheck](https://www.shellcheck.net/) 0.10.0+
* [Go](https://go.dev/) 1.23.3+
* [Go](https://go.dev/) 1.24.0+
* [kirill](https://github.com/mcandre/kirill) 0.0.1
* POSIX compatible [make](https://pubs.opengroup.org/onlinepubs/9799919799/utilities/make.html)
* [Python](https://www.python.org/) 3.12.1+
* [Rust](https://www.rust-lang.org/) 1.75.0+
* POSIX compatible [sh](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html)
* [ShellCheck](https://www.shellcheck.net/) 0.10.0+
* [Snyk](https://snyk.io/)
* Provision additional dev tools with `./install`
* Provision additional dev tools with `make -f install.mk [-j 4]`

## Recommended

* [ASDF](https://asdf-vm.com/) 0.10 (run `asdf reshim` after provisioning)
* [direnv](https://direnv.net/) 2
* [GNU](https://www.gnu.org/)/[BSD](https://en.wikipedia.org/wiki/Berkeley_Software_Distribution) make

# TERMINAL COLORS

Expand Down
61 changes: 0 additions & 61 deletions build

This file was deleted.

24 changes: 23 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
module github.com/mcandre/dotfiles

go 1.23
go 1.24

tool (
github.com/mcandre/slick/cmd/slick
github.com/mcandre/stank
github.com/mcandre/stank/cmd/funk
github.com/mcandre/stank/cmd/stank
github.com/mcandre/stank/cmd/stink
mvdan.cc/sh/v3/cmd/shfmt
)

require (
github.com/google/renameio/v2 v2.0.0 // indirect
github.com/magefile/mage v1.14.0 // indirect
github.com/mcandre/mage-extras v0.0.20 // indirect
github.com/mcandre/slick v0.0.10 // indirect
github.com/mcandre/stank v0.0.31 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/term v0.25.0 // indirect
mvdan.cc/editorconfig v0.3.0 // indirect
mvdan.cc/sh/v3 v3.10.0 // indirect
)
30 changes: 30 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI=
github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg=
github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo=
github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/mcandre/mage-extras v0.0.20 h1:hUw33CYkuyByVQW7eNv9E0gjTk2SMZ5Y8AWHdD4aVHM=
github.com/mcandre/mage-extras v0.0.20/go.mod h1:zr+/cO9v8EtPmjHMVYx7ijYrbT3tfJSNgXc9ze6LJ4s=
github.com/mcandre/slick v0.0.10 h1:VQaUwecRGcsfgxQR3w6FhZXlc+/wL2GMnl0l6DnjJCo=
github.com/mcandre/slick v0.0.10/go.mod h1:UC5mrxVDxtKnj9vI3ZloSBKVL8U0clqr7LtoQ9w8W10=
github.com/mcandre/stank v0.0.31 h1:x2+qkAbDiAPBjKAIy5VZl9CBlpzpVWchHlx2erX2Qww=
github.com/mcandre/stank v0.0.31/go.mod h1:ilkqyvNlj7W5HORZhdzFuEMTSyNP4chfL9aVUq5KECA=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24=
golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M=
golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA=
golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c=
mvdan.cc/editorconfig v0.3.0 h1:D1D2wLYEYGpawWT5SpM5pRivgEgXjtEXwC9MWhEY0gQ=
mvdan.cc/editorconfig v0.3.0/go.mod h1:NcJHuDtNOTEJ6251indKiWuzK6+VcrMuLzGMLKBFupQ=
mvdan.cc/sh/v3 v3.10.0 h1:v9z7N1DLZ7owyLM/SXZQkBSXcwr2IGMm2LY2pmhVXj4=
mvdan.cc/sh/v3 v3.10.0/go.mod h1:z/mSSVyLFGZzqb3ZIKojjyqIx/xbmz/UHdCSv9HmqXY=
12 changes: 0 additions & 12 deletions install

This file was deleted.

20 changes: 20 additions & 0 deletions install.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.POSIX:
.SILENT:
.PHONY: \
all \
go \
python \
rust

all: go python rust

go:
go install tool

python:
python3 -m venv .venv
.venv/bin/python3 -m pip install --upgrade pip setuptools
.venv/bin/pip3 install -r requirements.txt

rust:
cargo install --force [email protected]
56 changes: 56 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
.POSIX:
.SILENT:
.PHONY: \
all \
audit \
bashate \
funk \
kirill \
lint \
shellcheck \
shfmt \
slick \
snyk \
unmake

all: lint

audit:
snyk

lint: bashate \
funk \
kirill \
shellcheck \
shfmt \
slick

bashate:
stank -print0 -exInterp zsh . | \
xargs -0 -n 1 .venv/bin/bashate -i E006

funk:
funk .

kirill:
kirill -print0 . | \
xargs -0 -n 1 -t jq -r input_filename

shellcheck:
stank -print0 -exInterp zsh . | \
xargs -0 -n 1 shellcheck

shfmt:
stank -print0 -exInterp zsh . | \
xargs -0 -n 1 shfmt -w -i 4

slick:
stank -print0 -sh . | \
xargs -0 -n 1 slick

snyk:
snyk test --all-projects --exclude=requirements.txt
snyk test --command=.venv/bin/python3

unmake:
unmake .
5 changes: 5 additions & 0 deletions vendor/github.com/google/renameio/v2/.golangci.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a526a99

Please sign in to comment.