Search code examples
emacsflycheck

How do I limit the number of errors reported by flycheck


When editing a large file, flycheck-mode often takes 3-4 seconds to complete if an error "spills" over into the rest of the source file such that lots of lines are tagged with an error.

enter image description here

How do I limit the number of errors that the mode highlights such that it prioritizes the current buffer location?


Solution

  • Flycheck maintainer here.

    You cannot “limit” error reporting currently in an easy way. At best, you can use a custom function for flycheck-process-error-functions, but that won't help you if the lag comes from something else, like error parsing.

    And in general, I'd rather like to fix these lags than work around, if possible. Please open an issue at https://github.com/flycheck/flycheck/issues. Please add your Emacs version to the issue, and the amount of errors reported by Flycheck.

    If possible, also give me the source file in private. You can find a mail address in the Github profile of Flycheck.