Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use https://staticcheck.io/ for linting #640

Merged
merged 2 commits into from
May 10, 2021
Merged

Use https://staticcheck.io/ for linting #640

merged 2 commits into from
May 10, 2021

Conversation

nfx
Copy link
Contributor

@nfx nfx commented May 10, 2021

@nfx nfx requested review from pietern and alexott May 10, 2021 17:12
@codecov
Copy link

codecov bot commented May 10, 2021

Codecov Report

Merging #640 (fa81941) into master (959cb7b) will increase coverage by 0.01%.
The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #640      +/-   ##
==========================================
+ Coverage   82.94%   82.95%   +0.01%     
==========================================
  Files          85       85              
  Lines        7803     7803              
==========================================
+ Hits         6472     6473       +1     
+ Misses        860      859       -1     
  Partials      471      471              
Impacted Files Coverage Δ
access/resource_secret_scope.go 86.20% <ø> (ø)
exporter/importables.go 69.88% <0.00%> (ø)
exporter/util.go 58.92% <0.00%> (ø)
identity/data_group.go 80.39% <0.00%> (ø)
mws/resource_workspace.go 80.30% <0.00%> (ø)
sqlanalytics/resource_visualization.go 71.27% <0.00%> (ø)
sqlanalytics/resource_widget.go 83.45% <0.00%> (+0.75%) ⬆️
workspace/resource_workspace_conf.go 92.45% <0.00%> (ø)
storage/aws_s3_mount.go 65.55% <25.00%> (ø)
access/resource_permissions.go 73.33% <33.33%> (ø)
... and 16 more

nfx added 2 commits May 10, 2021 19:27
* previous solution, golangci-lint, does no longer seem to be actively maintained
* staticcheck is natively integrated with VSCode IDE
* it's easier to have one common and modern linting framework
Copy link
Contributor

@alexott alexott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks good.

not sure if the go install honnef.co/go/tools/cmd/staticcheck vs go install honnef.co/go/tools/cmd/staticcheck@latest is important, because the first one fails in command line for me, while second is work. But the first version of PR was failing with 2nd version and works with first one

# --> GolangCI-lint
&& go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.25.0 \
# --> Static checker
&& go install honnef.co/go/tools/cmd/staticcheck@latest \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the push hook we have just go install honnef.co/go/tools/cmd/staticcheck - that this version was reason for failure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah! yes, i'll change it in a separate PR

```bash
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.27.0
$(go env GOPATH)/bin/golangci-lint
go install honnef.co/go/tools/cmd/staticcheck@latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above, although it works for me on the command-line

@nfx nfx removed the request for review from pietern May 10, 2021 18:07
@nfx nfx merged commit 16a23d4 into master May 10, 2021
@nfx nfx deleted the static-check branch May 10, 2021 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use staticcheck github.com/databrickslabs/terraform-provider-databricks/... instead of abandoned golangci-lint
2 participants