- Tekton pipeline integration with Git providers: GitHub, GitLab, Bitbucket, Gitea
- Targets arm64 and amd64 architectures
- Uses
kofor building container images in development
Go files: make fumpt to format
Python files: make fix-python-errors
Markdown files: make fix-markdownlint && make fix-trailing-spaces
make test- Run test suitemake lint- Check code qualitymake check- Combined lint + test
Pre-commit hooks: Install with pre-commit install
- Runs on push (skip with
git push --no-verify) - Linters: golangci-lint, yamllint, markdownlint, ruff, shellcheck, vale, codespell
- Skip specific hook:
SKIP=hook-name git push
-
Use table-driven tests: Anonymous struct pattern with
tests := []struct{...}{...} -
No underscores in test names: Use PascalCase like
TestGetTektonDir, notTestGetTektonDir_Something -
Subtest naming: Use descriptive
namefield fort.Run(tt.name, ...) -
Complex setup: Add
setup func(t *testing.T, ...)field to test struct instead of creating separate test functions -
Example:
func TestGetTektonDir(t *testing.T) { tests := []struct { name string event *info.Event setup func(t *testing.T, mux *http.ServeMux) }{ { name: "simple case", event: &info.Event{...}, setup: func(t *testing.T, mux *http.ServeMux) { t.Helper() mux.HandleFunc("/repos/...", ...) }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { ... }) } }
- Use
gotest.tools/v3/assert(never testify or pkg/assert)assert.NilError(t, err)- verify no errorassert.Assert(t, condition, msg)- general assertionsassert.Equal(t, expected, actual)- equality checksassert.ErrorContains(t, err, substring)- error validation
- Unit tests: Fast, focused, use mocks from
pkg/test/github - E2E tests: Require specific setup - always ask user to run and copy output
- Gitea tests: Most comprehensive and self-contained
make test- Run test suitemake test-no-cache- Run without cachemake html-coverage- Generate coverage report
- Add:
go get -u dependency - Always run after:
make vendor(required!) - Update Go version:
go mod tidy -go=1.20 - Remove unnecessary
replaceclauses in go.mod
- Preview:
make dev-docs(http://localhost:1313) - Hugo with hugo-book theme
- Custom shortcodes:
tech_preview,support_matrix
make help- Show all make targetsmake all- Build, test, lintmake clean- Clean artifactsmake fix-linters- Auto-fix most linting issues
For complex workflows, use these repo-local skills:
- Commit messages: Conventional commits with Jira integration, line length validation, required footers. Trigger: "create commit", "commit changes", "generate commit message"
- Jira tickets: SRVKP story and bug templates with Jira markdown formatting. Trigger: "create Jira story", "create Jira bug", "SRVKP ticket"