From eb16452d8bb21d2162bf30a8613ef6c6427258c8 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sun, 14 Dec 2025 00:16:47 +0000 Subject: [PATCH] chore: track VS Code tasks.json and launch.json in git --- .gitignore | 7 +- .vscode/launch.json | 22 ++++ .vscode/tasks.json | 252 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 279 insertions(+), 2 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.gitignore b/.gitignore index 7d1531f3..c92eb730 100644 --- a/.gitignore +++ b/.gitignore @@ -81,8 +81,11 @@ charon.db *~ .DS_Store *.xcf -.vscode/ -.vscode/launch.json +# VS Code - ignore settings but keep shared configs +.vscode/* +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json .vscode.backup*/ # ----------------------------------------------------------------------------- diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..90ad73a3 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,22 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Backend (Docker)", + "type": "go", + "request": "attach", + "mode": "remote", + "substitutePath": [ + { + "from": "${workspaceFolder}", + "to": "/app" + } + ], + "port": 2345, + "host": "127.0.0.1", + "showLog": true, + "trace": "log", + "logOutput": "rpc" + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..d0e12181 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,252 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Build: Local Docker Image", + "type": "shell", + "command": "docker build -t charon:local .", + "group": "build", + "problemMatcher": [], + "presentation": { + "reveal": "always", + "panel": "new" + } + }, + { + "label": "Build: Backend", + "type": "shell", + "command": "cd backend && go build ./...", + "group": "build", + "problemMatcher": ["$go"] + }, + { + "label": "Build: Frontend", + "type": "shell", + "command": "cd frontend && npm run build", + "group": "build", + "problemMatcher": [] + }, + { + "label": "Build: All", + "type": "shell", + "dependsOn": ["Build: Backend", "Build: Frontend"], + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + }, + { + "label": "Test: Backend Unit Tests", + "type": "shell", + "command": "cd backend && go test ./...", + "group": "test", + "problemMatcher": ["$go"] + }, + { + "label": "Test: Backend with Coverage", + "type": "shell", + "command": "scripts/go-test-coverage.sh", + "group": "test", + "problemMatcher": [] + }, + { + "label": "Test: Frontend", + "type": "shell", + "command": "cd frontend && npm run test", + "group": "test", + "problemMatcher": [] + }, + { + "label": "Test: Frontend with Coverage", + "type": "shell", + "command": "scripts/frontend-test-coverage.sh", + "group": "test", + "problemMatcher": [] + }, + { + "label": "Lint: Pre-commit (All Files)", + "type": "shell", + "command": "source .venv/bin/activate && pre-commit run --all-files", + "group": "test", + "problemMatcher": [], + "presentation": { + "reveal": "always", + "panel": "shared" + } + }, + { + "label": "Lint: Go Vet", + "type": "shell", + "command": "cd backend && go vet ./...", + "group": "test", + "problemMatcher": ["$go"] + }, + { + "label": "Lint: GolangCI-Lint (Docker)", + "type": "shell", + "command": "cd backend && docker run --rm -v $(pwd):/app:ro -w /app golangci/golangci-lint:latest golangci-lint run -v", + "group": "test", + "problemMatcher": [] + }, + { + "label": "Lint: Frontend", + "type": "shell", + "command": "cd frontend && npm run lint", + "group": "test", + "problemMatcher": [] + }, + { + "label": "Lint: Frontend (Fix)", + "type": "shell", + "command": "cd frontend && npm run lint -- --fix", + "group": "test", + "problemMatcher": [] + }, + { + "label": "Lint: TypeScript Check", + "type": "shell", + "command": "cd frontend && npm run type-check", + "group": "test", + "problemMatcher": [] + }, + { + "label": "Lint: Markdownlint", + "type": "shell", + "command": "npx markdownlint '**/*.md' --ignore node_modules --ignore .venv --ignore test-results --ignore codeql-db --ignore codeql-agent-results", + "group": "test", + "problemMatcher": [] + }, + { + "label": "Lint: Markdownlint (Fix)", + "type": "shell", + "command": "npx markdownlint '**/*.md' --fix --ignore node_modules --ignore .venv --ignore test-results --ignore codeql-db --ignore codeql-agent-results", + "group": "test", + "problemMatcher": [] + }, + { + "label": "Lint: Hadolint Dockerfile", + "type": "shell", + "command": "docker run --rm -i hadolint/hadolint < Dockerfile", + "group": "test", + "problemMatcher": [] + }, + { + "label": "Security: Trivy Scan", + "type": "shell", + "command": "docker run --rm -v $(pwd):/app aquasec/trivy:latest fs --scanners vuln,secret,misconfig /app", + "group": "test", + "problemMatcher": [] + }, + { + "label": "Security: Go Vulnerability Check", + "type": "shell", + "command": "cd backend && go run golang.org/x/vuln/cmd/govulncheck@latest ./...", + "group": "test", + "problemMatcher": [] + }, + { + "label": "Docker: Start Dev Environment", + "type": "shell", + "command": "docker compose -f docker-compose.dev.yml up -d", + "group": "none", + "problemMatcher": [] + }, + { + "label": "Docker: Stop Dev Environment", + "type": "shell", + "command": "docker compose -f docker-compose.dev.yml down", + "group": "none", + "problemMatcher": [] + }, + { + "label": "Docker: Start Local Environment", + "type": "shell", + "command": "docker compose -f docker-compose.local.yml up -d", + "group": "none", + "problemMatcher": [] + }, + { + "label": "Docker: Stop Local Environment", + "type": "shell", + "command": "docker compose -f docker-compose.local.yml down", + "group": "none", + "problemMatcher": [] + }, + { + "label": "Docker: View Logs", + "type": "shell", + "command": "docker compose logs -f", + "group": "none", + "problemMatcher": [], + "isBackground": true + }, + { + "label": "Docker: Prune Unused Resources", + "type": "shell", + "command": "docker system prune -f", + "group": "none", + "problemMatcher": [] + }, + { + "label": "Integration: Run All", + "type": "shell", + "command": "scripts/integration-test.sh", + "group": "test", + "problemMatcher": [], + "presentation": { + "reveal": "always", + "panel": "new" + } + }, + { + "label": "Integration: Coraza WAF", + "type": "shell", + "command": "scripts/coraza_integration.sh", + "group": "test", + "problemMatcher": [] + }, + { + "label": "Integration: CrowdSec", + "type": "shell", + "command": "scripts/crowdsec_integration.sh", + "group": "test", + "problemMatcher": [] + }, + { + "label": "Integration: CrowdSec Decisions", + "type": "shell", + "command": "scripts/crowdsec_decision_integration.sh", + "group": "test", + "problemMatcher": [] + }, + { + "label": "Integration: CrowdSec Startup", + "type": "shell", + "command": "scripts/crowdsec_startup_test.sh", + "group": "test", + "problemMatcher": [] + }, + { + "label": "Utility: Check Version Match Tag", + "type": "shell", + "command": "scripts/check-version-match-tag.sh", + "group": "none", + "problemMatcher": [] + }, + { + "label": "Utility: Clear Go Cache", + "type": "shell", + "command": "scripts/clear-go-cache.sh", + "group": "none", + "problemMatcher": [] + }, + { + "label": "Utility: Bump Beta Version", + "type": "shell", + "command": "scripts/bump_beta.sh", + "group": "none", + "problemMatcher": [] + } + ] +}