Skip to content

Commit

Permalink
Update .gitignore, .golangci.yml, and VS Code settings
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardinius committed Feb 11, 2024
1 parent 5fe567b commit 1983073
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.vscode/
/.vscode/*.log
bin/
.volume/
4 changes: 1 addition & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
run:
timeout: 5m
output:
format: tab
skip-dirs:
- vendor

Expand All @@ -27,7 +25,7 @@ linters-settings:
revive:
ignore-generated-header: true
severity: warning
enableAllRules: true
enable-all-rules: false

linters:
enable:
Expand Down
15 changes: 15 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"recommendations": [
"r3inbowari.gomodexplorer",
"xaver.clang-format",
"zxh404.vscode-proto3",
"gruntfuggly.todo-tree",
"streetsidesoftware.code-spell-checker",
"ms-azuretools.vscode-docker",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"ecmel.vscode-html-css",
"ms-vscode.makefile-tools",
"foxundermoon.shell-format"
]
}
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch app",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/app/main.go",
"args": ["--configuration", "${workspaceFolder}/smtpd-proxy.yml"]
}
]
}
37 changes: 37 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"explorer.excludeGitIgnore": true,
"explorer.fileNesting.enabled": true,
// "explorer.fileNesting.expand": true,
"explorer.fileNesting.patterns": {
".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*, .pre-commit-config.yaml",
"go.mod": "go.mod,go.sum",
"go.work": "go.work,go.work.sum"
},
"explorer.sortOrder": "foldersNestsFiles",
"go.lintFlags": [
"--config",
"${workspaceFolder}/.golangci.yml",
"--fast"
],
"go.lintTool": "golangci-lint",
"go.formatTool": "gofmt",
"go.testFlags": [
"-v"
],
"[go]": {
"editor.insertSpaces": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"editor.formatOnSaveMode": "file"
},
"[typescript]": {
"editor.defaultFormatter": "xaver.clang-format"
},
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "modifications",
"cSpell.words": [
"datetime"
]
}
2 changes: 1 addition & 1 deletion app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func main() {

if err := cmd.Main(ctx, os.Args[1:]...); err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err)
os.Exit(1)
os.Exit(1) // nolint:gocritic // defer cancel() is not called
}
}

Expand Down

0 comments on commit 1983073

Please sign in to comment.