Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [flycheck]

Flycheck is an on-the-fly syntax checking package for GNU Emacs 24, with in-buffer error highlighting, automatic background checking, a dynamic error list, and built-in support for over 40 programming and markup languages.

Filter by
Sorted by
Tagged with
28 votes
3 answers
6k views

How to prevent flycheck from treating my init.el as a package file?

If flycheck-mode is enabled for my init.el, I got the following kinds of errors: The first line should be of the form: ";;; package --- Summary" (emacs-lisp-checkdoc) ... The footer should be: (...
xuhdev's user avatar
  • 1,921
25 votes
6 answers
5k views

Flycheck with file relative eslint executable

A lot of projects I work on install eslint as a dev dependency, with a custom set of eslint plugins. Right now, flycheck uses the globally installed version of eslint rather than the version of eslint ...
pcardune's user avatar
  • 353
21 votes
1 answer
7k views

suppress warning: assignment to free variable (and others)

How can I suppress the "assignment to free variable" warning when byte compiling an emacs lisp file? I'm actually mostly interested in suppressing it for a specific buffer when using flycheck, but I ...
fommil's user avatar
  • 1,800
16 votes
2 answers
4k views

Can I turn off or switch the syntax checker for js2-mode?

I have a default setup of js2-mode. This provides nice syntax highlighting and checking but I am now working on a project with a different set of styles (specifically this new project does not use ...
Startec's user avatar
  • 1,344
15 votes
1 answer
1k views

Automatically run org-lint through flycheck

I've got a heap of org-mode files which I publish into HTML for a knowledge base, sometimes the publishing crashes out due to a broken link or something and it's hard to find the problem. I've been ...
map7's user avatar
  • 533
13 votes
2 answers
7k views

Disable Minor Mode in Major Mode

I am trying to disable a minor mode (flycheck) for the latex major mode. This is what I have so far. (defun disable-flycheck-in-tex-src-block () (flycheck-mode -1)) (add-hook 'latex-mode-hook '...
bkmoney's user avatar
  • 323
11 votes
1 answer
2k views

How to turn off `emacs-lisp-checkdoc` of flycheck when edit source block in org-mode file?

I have a emacs-lisp block in org-mode and when I try to edit it by press C-c ', flycheck always report errors as below: 0 warning The first line should be of the form: ";;; package --- ...
Enze Chi's user avatar
  • 1,470
10 votes
2 answers
4k views

How can I prevent flycheck-mode from checking certain files?

I've configured Emacs to open files named *.cfg in shell-script-mode. These are config files, of course, rather than shell scripts, but 90% of the time it does what I want (mainly, good guesses about ...
Saint Aardvark the Carpeted's user avatar
10 votes
2 answers
2k views

disable specific warning in flycheck (specifically "#pragma once in main file")

I'm using flycheck for C++ development, and get the following warning: #pragma once in main file In all headers included in a main file. Searching the webs, I get the impression this has something ...
Spacemoose's user avatar
9 votes
1 answer
3k views

Using multiple flycheck syntax checkers in web-mode

I'm trying to configure Flycheck to use both csslint and tidy checkers in web-mode without any success. This post suggests using this code for tidy: (eval-after-load 'flycheck '(flycheck-add-mode '...
Sineau's user avatar
  • 91
9 votes
1 answer
3k views

Best way to disable flycheck checkdoc warnings on specific elisp directory?

I use flycheck with flycheck-elisp-checkdoc checker active and find them fairly useful. Still, I find it irritating to be nagged about missing (provide), section headers (;;; Code, ...), package ...
Mekk's user avatar
  • 1,047
9 votes
1 answer
1k views

Getting flycheck "jump to next/previous error" to cycle

I'd like M-g n and M-g p to cycle, at least when I'm using them with flycheck. This feature requires writing a custom function as it's not supported (as mentioned on https://github.com/flycheck/...
Blaisorblade's user avatar
8 votes
1 answer
2k views

Flycheck could not find file under load-path

I have some elips *.el file in my ~/.emacs.d/gman/ folder, e.g. smart-inputp-methods.el. This folder is added to my load path at the beginning of .emacs file: (add-to-list 'load-path "~/.emacs.d/gman"...
Geradlus_RU's user avatar
8 votes
2 answers
1k views

'Symbol's value as variable is void' in callback from url-retrieve

When executing the following I get an error: (defun caller (func) (url-retrieve "http://m0smith.freeshell.org/" (lambda (status) (funcall func)))) (caller (lambda() (message "called"))) Result:...
M Smith's user avatar
  • 279
8 votes
1 answer
2k views

Make flycheck's "reference to free variable" work with macros

The use-package is a useful and popular macro for installing packages, but flycheck always complains about it since it hides variable definitions. For example, if I attempt (use-package org), Flycheck ...
Matthew Piziak's user avatar
8 votes
1 answer
2k views

How can I see all errors in a Go project with LSP mode?

When opening a Go project with LSP mode, spacemacs / flycheck only shows errors in the current package, not including tests files. For example, in the following project: |- pkg1 |- pkg2 |- cmd When I'...
Robert Zaremba's user avatar
7 votes
3 answers
804 views

flycheck/bash - i'd like to declare that the next line was intentional

When using the shellcheck checker, Flycheck will warn me that the "$@" in the following will be expanded on the client rather than the ssh server. Which is a helpful warning, but yeah I know and I'm ...
Ben Hyde's user avatar
  • 584
7 votes
2 answers
2k views

Turn off global-flycheck-mode for org-mode?

Given I'd like to keep using global-flycheck-mode, how can I make sure flycheck is automatically disabled when editing org-mode documents? Or maybe is just activate it for code blocks? I found this ...
neezer's user avatar
  • 183
7 votes
1 answer
1k views

How can I turn off flycheck minor mode for given directory

So my question is like in title. I want to turn off flycheck minor mode for all files in directory. I have specified in my .emacs file that it should be on in c++-mode, c-mode and few others, but I ...
dotPoozer's user avatar
  • 173
6 votes
2 answers
4k views

Automatically add project directory to flycheck clang/gcc include path

I want to use syntax checking with Flycheck in my C++ projects, but the Clang checker fails to find the local file includes. For example, when I have: #include "foo/bar/x.h" in the file foo2/y.cc, ...
mkollaro's user avatar
6 votes
2 answers
9k views

spacemacs flycheck: use specific linter for python

I would like to use a specific linter for python files in spacemacs. A coworker sent me an emacs code-snippet that should solve my problem, but doesn't seem to be loaded. (add-hook 'python-mode '(...
vitiral's user avatar
  • 163
6 votes
1 answer
3k views

flycheck cannot find module for pylint

I have installed flycheck and pylint and want to use pylint for python mode, but when selecting syntax checker with flycheck I get this: python-pylint (disabled) - major mode: `python-...
Lars Kakavandi-Nielsen's user avatar
6 votes
1 answer
489 views

flycheck hides compilation errors

I use Emacs to edit Go files. When I compile them I can use next-error to jump to the next error in a specific Go file. Very handy. However, when I also enable flycheck on my Go file for on-the-fly ...
Lajos Nagy's user avatar
6 votes
0 answers
952 views

Flycheck cannot use this syntax checker for this buffer

I use spacemacs and while in Python mode, flycheck can not use flake8 checker even when I try to manually enable it using flycheck-disable-checker. I get the following output from flycheck-verify-...
jonas's user avatar
  • 161
5 votes
1 answer
2k views

Flycheck: change color / thickness of underline

Using Flycheck, I get a green thin jagged underline line for style-guide violations, and a red thin jagged underline for syntax errors (see below). Is it possible to change the thickness or the color ...
WickedJargon's user avatar
5 votes
1 answer
2k views

Is it possible to make flycheck-mode and company-mode play nice together?

I've encountered two very nice modes when it comes to developing C++ in Emacs. First we have flycheck-mode which on the fly checks the syntax of my code using various backends such as clang or gcc. ...
Rovanion's user avatar
  • 987
5 votes
2 answers
1k views

How to make flycheck checker 'ruby-rubocop' use 'bundle exec rubocop' as executable?

I want ruby-rubocop Flycheck syntax checker to execute bundle exec rubocop instead of just rubocop. What I've tried: (setq flycheck-ruby-rubocop-executable "bundle exec rubocop") Results in ...
kolen's user avatar
  • 221
5 votes
4 answers
4k views

Error: No word lists can be found for the language "en_US"

I am using GNU Emacs 26.1 on macOS Catalina. When I try to enable ispell or flycheck-mode I am getting following error: No word lists can be found for the language "en_US". => How could I fix this ...
alper's user avatar
  • 1,390
5 votes
1 answer
1k views

Flycheck gives errors, when I use shellcheck as linter for bash scripts

I use GNU Emacs 26.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-06-09, and Shellcheck 0.3.7 als linter for bash scripts (https://www.shellcheck.net). When I open a bash script, I ...
ReneFroger's user avatar
  • 3,880
5 votes
1 answer
4k views

Add include paths to flycheck and to company-irony?

I am starting to develop a ROS (Robot Operating System) application for the first time using Emacs. Here is my ~/.emacs.d/init.el configuration for Flycheck and company packages: ;;;;;;;;;;;;;;;;;;;;;...
space_voyager's user avatar
5 votes
2 answers
5k views

Why does my Flycheck syntax checker not activate automatically?

I wrote a Flycheck frontend for LDC. It installs into Emacs fine, and I remember to require it, but for some reason, it doesn't automatically enable itself when I open a file in d-mode. What did I ...
Koz Ross's user avatar
  • 425
5 votes
2 answers
973 views

Flycheck r-lintr doesn't find anything

I want to use lintr to check R-files in emacs. According to https://github.com/jimhester/lintr#emacs lintr is fully integrated into flycheck when using ESS. See the installalation documentation ...
user2740's user avatar
  • 579
5 votes
2 answers
2k views

Getting MyPy Working in Spacemacs

I'm struggling to get type checking working in spacemacs, and I would appreciate any help. I've installed MyPy properly on my system (I can run it from terminal) and added python-mypy to dotspacemacs-...
kadd11's user avatar
  • 111
5 votes
1 answer
530 views

have flycheck override eldoc faster

I have both eldoc and flycheck enabled in a .el buffer. I have a line, eg: (setq load-dirs (concat emacs-repos-dir "internal")) Here, load-dirs is underlined by flycheck as an error, but if point ...
Nathaniel Flath's user avatar
5 votes
1 answer
972 views

Using emacs for ruby development with asdf version manager

I have installed a (doom) emacs to start developing with Ruby. So far I have mainly used Sublime Text but because of reasons I want to give emacs a chance. I tried Spacemacs too but uninstalled this ...
Gernot's user avatar
  • 151
5 votes
1 answer
1k views

How to set temporary file directory for flycheck eslint (outside of current directory)

flycheck-mode creates temporary files in the current directory. That is annoying. How can I disable/set the default place for these temporary files. I use javascript eslint syntax checker for react ...
eguneys's user avatar
  • 175
5 votes
1 answer
229 views

(RegEx-)Replace: Sporadic Match data clobbered by buffer modification hooks

I know this was asked in other contexts already, but I couldn't find anything related to C++ development with my hooks that could help me. I am working a lot with replace and query-replace and query-...
AltruisticDelay's user avatar
4 votes
1 answer
2k views

Warning (flycheck): Syntax checker javascript-eslint reported too many errors (494) and is disable

I switched to a new linter and on big files it causes flycheck to disable because it reports too many errors. I don't believe this is an issue with the linter as when I check the output in the ...
user2522280's user avatar
4 votes
2 answers
147 views

Concatenate multiple 'help-echo strings

I have multiple overlays with 'help-echo strings covering the same region. Can I make Emacs show all these strings in the mouseover tooltip? By default it only shows the one coming from the highest ...
Clément's user avatar
  • 3,995
4 votes
1 answer
4k views

Is there a way in Flycheck flake8 mode to ignore a specific warning?

As we all know sometimes it's OK to break the rules. Flycheck Mode however, isn't as forgiving and happily displays it's warning. Is there a way to disable this on a per line basis when using flake8? ...
Bagee's user avatar
  • 123
4 votes
2 answers
5k views

Starting a virtualenv for emacs to use

I am starting a Python virtualenv through init.el (or so I would like): (require 'virtualenvwrapper) (venv-workon "my-python-project") However, flycheck does not find flake8 or pylint, which are ...
dmvianna's user avatar
  • 392
4 votes
1 answer
228 views

Regexp to parse Hy errors for Flycheck

I'm trying to write a Flycheck checker definition based on Hy, using the API here. As part of that, I have to define a pattern for error matching. Now, Hy gives quite a large error spew, for example: ...
Koz Ross's user avatar
  • 425
4 votes
1 answer
377 views

How can I get lint warnings when I've forgotten to require a package?

Flycheck has a brilliant ability to warn about when I'm using a function foo-bar but have forgotten to add (require 'foo) at the top of my file. However, it's inconsistent. It doesn't always warn for ...
Wilfred Hughes's user avatar
4 votes
1 answer
1k views

wrong-type-argument stringp nil when trying to run flycheck

I'm new to emacs (coming from vim) and wanted to try flycheck with jshint. I have jshint installed and available in my path. However, when I try to check a buffer, I get the error: Error while ...
DeX3's user avatar
  • 273
4 votes
0 answers
356 views

Flycheck Emacs Lisp in Org-mode babel source blocks

I want to have Flycheck syntax checking when I am editing Emacs Lisp code in a literal Org-mode file using babel SRC blocks. (Using Org's editing buffers with C-c '). However the flycheck-emacs-lisp ...
Matthew Piziak's user avatar
4 votes
0 answers
2k views

flycheck eslint for javascript

I'm trying to setup a lint for javascript files. Here's the relevant setup I have. (use-package js2-mode :ensure t :init (progn (add-to-list 'auto-mode-alist '("\\.js?\\'" . js2-jsx-...
eugene's user avatar
  • 489
3 votes
2 answers
646 views

How can I set my Flycheck Perl include path?

I am using Flycheck using use-package like so: (use-package flycheck :ensure t :init (global-flycheck-mode)) I followed https://randstructure.wordpress.com/2015/06/21/using-emacs-flycheck-with-...
nc.'s user avatar
  • 171
3 votes
1 answer
5k views

flycheck cannot enable python-flake8 configuration file not found

I'm trying to set up flycheck to run flake8 on my python files. I'm using pipenv so I set up flycheck-python-flake8-executable for my buffer to point to the virtual environment version of flake8 and ...
George Mauer's user avatar
3 votes
1 answer
4k views

flycheck-gcc-include-path in .dir-locals.el

In my .dir-locals.el I have: (cpp-mode . (setq flycheck-gcc-include-path '("/home/<user>/<project>/include"))) This doesnt seem to set flycheck-gcc-include-path, any ideas why? Also is ...
sp00kyb00g13's user avatar
3 votes
2 answers
881 views

Why does flycheck open a new buffer for error messages?

So I am using flycheck for my C++ projects with this setup: ;; Require flycheck to be present (require 'flycheck) ;; Force flycheck to always use c++11 support. We use ;; the clang language backend ...
choeger's user avatar
  • 191

1
2 3 4 5