Skip to content

Commit ead9ec2

Browse files
committed
feat(src/go): Add option to skip golangci-lint installation
1 parent 2d2d852 commit ead9ec2

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/go/devcontainer-feature.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"description": "Version of golangci-lint to install (https://github.com/golangci/golangci-lint/releases).",
1313
"proposals": [
1414
"latest",
15-
"v1.58.1"
15+
"v1.58.1",
16+
"none"
1617
]
1718
},
1819
"installGoReleaser": {
@@ -95,4 +96,4 @@
9596
"ko",
9697
"yaegi"
9798
]
98-
}
99+
}

src/go/install.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ check_and_install_packages $PACKAGES
162162

163163
GO_TOOLS="\
164164
golang.org/x/tools/gopls@latest \
165-
github.com/golangci/golangci-lint/cmd/golangci-lint@$(revise_golangci_version "$GOLANGCI_LINT_VERSION") \
166165
honnef.co/go/tools/cmd/staticcheck@latest \
167166
github.com/mgechev/revive@latest \
168167
github.com/incu6us/goimports-reviser/v2@latest \
@@ -174,6 +173,11 @@ GO_TOOLS="\
174173
github.com/haya14busa/goplay/cmd/goplay@latest \
175174
github.com/766b/go-outliner@latest"
176175

176+
# Add GolangCI-Lint to the list of Go tools
177+
if [ "$GOLANGCI_LINT_VERSION" != "none" ]; then
178+
GO_TOOLS="${GO_TOOLS} github.com/golangci/golangci-lint/cmd/golangci-lint@$(revise_golangci_version "$GOLANGCI_LINT_VERSION")"
179+
fi
180+
177181
# Add Air to the list of Go tools
178182
if [ "$INSTALL_AIR" = "true" ]; then
179183
GO_TOOLS="${GO_TOOLS} github.com/air-verse/air@latest"

0 commit comments

Comments
 (0)