Comments (14)
Sounds like a great idea.
Should be easy to add support for that either as the default linter or as an option to use instead of discreet lint/vet.
from vscode-go.
Open to PR's adding support for this.
I'd suggest adding a go.lintTool
setting that can optionally point to an alternate tool to run instead of golint
. That would allow users to opt-in to using gometalinter
once they have installed and configured it.
A further step would be to make it the default. I think we should wait on that, since the acquisition experience for gometalinter
is incrementally more complex.
from vscode-go.
this would be awesome !
from vscode-go.
I came here because I wanted to propose support for https://github.com/alecthomas/gometalinter, too :)
Atoms Go Plugin and SublimeText have support for this. Maybe one could have a look at the Atom implementation for adding support to vscode (are the APIs similar because of the electron shell?): https://atom.io/packages/gometalinter-linter
from vscode-go.
@lukehoban output of golint
and gometalinter
are a little different, with current regex can't parse gometalinter
output
from vscode-go.
@sijad Feel free to propose an update to the regexp to make sure gometalinter
output can be handled.
from vscode-go.
There is an PR for this.Wondering what is the progress on that? @sijad @lukehoban
from vscode-go.
gometalinter
can also produce JSON output, if that makes parsing easier.
from vscode-go.
@lukehoban JSON parsing helps ?
I am keen to get this into VSCode :)
from vscode-go.
I suggest to look into how some of the existing linters are implemented for VS Code. ESLint is a good example vscode-eslint, tslint, and jshint are implemented in the same way. The idea is to implement a linter as a language server. The language server is kept a live and receives buffer change requests from VS Code (over JSON RPC), runs the linter (in proc) on the changed buffer, and returns the errors diagnostics back to VS Code. Doing the linting inside a server avoids that a new process is restarted for each validation as the user types.
from vscode-go.
#294 is almost finished, it just need a review I guess
from vscode-go.
Nice. This implementation spawns a new process for each linting pass. Since the linter is native code and since this is only done on save this might not be too bad for the batteries.
from vscode-go.
This issue can be closed now that the feature is implemented and documented :)
from vscode-go.
Indeed. Thanks @sijad.
from vscode-go.
Related Issues (20)
- go.formatFlags not working with gofmt -s (simplify) HOT 5
- Couldn't start client gopls HOT 5
- Unable to run Go in VS Code - command not found HOT 4
- Adding a module using `go get` from outside vscode is not recognized until go.mod is reopened HOT 5
- Can not use VS code for GO: Installing github.com/go-delve/delve/cmd/dlv FAILED HOT 5
- Disable real-time syntax error highlighting with gopls HOT 1
- Problem in mouse hover tooltip HOT 3
- Automatically Infer Path Mapping for Remote Debugging
- // .*DO NOT EDIT.?$ HOT 6
- Extension issue HOT 1
- 0.14.2 broken on macos HOT 3
- Extension Repository Migration Plan HOT 1
- Region comments not working when extension is enabled HOT 3
- Debugging uses wrong working directory HOT 4
- Background of covered and not covered code cannot be removed after running package test HOT 9
- Extension Migration Plan HOT 4
- numeric constants containing underscore are not colored correctly HOT 1
- Gopls does not support versions of go <=1.12 HOT 2
- Unable to set breakpoint when using gutter and clear Code coverage HOT 3
- Updated to 0.14.3 or the nightly and entirely stopped working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-go.