Skip to content

Commit

Permalink
Merge pull request #54 from raft-tech/feature/vscode
Browse files Browse the repository at this point in the history
Adds VS Code files
  • Loading branch information
R-Sandor authored Dec 23, 2024
2 parents 6fa9384 + 48704e1 commit 2fc2940
Show file tree
Hide file tree
Showing 8 changed files with 137 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp

// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"golang.go",
"SonarSource.sonarlint-vscode"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": [

]
}
22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Go Test",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${fileDirname}",
"env": {
"PATH": "${env:PATH}:${workspaceFolder}/bin"
},
"presentation": {
"hidden": false,
"group": "test",
"order": 1,

},
"preLaunchTask": "go: build inspections",
}
]
}
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"go.testEnvVars": {
"PATH": "${env:PATH}:${workspaceFolder}/bin"
},
"go.testFlags": [
"--ginkgo.github-output"
],
"sonarlint.connectedMode.project": {
"connectionId": "raft-tech",
"projectKey": "raft-tech_konfirm-inspect"
}
}
80 changes: 80 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "go: test",
"group": {
"kind": "test",
"isDefault": true
},
"type": "go",
"command": "test",
"args": ["./cmd/...", "./internal/...", "./pkg/..."],
"options": {
"env": {
"PATH": "${env:PATH}:${workspaceFolder}/bin"
}
},
"problemMatcher": [
"$go"
]
},
{
"label": "go: build inspections",
"detail": "Buils all Konfirm inspections required for testing",
"dependsOn": [
"go: build konfirm-http",
"go: build konfirm-storage"
],
"problemMatcher": [
"$go"
]
},
{
"label": "go: build konfirm-http",
"detail": "Builds konfirm-http, which is required for testing",
"group": "build",
"hide": true,
"type": "go",
"command": "test",
"args": [
"-tags",
"inspection",
"-c",
"-o",
"bin/konfirm-http",
"./inspections/http"
],
"problemMatcher": [
"$go"
],
"presentation": {
"reveal": "silent",
"revealProblems": "onProblem",
}
},
{
"label": "go: build konfirm-storage",
"detail": "Builds konfirm-storage, which is required for testing",
"group": "build",
"hide": true,
"type": "go",
"command": "test",
"args": [
"-tags",
"inspection",
"-c",
"-o",
"bin/konfirm-storage",
"./inspections/storage"
],
"problemMatcher": [
"$go"
],
"presentation": {
"reveal": "silent",
"revealProblems": "onProblem",
}
}
]
}
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ inspect:

.PHONY: bin/konfirm-http
bin/konfirm-http:
go test -c -o bin/konfirm-http ./inspections/http
go test -tags inspection -c -o bin/konfirm-http ./inspections/http

.PHONY: bin/konfirm-storage
bin/konfirm-storage:
go test -c -o bin/konfirm-storage ./inspections/storage
go test -tags inspection -c -o bin/konfirm-storage ./inspections/storage
2 changes: 2 additions & 0 deletions inspections/http/inspection_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build inspection

/*
* Copyright (c) 2024 Raft, LLC
*
Expand Down
3 changes: 3 additions & 0 deletions inspections/storage/inspection_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build inspection
// +build inspection

/*
* Copyright (c) 2024 Raft, LLC
*
Expand Down
2 changes: 2 additions & 0 deletions inspections/storage/obeserver.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build inspection

/*
* Copyright (c) 2024 Raft, LLC
*
Expand Down

0 comments on commit 2fc2940

Please sign in to comment.