From 3197a19ee03d88b4b4b5e915e0d74715d12bf478 Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Tue, 19 Mar 2024 13:43:31 +0800 Subject: [PATCH 1/2] chore: update Makefile Copy updates from ssh-portal. --- Makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7ac9490..4655e5c 100644 --- a/Makefile +++ b/Makefile @@ -14,4 +14,19 @@ generate: mod-tidy .PHONY: build build: - GOVERSION=$$(go version) goreleaser build --rm-dist --debug --snapshot + GOVERSION=$$(go version) \ + goreleaser build --clean --debug --single-target --snapshot + +.PHONY: lint +lint: + golangci-lint run --enable gocritic + +.PHONY: fuzz +fuzz: mod-tidy generate + go test -fuzz='^Fuzz' -fuzztime=10s -v ./internal/server + +.PHONY: cover +cover: mod-tidy generate + go test -v -covermode=atomic -coverprofile=cover.out.raw -coverpkg=./... ./... + grep -Ev 'internal/mock|_enumer.go' cover.out.raw > cover.out + go tool cover -html=cover.out From 160a4786d2de5aea5f7771edbb7be43e6be16712 Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Tue, 19 Mar 2024 13:50:09 +0800 Subject: [PATCH 2/2] chore: remove codeql advanced workflow Rely on default config instead. --- .github/workflows/codeql-analysis.yaml | 32 -------------------------- 1 file changed, 32 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yaml diff --git a/.github/workflows/codeql-analysis.yaml b/.github/workflows/codeql-analysis.yaml deleted file mode 100644 index 08eb2d5..0000000 --- a/.github/workflows/codeql-analysis.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: codeQL -on: - push: - branches: - - main - pull_request: - branches: - - main -permissions: {} -jobs: - analyze: - permissions: - actions: read - contents: read - security-events: write - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - language: - - go - steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 - with: - go-version: stable - - name: Initialize CodeQL - uses: github/codeql-action/init@3ab4101902695724f9365a384f86c1074d94e18c # v3.24.7 - with: - languages: ${{ matrix.language }} - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@3ab4101902695724f9365a384f86c1074d94e18c # v3.24.7