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

Fix go build error parse #1716

Merged
merged 4 commits into from
Mar 19, 2018
Merged

Conversation

bhcleek
Copy link
Collaborator

@bhcleek bhcleek commented Mar 12, 2018

Errors from :GoBuild were including the column number in the quickfix error's text message instead of it parsing it into in the quick fix error's col field, because errorformat wasn't being using used parse the errors when go build was run asynchronously.

This PR uses go#list#Parse to parse the errors so that the result in vim8 and Neovim is the same as it is in vim7.4.

While I was at it, I added a test for :GoVet and modified it to also use go#list#Parse.

@codecov-io
Copy link

codecov-io commented Mar 12, 2018

Codecov Report

Merging #1716 into master will increase coverage by 4.25%.
The diff coverage is 92.3%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1716      +/-   ##
==========================================
+ Coverage   19.57%   23.82%   +4.25%     
==========================================
  Files          57       57              
  Lines        4787     4784       -3     
==========================================
+ Hits          937     1140     +203     
+ Misses       3850     3644     -206
Flag Coverage Δ
#nvim 17.93% <69.23%> (+2.97%) ⬆️
#vim74 18.62% <53.84%> (+1.47%) ⬆️
#vim80 21.07% <76.92%> (+2.56%) ⬆️
Impacted Files Coverage Δ
autoload/go/job.vim 77.96% <100%> (+77.96%) ⬆️
autoload/go/list.vim 77.77% <100%> (+4.44%) ⬆️
autoload/go/jobcontrol.vim 73.41% <100%> (+73.41%) ⬆️
autoload/go/lint.vim 64.8% <75%> (+7.5%) ⬆️
autoload/go/util.vim 61.42% <0%> (+0.5%) ⬆️
autoload/go/package.vim 21.59% <0%> (+21.59%) ⬆️
autoload/go/cmd.vim 36.3% <0%> (+30.57%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2b0a23...f916e1e. Read the comment docs.

@bhcleek bhcleek added the wip label Mar 12, 2018
@bhcleek
Copy link
Collaborator Author

bhcleek commented Mar 12, 2018

:GoBuild isn't dropping the first line comment unless I run compiler! go first. Feel free to review ahead of a fix for that, but this won't be done until I fix that.

Parse go build errors using the same errorformat as is used by vim7.4 so
that the column will be included in the quickfix error instead of being
part of the error message itself.
@bhcleek bhcleek removed the wip label Mar 12, 2018
@bhcleek
Copy link
Collaborator Author

bhcleek commented Mar 12, 2018

☝️ fixed.

@fatih
Copy link
Owner

fatih commented Mar 19, 2018

lgtm

@bhcleek bhcleek merged commit fe6008e into fatih:master Mar 19, 2018
@bhcleek bhcleek deleted the fix-go-build-error-parse branch March 19, 2018 20:34
bhcleek added a commit that referenced this pull request Mar 19, 2018
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.

3 participants