Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
Nicolas Gimenez
Evan Hackett
Hey I'm having difficulty enabling a checker. I'm trying to enable javascript-standard in spacemacs. The executable is found, but I don't know how to enable it.
Screenshot from 2020-04-30 11-43-53.png
Clément Pit-Claudel
@evanhackett just reverting your buffer should work. What you're seeing is what happens when a package gets installed after the buffer is first opened.
Michael Wayne Goodman
I recently updated my OS and now flycheck is running mypy from within a package instead of the project root. E.g., say I have myproject/ as the project root, and I open myproject/mypackage/mymodule.py, it is running mypy with myproject/mypackage/ as the default-directory instead of myproject/.
This used to work and I'm not sure what has changed. I think I'm using the same Emacs config. I don't have (nor did I have before) any .dir-locals file, nor any mypy.ini or setup.cfg file in the project root. I see that the upcoming version 32 of flycheck will allow for better configuration for these landmark config files, but is there anything I can do now?
Michael Wayne Goodman
Er, by "within a package" I was using Python terminology. I meant "within a subdirectory". Also some more info: making a blank mypy.ini file in the project root did not help it find the right top-level directory. And I'm opening Emacs from the project root directory.
Clément Pit-Claudel
@goodmami You can install Flycheck from melpa, and you'll get the latest version; if things don't workfor you there, please open a new issue, or post in an existing one on the tracker
Michael Wayne Goodman
@cpitclaudel thanks I'll try the latest version
Thor Michael Støre
Hey! I'm having a small issue getting pylint to run right through flycheck. I have a project directory with a root source directory beneath it, when I run pylint from the command line for the whole source directory it works fine, while when I specify a single file I need to add that source directory to the python path or I get import errors. But if I try that in emacs by setting PYTHONPATH in .dir-locals for that project, and opening a source file in that directory with flycheck enabled, I still get import errors from pylint. Does flycheck not pass on environment variables? It's no real problem if that's the way it is supposed to be, as-is I tweak sys.path in .pylintrc, I just wanted to avoid that since it's a less general solution.
Clément Pit-Claudel
@thormick_gitlab Indeed, binaries are started with the same environment as emacs was started with. It's a bit odd that you need to change PYTHON_PATH. Could you check if flycheck/flycheck#1771 helps?
Thor Michael Støre
@cpitclaudel Yeah, the whole PYTHONPATH thing is a bit of a hack, the way someone set up the project I'm on there is a separate tests directory, which makes me need to add the source directory in certain cases anyhow, and I was looking for a minimal, catch-all solution. flycheck/flycheck#1771 didn't help, but after a bit more investigation there seems to be more up. The whole way it's documented at http://pylint.pycqa.org/en/latest/faq.html#can-i-give-pylint-a-file-as-an-argument-instead-of-a-module doesn't seem to work even from the command line, so I think I've screwed up something else elsewhere. Thanks for the help either way!
Thor Michael Støre
Nevermind, seems I've run into a pylint bug/regression: PyCQA/pylint#2862
Vince W.
I'm struggling a little with a small fortran configuration. By default it seems that flycheck is showing me errors for the use of gnu extensions. By default the compiler won't even show that there's a problem without feeding it the -pedantic flag, but the warning flags are set to ("all" "extra") and the args passed to the compiler should be very simple. Looking for a little guidance on how to make these error notices go away
Brandon Shega
I'm not sure if this is a Doom Emacs issue or a flycheck issue, I've posted in the Doom discord but I'm not getting a response so I thought maybe I would ask here. Flycheck looks like it's creating a temporary version of the file flycheck_file.ts but for some reason only with Doom, this isn't getting changed back so our gulp task is failing saying that the glob argument is invalid when tslint is ran.
WARNING: (only-arrow-functions) /Users/brandonshega/Documents/dev/scripts/app/userInputs/flycheck_mediaFormCtrl.ts[403, 56]: non-arrow functions are forbidden
Brandon Shega
Digging deeper this seems to be an issue with tslint since that isn't running in Spacemacs
Steven Fernandez

Anyone have any insight on this error in ruby-mode:

