Giter Site home page Giter Site logo

Comments (8)

w0rp avatar w0rp commented on August 24, 2024

Yeah, sounds good. I think there should be some options for enabling/disabling the linter name and the severity. I suppose there would only be two severity values at the moment, "Error" and "Warning." I'd set the linter names and the Severity to be off by default, and explain the new flags in the README and the new help file.

from ale.

w0rp avatar w0rp commented on August 24, 2024

These kinds of messages will be especially helpful once quickfix support is in.

from ale.

KabbAmine avatar KabbAmine commented on August 24, 2024

Most of the time, only 'Error' and 'Warning' are reported by linters (Sometimes 'Style') so yes, those two are enough.

from ale.

KabbAmine avatar KabbAmine commented on August 24, 2024

I've already started to work on this, and the severity + type are already done (Disabled by default and configurable).

But for the linter, I still don't know where can I get the name of the current used one.
Temporary, I've added a key name to be returned with the output of linter handlers, then added it to g:ale_buffer_loclist_map and that works. But I think that is not a good way to proceed.

Any idea?

from ale.

w0rp avatar w0rp commented on August 24, 2024

You'll have to associate each warning/error with each linter, as more than one linter could be run for the same buffer. I'd try adding a key to each of the loclists returned by the Handle functions which maps to the linter name the warnings and errors are for, and see if that breaks setting the loclist at all. If it doesn't, then you should be able to read that key in the echo functions to get the linter names.

I'm thinking of something like this in s:HandleExit.

for item in linter_loclist
    item.linter_name = linter.name
endfor

from ale.

KabbAmine avatar KabbAmine commented on August 24, 2024

I'd try adding a key to each of the loclists

Try that. Make a branch where we'll work.

from ale.

w0rp avatar w0rp commented on August 24, 2024

Check out the echo-string-format branch. I added the linter_name key as described, and everything seems to work fine with it being there. Now you should be able to run through the items from g:ale_buffer_loclist_map and get the type and linter name from there.

from ale.

KabbAmine avatar KabbAmine commented on August 24, 2024

Great thanks. I'll come with something tomorrow.

from ale.

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.