A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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
21
votes
6answers
4k 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 ...
17
votes
2answers
3k 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: (...
14
votes
1answer
4k 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 ...
12
votes
2answers
3k 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 ...
11
votes
2answers
985 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 ...
9
votes
2answers
2k 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 ...
9
votes
1answer
631 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 ...
8
votes
1answer
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 '...
8
votes
2answers
814 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:...
7
votes
1answer
2k 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 ...
7
votes
1answer
695 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/...
6
votes
3answers
653 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 ...
6
votes
1answer
786 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 --- ...
6
votes
2answers
3k 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 '...
6
votes
2answers
3k 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, ...
6
votes
1answer
1k 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. ...
6
votes
1answer
703 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 ...
5
votes
1answer
1k 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"...
5
votes
2answers
6k 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 '(...
5
votes
1answer
285 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 ...
5
votes
2answers
948 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-...
5
votes
1answer
704 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 ...
4
votes
1answer
1k 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 ...
4
votes
2answers
77 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 ...
4
votes
1answer
732 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 ...
4
votes
2answers
4k 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 ...
4
votes
1answer
606 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 ...
4
votes
2answers
3k 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 ...
4
votes
1answer
188 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: ...
4
votes
1answer
296 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 ...
4
votes
1answer
313 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 ...
4
votes
1answer
660 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 ...
4
votes
1answer
72 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-...
3
votes
2answers
973 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 ...
3
votes
2answers
211 views

Tell Flycheck about my global variables across multiple files?

I've just started to use Flycheck to improve the quality of my code, and I am grateful that it is helping me to do that by pointing out assignments to free variables, and by identifying possibly ...
3
votes
1answer
2k 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? ...
3
votes
1answer
2k 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-...
3
votes
2answers
187 views

Minor modes not working with derived mode from c++-mode

I created a derived mode (using define-derived-mode) based on c++-mode to include new keywords, etc. The mode is working great, but I'm having problems with other minor modes that stop working with ...
3
votes
1answer
631 views

emacs-ycmd flycheck integration doesn't support C++11 [closed]

I have successfully configured Company-ycmd and ycmd as my C/C++ auto completion engine. It works great but the Flycheck-ycmd seems not support the C++11 syntax. And it give the following errors: ...
3
votes
0answers
111 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 ...
3
votes
0answers
1k 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-...
2
votes
1answer
669 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 ...
2
votes
2answers
276 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-...
2
votes
1answer
2k 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 ...
2
votes
1answer
219 views

Disable flycheck for LaTeX

I use emacs with AUCTeX for editing tex files. I also use flycheck for some other programming language. How to disable flycheck in TeX mode ? I tried called flycheck-mode nil in the latex hook but ...
2
votes
1answer
2k 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 ...
2
votes
2answers
316 views

Flycheck elisp “There should be two spaces after period”

Is there any way to disable just this one warning? Two spaces seems like overkill but maybe that is the lisp standard?
2
votes
1answer
2k 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: ;;;;;;;;;;;;;;;;;;;;;...
2
votes
1answer
1k views

Flycheck and Rust

I'm currently struggling to set up error checking for rust in emacs. Flycheck seems to work fine with other languages (C, Python, Ruby, eLisp) but doesn't appear to do anything in rust-mode. I ...
2
votes
1answer
213 views

Setting up flycheck in pair with different mode is not working

For the SQL-mode I use the package Sqlint with Flycheck. This works fine. Now I switched to the package EDBI which is an database interface for Emacs. There is a query editor built-in. I would like ...