go-plus
go-plus copied to clipboard
Feature Request: Lint on the fly
Prerequisites
- [x] Have you tried launching
atom .
from the terminal in your project's directory? - [x] Have you verified the output from
go env
is correct? If it is, please include the output in this issue. - [x] Have you updated Atom to the latest version?
- [x] Have you tried using Atom Beta, which can be run side-by-side with Atom Stable? Is the behavior the same, or different?
- [x] Have you updated your Atom packages to the latest versions?
- [x] Have you read the FAQ?
- [x] Have you searched the issues to see if others are experiencing the same issue?
Description
An option to lint on the fly (showing errors without needing to save) would be nice. Some other linter-language packages have this feature, so it should be possible. Alternatively, if anyone knows a workaround that would helpful as well.
Output from atom -v && apm -v
N/A
Output From go env
N/A
Steps to Reproduce
N/A
Expected Behavior
Option to show errors without needing to save.
Actual Behavior
Have to save the file before errors are shown.
vscode-go supports this feature using a fork of gotype
.
We attempted to use gotype in the past (hoping it would be a lighter-weight alternative to go install
) and ended up reverting the work because we found it was failing to detect lots of errors.
I'm interested in the general public's thoughts on this though? Do you think it would actually be useful in Go? For example, I enjoy running eslint
live when developing JS, but I think that's partially because JS is not compiled like Go, so eslint
is making more stylistic checks as opposed to actually trying to assemble a full program.
/cc @ramya-rao-a - do you have any insights into how often this feature is used in VSC?
@zmb3 in VSCode, gotype-live
is run at each change to the file after waiting for some amount of time that can be configured by the user. The results are then shown just like build errors.