-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add golangci-lint #1890
Conversation
There was a problem hiding this 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
.
Cheers! 🍻 |
|
||
return ale#path#BufferCdString(a:buffer) | ||
\ . '%e run ' | ||
\ . ale#util#EscapePCRE(l:filename) |
There was a problem hiding this comment.
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()
?
There was a problem hiding this comment.
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.
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.