From b5c70b8138efe6473d9163c16265e6e7004c86a0 Mon Sep 17 00:00:00 2001 From: e_forbes Date: Wed, 3 Sep 2025 15:28:24 +0100 Subject: [PATCH 1/3] feat: removes lint.sh and migrates linting task to mise.toml Small repository tidy-up. This removes a top-level script and adds a corresponding task to the .mise.toml file. --- .mise.toml | 6 ++++++ lint.sh | 9 --------- 2 files changed, 6 insertions(+), 9 deletions(-) delete mode 100755 lint.sh diff --git a/.mise.toml b/.mise.toml index e7d2015..b87b424 100644 --- a/.mise.toml +++ b/.mise.toml @@ -6,3 +6,9 @@ legacy_version_file = false [plugins] # Use this section to configure the source of any custom mise/asdf plugin + +[tasks.lint] +description = "runs golangci-lint" +run = ''' +golangci-lint run --timeout 5m +''' diff --git a/lint.sh b/lint.sh deleted file mode 100755 index cfe341f..0000000 --- a/lint.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env sh - -set -eux -# Write the code coverage report to gl-code-quality-report.json -# and print linting issues to stdout in the format: path/to/file:line description -# https://docs.gitlab.com/ee/development/go_guide/#automatic-linting -golangci-lint run --timeout 5m --out-format code-climate | - tee gl-code-quality-report.json | - jq -r '.[] | "\(.location.path):\(.location.lines.begin) \(.description)"' -- GitLab From bf564602171694fcf33af202a76c13295e822a66 Mon Sep 17 00:00:00 2001 From: e_forbes Date: Wed, 3 Sep 2025 15:44:14 +0100 Subject: [PATCH 2/3] feat: migrates the go mod tidy command to mise.toml This is just another step forward towards simplifying how tasks are run within this repository and reducing the number of top level files we have to traverse over. --- .mise.toml | 4 ++++ tidy.sh | 9 --------- 2 files changed, 4 insertions(+), 9 deletions(-) delete mode 100755 tidy.sh diff --git a/.mise.toml b/.mise.toml index b87b424..a7450bc 100644 --- a/.mise.toml +++ b/.mise.toml @@ -12,3 +12,7 @@ description = "runs golangci-lint" run = ''' golangci-lint run --timeout 5m ''' + +[tasks.tidy] +description = "runs go mod tidy" +run = "go mod tidy" diff --git a/tidy.sh b/tidy.sh deleted file mode 100755 index 090dfb5..0000000 --- a/tidy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env sh - -set -eux - -# Check go tidy -git diff go.sum go.mod >/tmp/gomod-"${CI_JOB_ID}"-before -git diff go.sum go.mod >/tmp/gomod-"${CI_JOB_ID}"-after -go mod tidy -diff -U0 /tmp/gomod-"${CI_JOB_ID}"-before /tmp/gomod-"${CI_JOB_ID}"-after -- GitLab From 77ab9596f6a2f0f24f46f3b00c097135e2a4952b Mon Sep 17 00:00:00 2001 From: e_forbes Date: Wed, 3 Sep 2025 17:19:46 +0100 Subject: [PATCH 3/3] feat: two more mise tasks to make development a little easier --- .mise.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.mise.toml b/.mise.toml index a7450bc..c3c9532 100644 --- a/.mise.toml +++ b/.mise.toml @@ -16,3 +16,11 @@ golangci-lint run --timeout 5m [tasks.tidy] description = "runs go mod tidy" run = "go mod tidy" + +[tasks.test] +description = "runs all tests" +run = "go test -v ./..." + +[tasks.run-test] +description = "runs a single test by name - mise run-test TestName" +run = 'go test -v ./... -run ^{{arg(name="test")}}$' -- GitLab