Git Product home page Git Product logo

Comments (12)

Arcanemagus avatar Arcanemagus commented on June 15, 2024

Simply disable Lint On Save in the settings of the main linter package. linter-flake8 has no control over when it is ran, it only provides a service that is consumed by the linter package.
image

If you also have Lint on fly disabled you would then need to manually trigger the lint from your command palette.

from linter-flake8.

michaelaye avatar michaelaye commented on June 15, 2024

I don't see a Lint On Save in the main linter package? Do you mean Lint on Fly ?
I switched that off but it does not help.
screenshot 2015-08-12 11 42 24

from linter-flake8.

steelbrain avatar steelbrain commented on June 15, 2024

@michaelaye You need to contact author of that repo and tell them to set modifiesBuffer:true on the linter object, that way their linter will no longer conflict with any other packages and will be run before anything else, it will also be run in series instead of parallel to avoid those race-conditioned-buffer-modification scenarios.

from linter-flake8.

michaelaye avatar michaelaye commented on June 15, 2024

but the clash only exists because of linter-flake8 decides to do linting on-save, despite not being supported by the linter package? So, by definition of the linter-package, this should never occur.

from linter-flake8.

steelbrain avatar steelbrain commented on June 15, 2024

@michaelaye We have two types of linter, those who modify buffers and those who don't, the package you mentioned modifies buffer and it will conflict with packages unless it sets those param in it's linter object.

from linter-flake8.

michaelaye avatar michaelaye commented on June 15, 2024

ah, I did not realize that you talk about the autopep8 package, did not understand that as a linter, thanks.

from linter-flake8.

Arcanemagus avatar Arcanemagus commented on June 15, 2024

@steelbrain I don't think he is using a linter package, I'm guessing either https://github.com/markbaas/atom-python-autopep8 or the support built into AtomBeautify?

from linter-flake8.

steelbrain avatar steelbrain commented on June 15, 2024

@Arcanemagus He should, if that package author wants to avoid conflicts with linters. 'cause there's no other way :)

from linter-flake8.

michaelaye avatar michaelaye commented on June 15, 2024

I'm using the former, python-autopep8

from linter-flake8.

Arcanemagus avatar Arcanemagus commented on June 15, 2024

As @steelbrain said, there really isn't a way to avoid a conflict here as the packages have no idea what the other is doing. Your only solution @michaelaye would be to make one of the packages only do stuff when you ask it to. I would think that autopep8 would be the ideal candidate for that myself, but I guess that would be a personal preference.

Unfortunately it looks like currently the linter package will always trigger a lint on the save event so you can't avoid that in any case. Unless I'm mistaken @steelbrain?

from linter-flake8.

steelbrain avatar steelbrain commented on June 15, 2024

@Arcanemagus You are right, it always tries to lint on save (unless there's a previous lint operation in progress)

from linter-flake8.

Arcanemagus avatar Arcanemagus commented on June 15, 2024

So @michaelaye the simplest thing would be to trigger the autopep8 run manually, it looks like Ctrl+Alt+S is the default keybinding for that in the package.

from linter-flake8.

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.