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
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v1.19.0
_commit: v1.22.0
_src_path: https://github.com/hugoh/go-tools.git
coverage_total: 80
golangci_extra_disable: []
Expand Down
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# DO NOT EDIT — managed by hugoh/go-tools via copier.
root = true

[mise-tasks/*]
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# DO NOT EDIT — managed by hugoh/go-tools via copier.
---
name: CI

Expand All @@ -18,18 +19,18 @@ permissions: {}

jobs:
hk:
uses: hugoh/go-tools/.github/workflows/go-hk.yml@37285d93779492692decb112f28f287551effedd
uses: hugoh/go-tools/.github/workflows/go-hk.yml@2ce644c50c3878427a4fb98ca076ad3c3463f016 # v1.22.0
permissions:
contents: read

goci:
uses: hugoh/go-tools/.github/workflows/go-ci.yml@37285d93779492692decb112f28f287551effedd
uses: hugoh/go-tools/.github/workflows/go-ci.yml@2ce644c50c3878427a4fb98ca076ad3c3463f016 # v1.22.0
permissions:
contents: read

release:
needs: [hk, goci]
uses: hugoh/go-tools/.github/workflows/go-release.yml@37285d93779492692decb112f28f287551effedd
uses: hugoh/go-tools/.github/workflows/go-release.yml@2ce644c50c3878427a4fb98ca076ad3c3463f016 # v1.22.0
permissions:
contents: write
with:
Expand Down
7 changes: 7 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# DO NOT EDIT — managed by hugoh/go-tools via copier.
version: "2"
linters:
default: all
Expand All @@ -23,3 +24,9 @@ formatters:
- gofumpt
- goimports
- golines
settings:
gofumpt:
extra:
group-params: true
clothe-returns: true
balance-calls: true
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# DO NOT EDIT — managed by hugoh/go-tools via copier.
version: 2

builds:
Expand Down
1 change: 1 addition & 0 deletions .jscpd.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"//": "DO NOT EDIT — managed by hugoh/go-tools via copier.",
"minLines": 8,
"threshold": 3
}
1 change: 1 addition & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"//": "DO NOT EDIT — managed by hugoh/go-tools via copier.",
"MD013": false
}
1 change: 1 addition & 0 deletions .renovaterc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
// DO NOT EDIT — managed by hugoh/go-tools via copier.
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>hugoh/go-tools:go-renovaterc",
Expand Down
1 change: 1 addition & 0 deletions .testcoverage.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# DO NOT EDIT — managed by hugoh/go-tools via copier.
profile: cover.out

threshold:
Expand Down
8 changes: 0 additions & 8 deletions biome.json

This file was deleted.

15 changes: 15 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// DO NOT EDIT — managed by hugoh/go-tools via copier.
"$schema": "https://biomejs.dev/schemas/2.5.4/schema.json",
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
},
"overrides": [
{
"includes": ["**/.renovaterc.json"],
"json": { "parser": { "allowComments": true } }
}
]
}
1 change: 1 addition & 0 deletions cog.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# DO NOT EDIT — managed by hugoh/go-tools via copier.
tag_prefix = "v"
disable_changelog = true
disable_bump_commit = true
Expand Down
7 changes: 4 additions & 3 deletions hk.pkl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
amends "package://github.com/jdx/hk/releases/download/v1.56.0/hk@1.56.0#/Config.pkl"
import "package://github.com/jdx/hk/releases/download/v1.56.0/hk@1.56.0#/Builtins.pkl"
import "package://github.com/hugoh/hk-config/releases/download/v1.4.1/hk-config@1.4.1#/base.pkl" as Base
// DO NOT EDIT — managed by hugoh/go-tools via copier.
amends "package://github.com/jdx/hk/releases/download/v1.57.0/hk@1.57.0#/Config.pkl"
import "package://github.com/jdx/hk/releases/download/v1.57.0/hk@1.57.0#/Builtins.pkl"
import "package://github.com/hugoh/hk-config/releases/download/v1.7.0/hk-config@1.7.0#/base.pkl" as Base

min_hk_version = Base.min_hk_version

Expand Down
2 changes: 1 addition & 1 deletion internal/cmd_handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ func TestReboot_ConfirmationDefaultsToNo(t *testing.T) {
})
}

func testRebootConfirm(t *testing.T, confirmResult bool, expectCalled bool, msg string) {
func testRebootConfirm(t *testing.T, confirmResult, expectCalled bool, msg string) {
t.Helper()

mg := &mockGateway{}
Expand Down
1 change: 1 addition & 0 deletions mise-tasks/build
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Build application"
#MISE sources=["**/*.go", "go.mod", "go.sum"]
go build -o "dist/$(basename "$(go list -m | sed -E 's|/v[0-9]+$||')")" .
1 change: 1 addition & 0 deletions mise-tasks/ci
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Run full CI pipeline (lint, tests, coverage, build)"
#MISE depends=["lint", "ci-core", "build"]
true
1 change: 1 addition & 0 deletions mise-tasks/ci-core
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Run core CI checks (test, coverage, integration)"
#MISE depends=["coverage", "test-int"]
true
1 change: 1 addition & 0 deletions mise-tasks/clean
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Clean the project"
go clean
rm -f "$COVEROUT"
1 change: 1 addition & 0 deletions mise-tasks/coverage
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Check test coverage"
#MISE depends=["test"]
go-test-coverage -config .testcoverage.yml
1 change: 1 addition & 0 deletions mise-tasks/depup
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Upgrade dependencies"
set -e
go get -u -t ./...
Expand Down
1 change: 1 addition & 0 deletions mise-tasks/dev
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Development mode"
go run . "$@"
1 change: 1 addition & 0 deletions mise-tasks/fix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Lint and fix code"
set -e
mise run lint-mod
Expand Down
1 change: 1 addition & 0 deletions mise-tasks/format
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Format the code"
#MISE sources=["**/*.go", "**/*.json", "**/*.md", "**/*.toml", "**/*.yaml", "**/*.yml"]
set -e
Expand Down
1 change: 1 addition & 0 deletions mise-tasks/full-check
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Run full pre-commit validation (format, fix, core CI)"
set -e
mise run format
Expand Down
1 change: 1 addition & 0 deletions mise-tasks/lint
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Lint code, check dead code"
#MISE depends=["lint-mod", "lint-deadcode --test", "lint-vuln", "lint-go", "lint-release"]
true
1 change: 1 addition & 0 deletions mise-tasks/lint-deadcode
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Check for dead code"
#MISE sources=["**/*.go"]
#USAGE flag "--test" help="Include test files"
Expand Down
1 change: 1 addition & 0 deletions mise-tasks/lint-go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Lint Go source"
#MISE sources=["**/*.go"]
#USAGE flag "--fix" help="Automatically fix issues"
Expand Down
1 change: 1 addition & 0 deletions mise-tasks/lint-mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Check go.mod tidiness"
#MISE sources=["go.mod", "**/*.go"]
go mod tidy -diff
1 change: 1 addition & 0 deletions mise-tasks/lint-release
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Check release config if present"
#MISE sources=[".goreleaser.yml"]
set -uo pipefail
Expand Down
1 change: 1 addition & 0 deletions mise-tasks/lint-vuln
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Scan dependencies for known vulnerabilities"
#MISE sources=["go.mod", "go.sum"]
govulncheck ./...
1 change: 1 addition & 0 deletions mise-tasks/test
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Run tests with coverage"
#MISE sources=["go.mod", "**/*.go"]
gotestsum -- -race -shuffle=on -coverprofile="$COVEROUT" -covermode=atomic ./...
1 change: 1 addition & 0 deletions mise-tasks/test-int
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Run integration tests"
#MISE sources=["go.mod", "**/*.go"]
test ! -d internal || gotestsum -- -race -tags=integration ./internal/...
1 change: 1 addition & 0 deletions mise-tasks/tidy
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
# DO NOT EDIT — managed by hugoh/go-tools via copier.
#MISE description="Tidy the module"
go mod tidy -v
21 changes: 11 additions & 10 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
# DO NOT EDIT — managed by hugoh/go-tools via copier.
[tools]
go = "1.27.0"
golangci-lint = "2.13.1"
golangci-lint = "2.13.2"
gotestsum = "1.13.0"
"go:github.com/vladopajic/go-test-coverage/v2" = "2.19.0"
"go:golang.org/x/tools/cmd/deadcode" = "0.49.0"
"go:golang.org/x/vuln/cmd/govulncheck" = "1.7.0"
#
goreleaser = "2.17.1"
goreleaser = "2.18.0"
#
cocogitto = "7.0.0"
hk = "1.52.0"
rumdl = "0.2.34"
zizmor = "1.27.0"
hk = "1.57.0"
rumdl = "0.2.60"
zizmor = "1.29.0"
biome = "2.5.4"
ghalint = "1.5.6"
gitleaks = "8.30.1"
actionlint = "1.7.12"
typos = "1.48.0"
pinact = "4.1.0"
copier = "9.17.0"
pinact = "4.1.1"
typos = "1.49.0"
copier = "9.17.2"
shellcheck = "0.11.0"
"github:anordal/shellharden" = "4.3.2"
shfmt = "3.13.1"
tombi = "1.2.0"
tombi = "1.4.1"
"github:owenlamont/ryl" = "0.21.0"
"npm:cpd" = "5.0.10"
"npm:cpd" = "5.0.16"

[env]
COVEROUT = "cover.out"
Expand Down