Suspicious state from syntax checker ruby: Flycheck checker ruby returned 1, but its output contained no errors: ruby: /usr/lib/x86_64-linux-gnu/libcrypt.so.1: version `XCRYPT_2.0' not found (required by /home/sfernandez/.rbenv/versions/2.7.1/lib/libruby.so.2.7)

Try installing a more recent version of ruby, and please open a bug report if the issue persists in the latest release.  Thanks!

Not sure if it's a Flycheck checker error, but I came across this on the trouble shooting page as a common error. As suggested I ran flycheck-verify-setup and everything looks right:

First checker to run:

    - may enable:    yes
    - executable:    Found at /home/sfernandez/.rbenv/shims/ruby
    - next checkers: ruby-rubylint

I also have a stack overflow post running here: https://stackoverflow.com/questions/62623392/ruby-usr-lib-x86-64-linux-gnu-libcrypt-so-1-version-xcrypt-2-0-not-found-r

But i'm losing hope, thanks all

Cody Goodman
@stutterz Shot in the dark and I could disappear without warning but... That seems to imply your ruby installation is broken or /usr/lib/x86_64-linux-gnu/libcrypt.so.1 isn't in the... what was it... C_INCLUDE_PATH maybe?
I would also try to figure out what the exact command being run on a ruby file is. Maybe from a ruby file you can do M-x flycheck-compile and see the command. Then try to run that same command in your terminal and see if you get the same error.
Steven Fernandez

@codygman I came across another post that was talking about LD_INCLUDE_PATH? I tried exporting it on command line with export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH but that didn't work, apparently there are many locations for libcrypt.so.1 or something? I'm not sure though
ok thanks for the advice will try flycheck-compile and see

Tried what you suggested. Not sure what this means, but there seems to be a disconnect here?

I ran flycheck-compile and here's the result i got in compilation buffer:

-*- mode: compilation; default-directory: "~/the-odin-project/ruby/baby_ruby/" -*-
Compilation started at Sun Jun 28 14:49:41

/home/sfernandez/.rbenv/shims/ruby -w -c < /home/sfernandez/the-odin-project/ruby/baby_ruby/hello.rb
ruby: /usr/lib/x86_64-linux-gnu/libcrypt.so.1: version `XCRYPT_2.0' not found (required by /home/sfernandez/.rbenv/versions/2.7.1/lib/libruby.so.2.7)

Compilation exited abnormally with code 1 at Sun Jun 28 14:49:41

I ran the command /home/sfernandez/.rbenv/shims/ruby -w -c < /home/sfernandez/the-odin-project/ruby/baby_ruby/hello.rb on command line and got: Syntax OK

Arjun Nair
Hey, I don't know if this is the right place to ask but I wanted to work on a toy haskell project which allows me to infer types of values when I highlight some value. I was told that flycheck has this ability. If so, I was wondering how it was done, and how I could write something similar for my sideproject.
Ben Krocké

Hello, my javascript-eslint checker returns a missing/incorrect config file. The executable IS found, and it points to the project's node-modules eslint package.
There is a .eslintrc.js file in the root of the project.
Running 'eslint --print-config path/to/file.ts' returns the correct json without any errors.

I have installed exec-path-from-shell-initialize, but it has no effect.

Any ideas?

Hi, I’m using the javascript-eslint checker and it works great. The only quibble I have is that it uses the same severity levels as eslint, so an eslint error is an error and an eslint warning is a warning. This is logical, but I find it a bit awkward to deal with. Is there a way I can locally configure the checker to change the levels to warning and info, respectively?
If nothing else, I can probably add advice around flycheck-parse-eslint, so it’s not an insurmountable problem. I was just wondering whether there’s an official or cleaner way.
Bob Allegretti
Is there anyway to run python-pycompile after (or before) python-flake8? Flake8 is not catching all syntax errors very well and when I try to chain using (flycheck-add-next-checker 'python-pycompile 'python-flake8) emacs fails with void-function error.
1 reply
Ludovic Bellière

