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

Add support for revive as lintTool #1699

Merged
merged 1 commit into from Jun 1, 2018

Conversation

Projects
None yet
3 participants
@mgechev
Copy link
Contributor

mgechev commented May 31, 2018

Introduces support for revive. Revive is an extensible, configurable, and faster alternative of golint.

README.md Outdated
To configure revive, use:

```javascript
"go.lintFlags": ["-config=[PATH_TO_CONFIG.toml]"]

This comment has been minimized.

@ramya-rao-a

ramya-rao-a May 31, 2018

Member

Users might want to use the ${workspaceFolder} or ${workspaceRoot} variables for the config file. We support this for the config file used by gometalinter. You might want to do something similar for revive.

See https://github.com/Microsoft/vscode-go/blob/master/src/goLint.ts#L67

This comment has been minimized.

@mgechev

mgechev May 31, 2018

Author Contributor

Just updated the readme & tested the ${workspaceRoot}/${workspaceFolder} support locally. Everything seems to be functioning correctly.

@wolfeidau

This comment has been minimized.

Copy link
Contributor

wolfeidau commented May 31, 2018

@mgechev are you going to fix this feedback so we can try it out?

Keen to use this!

Cheers

@mgechev mgechev force-pushed the mgechev:master branch 2 times, most recently from 4a259e7 to c264736 May 31, 2018

@mgechev mgechev force-pushed the mgechev:master branch from c264736 to 0576548 May 31, 2018

@ramya-rao-a ramya-rao-a merged commit f78d12d into Microsoft:master Jun 1, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla All CLA requirements met.
Details
@ramya-rao-a

This comment has been minimized.

Copy link
Member

ramya-rao-a commented Jun 1, 2018

Thanks for the PR!

I'll update this thread soon with steps to try this out before I release the next update.

@mgechev

This comment has been minimized.

Copy link
Contributor Author

mgechev commented Jun 1, 2018

Sounds good! I'm already using it in my project:

cyclomatic

Would definitely verify again once you share the steps.

@ramya-rao-a

This comment has been minimized.

Copy link
Member

ramya-rao-a commented Jun 1, 2018

To test this,

  • Download https://github.com/Microsoft/vscode-go/blob/master/Go-latest.vsix
  • Run code --install-extension Go-latest.vsix
  • If the above fails with Error: end of central directory record signature not found, then clone this repo and use the Go-latest.vsix file from the cloned repo
  • Reload VS Code
  • Change the go.lintTool setting to revive

@ramya-rao-a ramya-rao-a referenced this pull request Jun 1, 2018

Closed

Add revive linter #1697

@mgechev

This comment has been minimized.

Copy link
Contributor Author

mgechev commented Jun 1, 2018

@ramya-rao-a verified that everything works as expected. Tested the config file as well 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment