Skip to content

Commit

Permalink
Fix installation of golangci-lint on devcontainer
Browse files Browse the repository at this point in the history
Prior to this commit, vscode was saying "Analysis tools missing" and
prompting to install it.
Fix was to install golangci-lint via go get, as per:
golangci/golangci-lint#1037 (comment)
  • Loading branch information
johnboyes committed Jul 5, 2020
1 parent fb219c0 commit 9d9d01a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ RUN apt-get update \
github.com/fatih/gomodifytags@latest \
github.com/mgechev/revive@latest \
github.com/go-delve/delve/cmd/dlv@latest 2>&1 \
github.com/golangci/golangci-lint/cmd/golangci-lint@v1.27.0 \
#
# Build gocode-gomod
&& GOPATH=/tmp/gotools go get -x -d github.com/stamblerre/gocode 2>&1 \
Expand All @@ -48,9 +49,6 @@ RUN apt-get update \
&& mv /tmp/gotools/bin/* /usr/local/bin/ \
&& mv gocode-gomod /usr/local/bin/ \
#
# Install golangci-lint
&& curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/bin 2>&1 \
#
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
&& groupadd --gid $USER_GID $USERNAME \
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
Expand Down

0 comments on commit 9d9d01a

Please sign in to comment.