GithubHelp home page GithubHelp logo

Comments (6)

creativenull avatar creativenull commented on June 2, 2024

Hey

Unfortunately, efm only runs on a single file. That's what it was designed to do :(

Golangci-lint behaves very differently to any other normal linters out there.

Can you provide me with a sample go repo with some steps so I can try it out and see if there is some alternative that I can give for your specific usecase?

from efmls-configs-nvim.

pjkaufman avatar pjkaufman commented on June 2, 2024

Hey @creativenull , I tried linting the following file via neovim: https://github.com/pjkaufman/dotfiles/blob/cf114c605385bba6eafb6c13dfbd08cf5c8e53fc/go-tools/ebook-lint/cmd/epub/compress-and-lint.go

Is that something that you can use to reproduce this issue or do I need to try to break something out into its own repo?

from efmls-configs-nvim.

creativenull avatar creativenull commented on June 2, 2024

Yeah I think that should be good, I see go-tools is the go project so I can start from there.

In the meantime, maybe try out null-ls (https://github.com/nvimtools/none-ls.nvim) plugin or my other plugin diagnosticls-configs (https://github.com/creativenull/diagnosticls-configs-nvim) and see if that works.

I see that they use the json format from golangci-lint, which efm cannot parse at this moment.

from efmls-configs-nvim.

pjkaufman avatar pjkaufman commented on June 2, 2024

I see that efm runs on the root directory for C#. Is that a one off or could that kind of thing be replicated if I were to add the ability to get the folder of the current file to https://github.com/mattn/efm-langserver/blob/d1e53448d16a2b20440faab406b625efe9792653/langserver/handler.go#L705-L708?

from efmls-configs-nvim.

creativenull avatar creativenull commented on June 2, 2024

Yes, that is correct efm will run on the project root. Just that efm will inject ${INPUT} at the end of a command if no file was specified. That is why it keeps giving you errors based on the file.

So I've tried out your project and it doesn't seem like it works as it was intended by efm.

However, this works as expected with null-ls so I'd say you will have to go with that for now, sorry this one didn't work out for you.

When I have time I will look into contributing to the efm repo for this feature.

from efmls-configs-nvim.

pjkaufman avatar pjkaufman commented on June 2, 2024

Gotcha. Thanks for the response and taking a look into this!

from efmls-configs-nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.