diff --git a/.vscode/keybindings.json b/.vscode/keybindings.json new file mode 100644 index 00000000..e5b4f417 --- /dev/null +++ b/.vscode/keybindings.json @@ -0,0 +1,45 @@ + +// Workspace keybindings for quick task run +// ctrl+alt+b: Backend (tests & scans) +// ctrl+alt+f: Frontend (tests & scans) +// ctrl+alt+l: Lint (apply auto-fixes) +[ + + { + "key": "ctrl+alt+d", + "command": "workbench.action.tasks.runTask", + "args": "Build & Run Local Docker", + "when": "editorTextFocus" + }, + { + "key": "ctrl+alt+b", + "command": "workbench.action.tasks.runTask", + "args": "Backend: Run All Tests & Scans", + "when": "editorTextFocus" + }, + { + "key": "ctrl+alt+p", + "command": "workbench.action.tasks.runTask", + "args": "Run Pre-commit (Staged Files)", + "when": "editorTextFocus" + }, + { + "key": "ctrl+alt+g", + "command": "workbench.action.tasks.runTask", + "args": "Lint: GolangCI-Lint", + "when": "editorTextFocus" + }, + { + "key": "ctrl+alt+f", + "command": "workbench.action.tasks.runTask", + "args": "Frontend: Run All Tests & Scans", + "when": "editorTextFocus" + } + , + { + "key": "ctrl+alt+l", + "command": "workbench.action.tasks.runTask", + "args": "Lint: Apply Fixes", + "when": "editorTextFocus" + } +] diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 1231d3cd..e4001a6b 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -216,3 +216,73 @@ }, "problemMatcher": ["$go"] } + , + { + "label": "Frontend: Lint Fix", + "type": "shell", + "command": "cd frontend && npm run lint -- --fix", + "group": "test", + "presentation": { + "reveal": "always", + "panel": "shared" + }, + "problemMatcher": [] + }, + { + "label": "Lint: GolangCI-Lint Fix", + "type": "shell", + "command": "cd backend && docker run --rm -v $(pwd):/app:rw -w /app golangci/golangci-lint:latest golangci-lint run --fix -v", + "group": "test", + "presentation": { + "reveal": "always", + "panel": "new" + }, + "problemMatcher": ["$go"] + }, + { + "label": "Frontend: Run All Tests & Scans", + "dependsOn": [ + "Frontend: Type Check", + "Frontend: Test Coverage", + "Run CodeQL Scan (Local)" + ], + "dependsOrder": "sequence", + "group": "test", + "presentation": { + "reveal": "always", + "panel": "shared" + } + }, + { + "label": "Backend: Run All Tests & Scans", + "dependsOn": [ + "Backend: Go Test Coverage", + "Backend: Run Benchmarks (Quick)", + "Run Security Scan (govulncheck)", + "Lint: GolangCI-Lint", + "Lint: Go Race Detector" + ], + "dependsOrder": "sequence", + "group": "test", + "presentation": { + "reveal": "always", + "panel": "new" + } + }, + { + "label": "Lint: Apply Fixes", + "dependsOn": [ + "Frontend: Lint Fix", + "Lint: GolangCI-Lint Fix", + "Lint: Hadolint (Dockerfile)", + "Run Pre-commit (Staged Files)" + ], + "dependsOrder": "sequence", + "group": "test", + "presentation": { + "reveal": "always", + "panel": "new" + } + } + ] + }