Skip to content

Commit 17d963c

Browse files
committed
fix more issue
Signed-off-by: yxxhero <aiopsclub@163.com>
1 parent 1d0dfec commit 17d963c

3 files changed

Lines changed: 7 additions & 37 deletions

File tree

.github/copilot-instructions.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,18 @@ Always reference these instructions first and fallback to search or bash command
99
**Prerequisites:**
1010
- Go >= 1.21 (currently uses Go 1.24.5)
1111
- Helm v3 (tested with v3.17.4 and v3.18.6)
12-
- Make sure `/home/runner/go/bin` is in your PATH for staticcheck: `export PATH=$PATH:/home/runner/go/bin`
1312

14-
**Bootstrap and Build Process:**
15-
- ALWAYS run: `make bootstrap` first - downloads dependencies and installs staticcheck. Takes <1 second (if already done) or ~50 seconds (first time).
16-
- Build the plugin: `make build` - includes linting and compiles the binary. Takes ~9 seconds after bootstrap.
17-
- NEVER CANCEL builds. Set timeout to 3+ minutes for bootstrap, 2+ minutes for build operations.
13+
**Build Process:**
14+
- Build the plugin: `make build` - includes linting and compiles the binary.
15+
- NEVER CANCEL builds. Set timeout to 2+ minutes for build operations.
1816

1917
**Testing:**
2018
- Run unit tests: `make test` - includes coverage analysis. Takes ~12 seconds. NEVER CANCEL - set timeout to 3+ minutes.
2119
- Tests include comprehensive coverage (38.7% overall) and use a fake helm binary for isolation.
2220
- Test coverage is generated in `cover.out` with detailed function-level coverage reports.
2321

2422
**Linting and Code Quality:**
25-
- Local linting: `make lint` - runs gofmt, go vet, and staticcheck verification. Takes ~2 seconds.
23+
- Local linting: `make lint` - runs gofmt, go vet. Takes ~2 seconds.
2624
- Code formatting: `make format` - applies gofmt formatting automatically. Takes <1 second.
2725
- Full golangci-lint runs only in CI via GitHub Actions, not available locally.
2826
- ALWAYS run `make format` and `make lint` before committing changes.
@@ -63,8 +61,7 @@ Always reference these instructions first and fallback to search or bash command
6361

6462
**CRITICAL: NEVER CANCEL long-running commands. Use these timeout values:**
6563

66-
- `make bootstrap`: <1 second (if already done) or ~50 seconds (first time) (set timeout: 5+ minutes)
67-
- `make build`: ~9 seconds after bootstrap (set timeout: 3+ minutes)
64+
- `make build`: ~9 seconds (set timeout: 3+ minutes)
6865
- `make test`: ~12 seconds (set timeout: 3+ minutes)
6966
- `make lint`: ~2 seconds (set timeout: 1 minute)
7067
- `make format`: <1 second (set timeout: 1 minute)
@@ -77,7 +74,7 @@ Always reference these instructions first and fallback to search or bash command
7774
- `cmd/` - Command-line interface implementation (upgrade, release, revision, rollback, version)
7875
- `diff/` - Core diffing logic and output formatting
7976
- `manifest/` - Kubernetes manifest parsing and handling
80-
- `scripts/` - Build and verification scripts (gofmt, govet, staticcheck)
77+
- `scripts/` - Build and verification scripts (gofmt, govet)
8178
- `testdata/`, `*/testdata/` - Test fixtures and mock data
8279
- `plugin.yaml` - Helm plugin configuration
8380
- `install-binary.sh` - Cross-platform installation script
@@ -114,7 +111,6 @@ HELM_NAMESPACE=default HELM_BIN=helm ./bin/diff upgrade --install --dry-run my-r
114111
**Common Commands Reference:**
115112
```bash
116113
# Full development cycle
117-
make bootstrap # Install dependencies (once)
118114
make build # Build with linting
119115
make test # Run all tests
120116
make format # Format code

Makefile

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ lint:
3030
scripts/update-gofmt.sh
3131
scripts/verify-gofmt.sh
3232
scripts/verify-govet.sh
33-
scripts/verify-staticcheck.sh
3433

3534
.PHONY: build
3635
build: lint
@@ -42,11 +41,6 @@ test:
4241
go test -v ./... -coverprofile cover.out -race
4342
go tool cover -func cover.out
4443

45-
.PHONY: bootstrap
46-
bootstrap:
47-
go mod download
48-
command -v staticcheck || go install honnef.co/go/tools/cmd/staticcheck@latest
49-
5044
.PHONY: docker-run-release
5145
docker-run-release: export pkg=/go/src/github.com/databus23/helm-diff
5246
docker-run-release:
@@ -63,7 +57,7 @@ docker-run-release:
6357
-v ${SSH_AUTH_SOCK}:/tmp/ssh-agent.sock -e SSH_AUTH_SOCK=/tmp/ssh-agent.sock \
6458
-v $(shell pwd):$(pkg) \
6559
-v $(shell pwd)/docker-run-release-cache:/.cache \
66-
-w $(pkg) helm-diff-release make bootstrap release
60+
-w $(pkg) helm-diff-release make release
6761

6862
.PHONY: dist
6963
dist: export COPYFILE_DISABLE=1 #teach OSX tar to not put ._* files in tar archive

scripts/verify-staticcheck.sh

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)