File tree Expand file tree Collapse file tree 5 files changed +43
-4
lines changed
Expand file tree Collapse file tree 5 files changed +43
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ DEVELOPMENT WORKFLOW:
66- Build: Use 'go build -o cu ./cmd/cu' or 'dagger call build --platform=current export --path ./cu'
77- Test: Run 'go test ./...' for all tests, 'go test -short ./...' for unit tests only, or 'go test -count=1 -v ./environment' for integration tests
88- Format: Always run 'go fmt ./...' before committing
9+ - Lint: Run 'golangci-lint run' to check for linting issues
910- Dependencies: Run 'go mod download' to install dependencies, 'go mod tidy' to clean up
1011
1112DAGGER MODULE (more details in .dagger/):
@@ -17,11 +18,12 @@ AVAILABLE TOOLS:
1718- Docker (for container runtime needed by the tool)
1819- Dagger v0.18.11 (matches dagger.json)
1920- Git with test user configured (test dependency, NOT for version control)
21+ - golangci-lint v1.61.0 (Go linter with various checks)
2022
2123PROJECT STRUCTURE:
2224- cmd/cu: Main CLI application entry point
2325- environment/: Core environment management logic
2426- mcpserver/: MCP (Model Context Protocol) server implementation
2527- examples/: Example configurations and usage
2628- docs/: Documentation and images
27- - .dagger/: Dagger module configuration
29+ - .dagger/: Dagger module configuration
Original file line number Diff line number Diff line change 66 " curl -fsSL https://get.docker.com | sh" ,
77 " cd /tmp \u0026\u0026 curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=v0.18.11 sh \u0026\u0026 cp ./bin/dagger /usr/local/bin/dagger" ,
88 " git config --global user.name \" Test User\" " ,
9- " git config --global user.email \" test@dagger.com\" "
9+ " git config --global user.email \" test@dagger.com\" " ,
10+ " curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/bin v1.61.0"
1011 ]
11- }
12+ }
Original file line number Diff line number Diff line change @@ -86,3 +86,11 @@ func (m *ContainerUse) Test(ctx context.Context,
8686 WithExec (args , dagger.ContainerWithExecOpts {ExperimentalPrivilegedNesting : true }).
8787 Stdout (ctx )
8888}
89+
90+ // Test runs the linter
91+ func (m * ContainerUse ) Lint (ctx context.Context ) error {
92+ return dag .
93+ Golangci ().
94+ Lint (m .Source , dagger.GolangciLintOpts {}).
95+ Assert (ctx )
96+ }
Original file line number Diff line number Diff line change 1+ name : Lint
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+ workflow_dispatch :
9+
10+ jobs :
11+ lint :
12+ name : Lint
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+
18+ - name : Run tests
19+ uses : dagger/dagger-for-github@8.0.0
20+ with :
21+ version : " latest"
22+ verb : call
23+ args : lint
Original file line number Diff line number Diff line change 11{
22 "name" : " container-use" ,
3- "engineVersion" : " v0.18.11 " ,
3+ "engineVersion" : " v0.18.12 " ,
44 "sdk" : {
55 "source" : " go"
66 },
1010 "source" : " github.com/dagger/dagger/modules/go" ,
1111 "pin" : " ccb4c2d98bce247d22c6b281126eac0ed7c41071"
1212 },
13+ {
14+ "name" : " golangci" ,
15+ "source" : " github.com/dagger/dagger/modules/golangci" ,
16+ "pin" : " a569ec610a25df6c94cfe4bb55be02a8ade11f32"
17+ },
1318 {
1419 "name" : " goreleaser" ,
1520 "source" : " github.com/act3-ai/dagger/goreleaser" ,
You can’t perform that action at this time.
0 commit comments