6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-05 06:13:48 +00:00

Fix issues found by goconst linter

This commit is contained in:
Grzegorz Dlugoszewski
2025-08-24 17:17:34 +02:00
parent 07a6409474
commit 7bc9cbb128
2 changed files with 10 additions and 3 deletions

View File

@@ -22,6 +22,12 @@ linters:
- wsl # We use wsl_v5 instead
- wrapcheck # Adds too much bloat, many of the errors are contextual enough and don't need wrapping
settings:
goconst:
ignore-string-values:
- "get"
- "list"
exclusions:
# Typical presets to exclude: https://golangci-lint.run/docs/linters/false-positives/#exclusion-presets
presets:
@@ -36,6 +42,7 @@ linters:
- dupl # We don't mind duplicated code in tests. It helps with clarity
- varnamelen # We don't mind short var names in tests.
- revive # Complains too much about unused-params, but they help with tests readibility
- funlen # We don't mind long functions in tests
- path: test/
linters:
- dupl

View File

@@ -131,11 +131,11 @@ func TestDefaultScheme(t *testing.T) {
func TestInvalidURLParse(t *testing.T) {
invalidURLs := []string{
"",
//TODO: This Path is technically a correct scp-like syntax. Not sure how to handle it
// TODO: This Path is technically a correct scp-like syntax. Not sure how to handle it
"github.com:grdl/git-git.get.git",
//TODO: Is this a valid git Path?
//"git@github.com:1234:grdl/git-get.git",
// TODO: Is this a valid git Path?
// "git@github.com:1234:grdl/git-get.git",
}
for _, test := range invalidURLs {