Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions .github/workflows/test-and-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,16 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "^1.24.1"

- name: Get libgit2 cache key from submodule committish
id: cache-key
run: echo "key=$(git ls-tree --object-only HEAD git2go)" >> $GITHUB_OUTPUT

- name: Cache libgit2
uses: actions/cache@v4
with:
path: git2go/static-build/install
key: ${{ steps.cache-key.outputs.key }}
go-version: "^1.25"

- name: Build libgit2 from submodule
run: make install-static
working-directory: git2go

- name: Run unit test
run: make test

- name: Lint with golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: "v2.2.1"
version: "v2.6.1"
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

10 changes: 3 additions & 7 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ linters:
- path: '^auth/cache\.go$'
linters:
- gosec
# crypto/sha1 is used for hashing, not encryption.
# crypto/sha1 is used for hashing, not encryption.
text: "weak cryptographic primitive"
- path: '^cmd/toolkit-assume-role/main\.go$'
linters:
Expand All @@ -114,10 +114,9 @@ linters:
text: "G114: Use of net/http serve function that has no support for setting timeouts"
paths:
- adhoc/
- git2go/

issues:
max-issues-per-linter: 0
max-issues-per-linter: 0
max-same-issues: 0
formatters:
enable:
Expand All @@ -129,7 +128,4 @@ formatters:
- standard
- default
- localmodule
exclusions:
paths:
- git2go/


7 changes: 6 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
repos:
- repo: https://github.com/golangci/golangci-lint
rev: v2.2.1
rev: v2.6.1
hooks:
- id: golangci-lint-config-verify
- id: golangci-lint-fmt
- id: golangci-lint-full

- repo: https://github.com/godaddy/tartufo
rev: v6.0.0
hooks:
- id: tartufo
10 changes: 0 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.DEFAULT_GOAL := all

export PKG_CONFIG_PATH=$(CURDIR)/git2go/static-build/install/lib/pkgconfig

test:
@go test ./...
.PHONY: test
Expand Down Expand Up @@ -32,11 +30,3 @@ lint-all:

all: test lint
.PHONY: all

toolkit-git-hook:
@go build -tags static ./cmd/toolkit-git-hook
.PHONY: toolkit-git-hook

try-run-hook: toolkit-git-hook
@./toolkit-git-hook
.PHONY: test-run-hook
1 change: 1 addition & 0 deletions cmd/toolkit-assume-role/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func registerFlagsAndHelp() {

flag.Usage = func() {
_, _ = fmt.Fprintf(flag.CommandLine.Output(), helpMsg, os.Args[0])

flag.PrintDefaults()
}
}
Expand Down
14 changes: 0 additions & 14 deletions cmd/toolkit-git-hook/main.go

This file was deleted.

1 change: 1 addition & 0 deletions cmd/toolkit-serve-static/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func main() {

flag.Usage = func() {
_, _ = fmt.Fprintf(flag.CommandLine.Output(), helpMsg, os.Args[0])

flag.PrintDefaults()
}

Expand Down
1 change: 0 additions & 1 deletion git2go
Submodule git2go deleted from c1ec21
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ require (
github.com/charmbracelet/lipgloss v1.1.0
github.com/davecgh/go-spew v1.1.1
github.com/goccy/go-yaml v1.18.0
github.com/libgit2/git2go/v34 v34.0.0
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
github.com/stretchr/testify v1.10.0
github.com/yuin/goldmark v1.7.13
Expand Down Expand Up @@ -49,7 +48,6 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c // indirect
golang.org/x/sync v0.15.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/text v0.3.8 // indirect
Expand Down
14 changes: 0 additions & 14 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,8 @@ github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM=
github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
github.com/libgit2/git2go/v34 v34.0.0 h1:UKoUaKLmiCRbOCD3PtUi2hD6hESSXzME/9OUZrGcgu8=
github.com/libgit2/git2go/v34 v34.0.0/go.mod h1:blVco2jDAw6YTXkErMMqzHLcAjKkwF0aWIRHBqiJkZ0=
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
Expand Down Expand Up @@ -95,27 +91,17 @@ github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavM
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
github.com/yuin/goldmark v1.7.13 h1:GPddIs617DnBLFFVJFgpo1aBfe/4xcvMc3SB5t/D0pA=
github.com/yuin/goldmark v1.7.13/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c h1:9HhBz5L/UjnK9XLtiZhYAdue5BVKep3PMmS2LuPDt8k=
golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561 h1:MDc5xs78ZrZr3HMQugiXOAkSZtfTpbJLDr/lwfgO53E=
golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w=
golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221 h1:/ZHdbVpdR/jk3g30/d4yUL0JU9kksj8+F/bnQUVLGDM=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
Expand Down