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

Add golangci-lint #1890

Merged
merged 4 commits into from
Sep 6, 2018
Merged

Add golangci-lint #1890

merged 4 commits into from
Sep 6, 2018

Conversation

saschagrunert
Copy link
Contributor

I think this would be a nice addition. The only sad thing is that it is currently not possible to distinguish between warnings and errors.

Copy link
Member

@w0rp w0rp left a comment

Choose a reason for hiding this comment

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

Looks pretty good to me. Add some tests for the callbacks and the error handler. See :help ale-development.

@w0rp w0rp merged commit 7b62a15 into dense-analysis:master Sep 6, 2018
@w0rp
Copy link
Member

w0rp commented Sep 6, 2018

Cheers! 🍻


return ale#path#BufferCdString(a:buffer)
\ . '%e run '
\ . ale#util#EscapePCRE(l:filename)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is EscapePCRE correct here? l:filename doesn't seem to be a regular expression, but just a regular filename. The documentation isn't clear, but this tool also doesn't seem to accept regular expressions here:

[~tw/utils](master)% golangci-lint run '.*'
ERRO Running error: context loading failed: can't eval symlinks for path .*: lstat .*: no such file or directory
 3 [~tw/utils](master)% golangci-lint run ./...
[~tw/utils](master)%

I think it should be ale#util#EscapeVim or ale#Escape()?

Copy link
Member

Choose a reason for hiding this comment

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

Change it to ale#Escape if that works instead.

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