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

Add :enabled property to syntax checkers #1089

Closed
lunaryorn opened this Issue Sep 14, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@lunaryorn
Contributor

lunaryorn commented Sep 14, 2016

Add a new :enabled FUNCTION property to syntax checkers which behaves like :predicate except that it's only called the first time a syntax checker is to be used in a buffer. If the function returns a non-nil value the checker is put in a whitelist (i.e. a buffer-local variable) to prevent further invocations of :enabled, and if it returns nil it's put into flycheck-disabled-checkers to prevent any further use of it.

This function would allow for more expensive checks whether a syntax checker is available.

Follow up of a Gitter discussion and #1085.

@lunaryorn

This comment has been minimized.

Contributor

lunaryorn commented Sep 14, 2016

@Simplify I've taken the liberty to assign this issue to you but please feel free to ping me if you don't get to implement it. I can add it as well tomorrow evening—though, if you'd take it, I'd spend the evening on #1072 😎

@Simplify

This comment has been minimized.

Member

Simplify commented Sep 14, 2016

yes, I'll take this one, great opportunity to dig dipper into flycheck.

@Simplify

This comment has been minimized.

Member

Simplify commented Sep 15, 2016

flycheck-may-use-checker (checker) is executed every time or only once for every buffer? If only once we can skip maintaining white-listed buffer-list for every checker.

@lunaryorn

This comment has been minimized.

Contributor

lunaryorn commented Sep 15, 2016

@Simplify It runs every time.

Simplify added a commit that referenced this issue Sep 20, 2016

Simplify added a commit that referenced this issue Sep 20, 2016

Simplify added a commit that referenced this issue Sep 20, 2016

Simplify added a commit that referenced this issue Sep 24, 2016

Simplify added a commit that referenced this issue Sep 24, 2016

Simplify added a commit that referenced this issue Sep 24, 2016

Simplify added a commit that referenced this issue Sep 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment