mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-26 09:52:14 +03:00
chore: add golangci-lint tasks and force LF on Go files
Add VS Code tasks to run golangci-lint (with and without --fix) and mark *.go as text eol=lf so Go sources check out with LF, avoiding spurious CRLF lint failures on Windows. Also drop the now-redundant explicit DockerInit.sh/DockerEntrypoint.sh entries already covered by *.sh.
This commit is contained in:
5
.gitattributes
vendored
5
.gitattributes
vendored
@@ -1,9 +1,6 @@
|
|||||||
*.sh text eol=lf
|
*.sh text eol=lf
|
||||||
DockerInit.sh text eol=lf
|
|
||||||
DockerEntrypoint.sh text eol=lf
|
|
||||||
frontend/src/generated/** text eol=lf
|
frontend/src/generated/** text eol=lf
|
||||||
frontend/public/openapi.json text eol=lf
|
frontend/public/openapi.json text eol=lf
|
||||||
frontend/src/test/__snapshots__/** text eol=lf
|
frontend/src/test/__snapshots__/** text eol=lf
|
||||||
|
*.go text eol=lf
|
||||||
# Cloud-init deploy assets are consumed on Linux — force LF regardless of host.
|
|
||||||
deploy/**/*.yaml text eol=lf
|
deploy/**/*.yaml text eol=lf
|
||||||
29
.vscode/tasks.json
vendored
29
.vscode/tasks.json
vendored
@@ -115,6 +115,35 @@
|
|||||||
"$go"
|
"$go"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "go: golangci-lint run",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "golangci-lint",
|
||||||
|
"args": [
|
||||||
|
"run"
|
||||||
|
],
|
||||||
|
"options": {
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
"problemMatcher": [
|
||||||
|
"$go"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "go: golangci-lint run --fix",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "golangci-lint",
|
||||||
|
"args": [
|
||||||
|
"run",
|
||||||
|
"--fix"
|
||||||
|
],
|
||||||
|
"options": {
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
|
"problemMatcher": [
|
||||||
|
"$go"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "frontend: ncu -u",
|
"label": "frontend: ncu -u",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
|
|||||||
Reference in New Issue
Block a user