I'm wondering if the following might be considered a bug. Using emacs to write sphinx documention, flycheck automatically detects the source directory of the sphinx project. However the sphinx project is part of another bigger project that is contained within a virtual environment, as python projects tends to. As such, any special extensions required by the sphinx documentation will fail to load because flycheck doesn't take care of loading the proper environment before finding sphinx-build.

Even if I manually activate the pipenv, the environment in which flycheck execute doesn't change.

Michael Peyton Jones
I'm trying to figure out the right behaviour for a checker "superseding" an inbuilt one. Specifically, if you are using a lsp-mode integration, that provides a flychecker which is usually better than the ones built-in to flycheck. However, I've observed at least some examples where both run, which is typically undesirable (slow, sometimes the non-lsp one may just not work). What's the best way to handle this? Programmatically disable the built-in checker from the lsp-mode client?
(some discussion in the lsp-mode repo here: emacs-lsp/lsp-mode#2207)
Michael Peyton Jones
it's also possible that there's something buggy going on here, in that I seem to have a checker which is listed as "could run if selected", but I see errors relating to it actually running in Messages
Hello there! I've got an issue with python-pylint checker: syl20bnr/spacemacs#13975 It seems to be a flycheck issue but I'm not sure where to look to find out what's going on. Could anyone take a look?
Endre Bakken Stovner
Is there a way to collect a range (colstart-colend) in :error-patterns? I know line and column exist.
Hello, can somebody explain how I might 'revert' the change that switched from calling flake/pylint executables directly and instead calls them w/ python3? I'm working in an environment where I don't have / can't have a suitable python3 env variable. I think this is the reason I'm seeing "Missing; sys.path is nil" in the 'module' lines of my flycheck verification window
Specifically, reverting the change discussed here: flycheck/flycheck#1055
hey guys, is it possible to let flycheck, check from a root directory. I have my Main.py in src and i get the error of unresolved imports
can i check code from a specific root folder?
@davidh38 Are you using pylint?
John Ku
Hello, I cannot get fringe indicator to appear for errors from flycheck. Anyway to go about it?
Hi. I am trying to unset the "background" color for flycheck error and warnings. I unticked the background in M-x customize-face RET flycheck-warning but the background color for warning is still there. I tried setting the background to nil but I get "Unable to load color "nil" on my Messages buffer which is as expected. I want it to not display a background color or set the backgroun color to the current buffers background color, making it invisible. How do I achieve this? Thank you.
Hello. Would someone be able to assist with manipulating the output of a linter? I wrote a checker that executes a linter inside a docker container, the linter returns errors in this form: (error line-start (file-name) ":" line ": " (message) line-end). However the path to the file file-name isn't correct since its relative to the docker container not my host os. So all I need to do is manipulate file-name. I've tried to search the documentation but couldn't find an example on how to do this.
George Singer
Does anyone have any thoughts on how to get flycheck synced up with a C++ SCons project? flycheck/flycheck#1839
Peter Oliver
I see from https://github.com/flycheck/flycheck/blob/master/CHANGES.rst that development of Flycheck 32 has been frozen since May, but I donʼt see any commits to the flycheck-32 branch since the same month. Did this release get forgotten? Is it time to push it out?
(I ask because Iʼm using version 31, which I just realised is three years old)
Matthew O. Persico
Shellcheck for bash scripts has the ability to put a comment in the code before a particular line to make the checker ignore whatever error is on that line. Any way to do that in flycheck, specifically for Perl?
Kon Tsaki
hello, is there a way to set a property on a predefined checker? i want to change the function for :working-directory of the python-pylint checker
Kon Tsaki
i think i've achieved that with put
1 reply
Ignat Insarov
Hello! How can I disable error message tool tips?
Björn Bidar

Hey I want to set flycheck-sh-bash-args so it has "-O extglob" when I do that with:

# -*- mode: sh;flycheck-sh-bash-args: "-O extglob"; -*-

It passes -O\ extglob to bash, how can I make it just not add the escape sign/backslash in the string?

I'm using flycheck-irony for C++ and irony-server is checking for errors in my imported libraries. How do I disable these errors?