Skip to content

Commit 4a8e213

Browse files
authored
sync: update 40 files from source repository (#168)
1 parent 3db9c1a commit 4a8e213

40 files changed

+4315
-1432
lines changed

.cursorrules

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
All contributors must read `.github/AGENTS.md` for complete guidelines. If any rule here conflicts with that file, **AGENTS.md** takes precedence.
55

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

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

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

2827
## Security Reporting
2928
- Do not open public issues for vulnerabilities.

.devcontainer.json

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,35 @@
11
{
2-
"name": "go-template dev container",
3-
"image": "mcr.microsoft.com/devcontainers/go:0-1.24-bullseye",
4-
"features": {
5-
"ghcr.io/devcontainers/features/github-cli:1": {},
6-
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
7-
},
8-
"mounts": [
9-
"type=cache,target=/home/vscode/.cache/go-build",
10-
"type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock"
11-
],
12-
"runArgs": [
13-
"--cap-drop=ALL",
14-
"--security-opt",
15-
"no-new-privileges:true"
16-
],
17-
"postCreateCommand": "make lint && go vet ./... && go test ./...",
18-
"customizations": {
19-
"vscode": {
20-
"settings": {
21-
"go.useLanguageServer": true,
22-
"go.lintTool": "golangci-lint",
23-
"go.toolsEnvVars": {
24-
"GOFLAGS": "-buildvcs=false"
25-
},
26-
"editor.formatOnSave": true,
27-
"editor.codeActionsOnSave": {
28-
"source.organizeImports": true
29-
}
30-
},
31-
"extensions": [
32-
"golang.Go",
33-
"github.vscode-github-actions",
34-
"eamodio.gitlens"
35-
]
36-
}
37-
},
38-
"remoteUser": "vscode"
2+
"name": "go-sanitize dev container",
3+
"image": "mcr.microsoft.com/devcontainers/go:0-1.24-bullseye",
4+
"features": {
5+
"ghcr.io/devcontainers/features/github-cli:1": {},
6+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
7+
},
8+
"mounts": [
9+
"type=cache,target=/home/vscode/.cache/go-build",
10+
"type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock"
11+
],
12+
"runArgs": ["--cap-drop=ALL", "--security-opt", "no-new-privileges:true"],
13+
"postCreateCommand": "magex lint && magex vet && magex test",
14+
"customizations": {
15+
"vscode": {
16+
"settings": {
17+
"go.useLanguageServer": true,
18+
"go.lintTool": "golangci-lint",
19+
"go.toolsEnvVars": {
20+
"GOFLAGS": "-buildvcs=false"
21+
},
22+
"editor.formatOnSave": true,
23+
"editor.codeActionsOnSave": {
24+
"source.organizeImports": true
25+
}
26+
},
27+
"extensions": [
28+
"golang.Go",
29+
"github.vscode-github-actions",
30+
"eamodio.gitlens"
31+
]
32+
}
33+
},
34+
"remoteUser": "vscode"
3935
}

.dockerignore

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
##
2+
## Specific to .dockerignore
3+
##
4+
5+
.git/
6+
Dockerfile
7+
contrib/
8+
9+
##
10+
## Common with .gitignore
11+
##
12+
13+
# Temporary files
14+
*~
15+
*#
16+
.#*
17+
18+
# Vendors
19+
node_modules/
20+
vendor/
21+
22+
# Binaries for programs and plugins
23+
dist/
24+
gin-bin
25+
*.exe
26+
*.exe~
27+
*.dll
28+
*.so
29+
*.dylib
30+
31+
# Byte-compiled / optimized / DLL files
32+
__pycache__/
33+
**/__pycache__/
34+
*.pyc
35+
*.pyo
36+
*.pyd
37+
.Python
38+
*.py[cod]
39+
*$py.class
40+
.pytest_cache/
41+
..mypy_cache/
42+
43+
# Test binary, build with `go test -c`
44+
*.test
45+
46+
# Output of the go coverage tool, specifically when used with LiteIDE
47+
*.out
48+
49+
# Virtual environments
50+
.venv
51+
../venv
52+
.DS_Store
53+
.AppleDouble
54+
.LSOverride
55+
._*
56+
57+
# Temporary directories in the project
58+
bin
59+
tmp
60+
61+
# Project files not needed in the container
62+
.cursorrules
63+
.editorconfig
64+
.github
65+
.gitpod.yml
66+
.golangci.json
67+
.golangci.yml
68+
.goreleaser.yml
69+
.vscode
70+
docs
71+
LICENSE
72+
README.md
73+
codecov.yml

.editorconfig

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,26 @@ trim_trailing_whitespace = false
1414

1515
[*.{yml,yaml}]
1616
indent_style = space
17-
indent_size = 2 # or 4-spaces if you prefer
17+
indent_size = 2
18+
19+
[*.{json,prettierrc}]
20+
indent_style = space
21+
indent_size = 4
22+
23+
[*.{js,mjs,cjs,ts}]
24+
indent_style = space
25+
indent_size = 4
26+
27+
[*.py]
28+
indent_style = space
29+
indent_size = 4
30+
31+
[{Makefile,*.mk}]
32+
indent_style = tab
33+
34+
[*.{xml,cff}]
35+
indent_style = space
36+
indent_size = 2
37+
38+
[{LICENSE,Dockerfile,.gitignore,.dockerignore,.prettierignore}]
39+
insert_final_newline = true

.github/.env.base

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ GO_COVERAGE_PROVIDER=internal
130130
CODECOV_TOKEN_REQUIRED=false
131131

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

136136
# Core Coverage Settings
@@ -260,7 +260,7 @@ NANCY_EXCLUDES=CVE-2024-38513,CVE-2023-45142
260260
# ================================================================================================
261261

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

266266
# System Settings

.github/.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ CITATION.cff
6767
**/.golangci.json
6868
**/.golangci.yml
6969
**/.golangci.yaml
70-
**/.env.shared
70+
**/.env.base
71+
**/.env.custom
7172
**/Makefile
7273
**/makefile
7374
**/*.mk

0 commit comments

Comments
 (0)