Visitar URL original
add revive for go · Issue #2429 · neomake/neomake · GitHub
Skip to content

add revive for go #2429

Open
Open

Description

@delfick

Hi,

Can we have an addition to the go linters for revive? https://github.com/mgechev/revive

I copied the golangci-lint definition and added this locally and it seems to work

function! neomake#makers#ft#go#revive() abort
    return {
        \ 'exe': 'revive',
        \ 'args': ['%t'],
        \ 'cwd': '%:h',
        \ 'errorformat':
            \ '%f:%l:%c: %m,' .
            \ '%f:%l: %m'
        \ }
endfunction

Thanks

Activity

  1. blueyed commented on Sep 26, 2019

    @blueyed
    Member

    Sure, please create a PR.
    From the description it looks like it could be preferred automatically (based on executable('revive') then also over golint?

    call extend(makers, ['golint', 'govet'])

  2. blueyed commented on Sep 26, 2019

    @blueyed
    Member

    Also example output, and a test would be nice to have then here or with the PR.

  3. delfick commented on Sep 26, 2019

    @delfick
    Author

    ah yeah, I can have a look at doing that.

    After some more consideration, how would I make it have a -config and -exclude options that you can set?

  4. blueyed commented on Sep 26, 2019

    @blueyed
    Member

    how would I make it have a -config and -exclude options that you can set?

    Does it support config files that it picks up automatically?
    That's usually the best.

  5. delfick commented on Sep 26, 2019

    @delfick
    Author

    it would appear that revive only looks in your home directory for a config, so I could do something similar to what pylama does

    let config_file = neomake#utils#FindGlobFile('revive.toml')
    

    I'm not sure about exclude, but I did just realise it doesn't make sense to have it specified anyway because we're running revive against specific files.

  6. blueyed commented on Sep 26, 2019

    @blueyed
    Member

    Hmm.. not sure what problem you are trying to solve.

    See #1859 for appending args to existing makers. I think I should finish #2161.

  7. delfick commented on Sep 26, 2019

    @delfick
    Author

    Does that allow for adding arguments before the last argument?

    Because the -config argument has to come before the path you're linting.

  8. blueyed commented on Sep 26, 2019

    @blueyed
    Member

    The path gets appended automatically in the end (via append_file=1 setting).
    Check also #2161.

  9. delfick commented on Sep 26, 2019

    @delfick
    Author

    ah, awesome :)

  10. added a commit that references this issue on Sep 27, 2019
    baa3226
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions