Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Add support for revive as lintTool #1699

Merged
merged 1 commit into from
Jun 1, 2018
Merged

Conversation

mgechev
Copy link
Contributor

@mgechev 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]"]
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

@wolfeidau
Copy link
Contributor

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

Keen to use this!

Cheers

@mgechev mgechev force-pushed the master branch 2 times, most recently from 4a259e7 to c264736 Compare May 31, 2018 23:38
@ramya-rao-a ramya-rao-a merged commit f78d12d into microsoft:master Jun 1, 2018
@ramya-rao-a
Copy link
Contributor

Thanks for the PR!

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

@mgechev
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
Copy link
Contributor

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 mentioned this pull request Jun 1, 2018
@mgechev
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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants