Skip to content
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

Option to rate limit linter calls #823

Closed
HybridEidolon opened this issue Aug 11, 2015 · 2 comments
Closed

Option to rate limit linter calls #823

HybridEidolon opened this issue Aug 11, 2015 · 2 comments

Comments

@HybridEidolon
Copy link

Some linters are implemented such that they parse the output of a build system rather than running a program against a single file, for example the Rust linter. As such, saving two files in quick succession can cause multiple instances of the build system to run, resulting in a lot of undefined behavior, unless the linter itself implements rate limiting. An option in a linter's class to only allow one lint to run at any time in a given Atom window would prevent scenarios where linting fails due to concurrently running builds.

A reason for having a common option for this is that the same behavior would be implemented multiple times across linters for different languages even though it is common between them. If the linter itself implements rate-limiting, the lints after the first lint would probably have to abort, resulting in unfinished linting (its correctness depending on the timing in which the lints were run and files were saved. Groan, concurrency!).

This option might override "lint on the fly" due to the implication that lints are potentially long-running, but this depends on the build system being leveraged; again with the rust example, it is possible to make cargo and rustc run without code translation, but only for the current crate.

Related issue: AtomLinter/linter-rust#29

@steelbrain
Copy link
Owner

Providers can just disable lintOnFly and they will only be triggered on save. That's the most efficient way for now. but I am not convinced that we need something on top of that.

@steelbrain
Copy link
Owner

You can find a demo of this in dartlang-tools and the dart lang package by the google team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants