You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes an update to some software can mean that a linter that could only run on save before is now able to run on every text edit. Because ALE maintains compatibility with older version of many different tools, ALE needs to be able to conditionally run some linters either only on save or when text changes are made. To that end, we should make it so lint_file can be computed dynamically.
Similar to options like executable and command, the lint_file option should support being set as Function. The function should be able to return either a Number or an ALE deferred object, such as one returned by ale#command#Run.
The most obvious use of this is that we'll be able to use ale#semver#RunWithVersionCheck to apply a version check that we can cache and later return 0 or 1 based on the version of the tool. Because the version check and the successful executable checks are cached in ALE, we can run exactly the same check again when running the command to change the arguments to work when saving the file or whenever text is changed.
The text was updated successfully, but these errors were encountered:
Sometimes an update to some software can mean that a linter that could only run on save before is now able to run on every text edit. Because ALE maintains compatibility with older version of many different tools, ALE needs to be able to conditionally run some linters either only on save or when text changes are made. To that end, we should make it so
lint_file
can be computed dynamically.Similar to options like
executable
andcommand
, thelint_file
option should support being set asFunction
. The function should be able to return either aNumber
or an ALE deferred object, such as one returned byale#command#Run
.The most obvious use of this is that we'll be able to use
ale#semver#RunWithVersionCheck
to apply a version check that we can cache and later return0
or1
based on the version of the tool. Because the version check and the successful executable checks are cached in ALE, we can run exactly the same check again when running the command to change the arguments to work when saving the file or whenever text is changed.The text was updated successfully, but these errors were encountered: