Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .cursorrules
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
All contributors must read `.github/AGENTS.md` for complete guidelines. If any rule here conflicts with that file, **AGENTS.md** takes precedence.

## Coding Standards
- Format with `go fmt ./...` and `goimports -w .`.
- Lint with `golangci-lint run` and vet with `go vet ./...`.
- Run `go test ./...` before committing.
- Format with `magex format:fix`.
- Lint with `magex lint` and vet with `magex vet`.
- Run `magex test` before committing.
- Follow Go naming and commenting conventions described in AGENTS.md.

## Commit Messages
Expand All @@ -22,8 +22,7 @@ All contributors must read `.github/AGENTS.md` for complete guidelines. If any r
4. **Impact / Risk**

## Dependency Management
- Manage modules with `go mod tidy` after import changes.
- Run `make govulncheck` to check for vulnerabilities when dependencies change.
- Manage modules with `magex tidy` after import changes.

## Security Reporting
- Do not open public issues for vulnerabilities.
Expand Down
70 changes: 33 additions & 37 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,35 @@
{
"name": "go-template dev container",
"image": "mcr.microsoft.com/devcontainers/go:0-1.24-bullseye",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
},
"mounts": [
"type=cache,target=/home/vscode/.cache/go-build",
"type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock"
],
"runArgs": [
"--cap-drop=ALL",
"--security-opt",
"no-new-privileges:true"
],
"postCreateCommand": "make lint && go vet ./... && go test ./...",
"customizations": {
"vscode": {
"settings": {
"go.useLanguageServer": true,
"go.lintTool": "golangci-lint",
"go.toolsEnvVars": {
"GOFLAGS": "-buildvcs=false"
},
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"extensions": [
"golang.Go",
"github.vscode-github-actions",
"eamodio.gitlens"
]
}
},
"remoteUser": "vscode"
"name": "go-sanitize dev container",
"image": "mcr.microsoft.com/devcontainers/go:0-1.24-bullseye",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
},
"mounts": [
"type=cache,target=/home/vscode/.cache/go-build",
"type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock"
],
"runArgs": ["--cap-drop=ALL", "--security-opt", "no-new-privileges:true"],
"postCreateCommand": "magex lint && magex vet && magex test",
"customizations": {
"vscode": {
"settings": {
"go.useLanguageServer": true,
"go.lintTool": "golangci-lint",
"go.toolsEnvVars": {
"GOFLAGS": "-buildvcs=false"
},
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"extensions": [
"golang.Go",
"github.vscode-github-actions",
"eamodio.gitlens"
]
}
},
"remoteUser": "vscode"
}
73 changes: 73 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
##
## Specific to .dockerignore
##

.git/
Dockerfile
contrib/

##
## Common with .gitignore
##

# Temporary files
*~
*#
.#*

# Vendors
node_modules/
vendor/

# Binaries for programs and plugins
dist/
gin-bin
*.exe
*.exe~
*.dll
*.so
*.dylib

# Byte-compiled / optimized / DLL files
__pycache__/
**/__pycache__/
*.pyc
*.pyo
*.pyd
.Python
*.py[cod]
*$py.class
.pytest_cache/
..mypy_cache/

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Virtual environments
.venv
../venv
.DS_Store
.AppleDouble
.LSOverride
._*

# Temporary directories in the project
bin
tmp

# Project files not needed in the container
.cursorrules
.editorconfig
.github
.gitpod.yml
.golangci.json
.golangci.yml
.goreleaser.yml
.vscode
docs
LICENSE
README.md
codecov.yml
24 changes: 23 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,26 @@ trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_style = space
indent_size = 2 # or 4-spaces if you prefer
indent_size = 2

[*.{json,prettierrc}]
indent_style = space
indent_size = 4

[*.{js,mjs,cjs,ts}]
indent_style = space
indent_size = 4

[*.py]
indent_style = space
indent_size = 4

[{Makefile,*.mk}]
indent_style = tab

[*.{xml,cff}]
indent_style = space
indent_size = 2

[{LICENSE,Dockerfile,.gitignore,.dockerignore,.prettierignore}]
insert_final_newline = true
4 changes: 2 additions & 2 deletions .github/.env.base
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ GO_COVERAGE_PROVIDER=internal
CODECOV_TOKEN_REQUIRED=false

# Go Coverage Tool Version
GO_COVERAGE_VERSION=v1.1.10 # https://github.com/mrz1836/go-coverage
GO_COVERAGE_VERSION=v1.1.11 # https://github.com/mrz1836/go-coverage
GO_COVERAGE_USE_LOCAL=false # Use local version for development

# Core Coverage Settings
Expand Down Expand Up @@ -260,7 +260,7 @@ NANCY_EXCLUDES=CVE-2024-38513,CVE-2023-45142
# ================================================================================================

# Pre-Commit System
GO_PRE_COMMIT_VERSION=v1.1.14 # https://github.com/mrz1836/go-pre-commit
GO_PRE_COMMIT_VERSION=v1.1.15 # https://github.com/mrz1836/go-pre-commit
GO_PRE_COMMIT_USE_LOCAL=false # Use local version for development

# System Settings
Expand Down
3 changes: 2 additions & 1 deletion .github/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ CITATION.cff
**/.golangci.json
**/.golangci.yml
**/.golangci.yaml
**/.env.shared
**/.env.base
**/.env.custom
**/Makefile
**/makefile
**/*.mk
Loading