18

For the benefit of clueless readers arriving here, allow me a small digression to say that these warnings generally point to real code issues (and when they don't, you can suppress them on a per-variable basis) so people should research what they mean before disabling them. Of course, I have no doubt that you know why you need to disable it, so the answer ...


14

tl;dr Disable the checker emacs-lisp-checkdoc with the org-src-mode-hook. (defun disable-fylcheck-in-org-src-block () (setq-local flycheck-disabled-checkers '(emacs-lisp-checkdoc))) (add-hook 'org-src-mode-hook 'disable-fylcheck-in-org-src-block) Detailed walkthrough how to find this information First search for possible variables which change the ...


11

As per comments, this is because you're using a globalized minor mode: https://stackoverflow.com/questions/6837511/automatically-disable-a-global-minor-mode-for-a-specific-major-mode C-hf global-flycheck-mode led me to C-hf flycheck-may-enable-mode and C-hv flycheck-global-modes which tells me: flycheck-global-modes is a variable defined in `flycheck.el'. ...


8

Thanks J David for forcing me to look more deeply. flycheck.el defines sh-bash, the checker used for bash; and that has a next-checker known as sh-shellcheck. Ans, as Jordon is points out, that invokes shellcheck Poking around in 2 reveals how to supress warning in a selective manner: function f(){ # shellcheck disable=SC2029 ssh foo "$@" } ...


8

Well you wouldn't want to remove the hook, as that's a global effect. You can disable the mode on a per-buffer basis, though. Use the eval pseudo-variable. e.g. a .dir-locals.el like this would act for any/all major modes: ((nil . ((eval . (flycheck-mode 0))))) Local variables are processed after mode hooks, so this should reliably counteract your ...


8

Here's the format that the checker is actually expecting: ;;; init.el --- Initialization file for Emacs ;;; Commentary: Emacs Startup File --- initialization for Emacs If you place this at the top of your init.el it'll remove the warning. You can get emacs to insert this for you automatically by going to the menu and selecting Emacs-Lisp->Check ...


7

You can easily disable checkers using (setq flycheck-disabled-checkers '(sh-shellscript sh-bash sh-zsh)) The Flycheck documentation adds more information here. You can also disable checkers in a lambda for auto-mode-alist to have it only disable on .cfg files. (add-to-list 'auto-mode-alist '("\\.cfg\\'" . (lambda () ...


7

Use projectile-project-root to get the root path and add it to the list with a c++-mode-hook (defun setup-flycheck-clang-project-path () (let ((root (ignore-errors (projectile-project-root)))) (when root (add-to-list (make-variable-buffer-local 'flycheck-clang-include-path) root))) (add-hook 'c++-mode-hook 'setup-flycheck-clang-...


7

Replace your relevant configuration with this: (add-hook 'python-mode-hook (lambda () (flycheck-mode 1) (semantic-mode 1) (setq flycheck-checker 'python-pylint flycheck-checker-error-threshold 900 ...


7

I just did this by customizing flycheck-global-modes to be '(not org-mode). In the customize interface, that was clicking except and repeat and adding an org-mode entry.


6

I tried to restrict the linting to one checker with (org-lint '(link-to-local-file)), however the parsing is still going to induce a noticable delay. Maybe limiting the linter to the current subtree or using the async library can improve the performance. Anyways, below is a rather simple flycheck setup for org-lint: (flycheck-define-generic-checker 'org-...


5

I don't think there's a prebuilt way to do this. I hacked around it like so. This depends on having all of your virtualenvs in ~/.virtualenvs, and having projectile installed. (defvar my:virtualenv-directory "~/.virtualenvs/" "The directory of virtualenvs.") (defun my:configure-python-venv () "Set `python-shell-virtualenv-path' to the virtualenv ...


5

You can achieve this locally by using cl.el's lexical-let: (eval-when-compile '(require 'cl)) (defun my-test-caller (func) (lexical-let ((ext-func func)) (url-retrieve "http://www.google.com" (lambda (status) (funcall ext-func))))) (my-test-caller #'(lambda() (message "called"))) To be explicit as the help says: Like `let', but ...


5

The help-echo property can be a function that returns the actual string to display, so you could add an additional overlay with higher priority with a special help-echo property which will compute the union/concatenation of all the help-echo properties it covers.


5

The following works, not sure if there's a "built-in" way of doing it... (flycheck-add-mode 'javascript-eslint 'web-mode) (defun my/configure-web-mode-flycheck-checkers () ;; in order to have flycheck enabled in web-mode, add an entry to this ;; cond that matches the web-mode engine/content-type/etc and returns the ;; appropriate checker. (-when-...


5

apt installs an old version of flycheck, https://github.com/koalaman/shellcheck/issues/704 that does not support --external-sources, this particular commit has been merged at flycheck recently https://github.com/flycheck/flycheck/pull/1256/files/7b35a1b17e415ecc8f9fc04b3a043a3afb40599c and make use of such feature. The solution is simple, just opt-out of it. ...


5

You can change the color but you cannot change the thickness. There are two ways: M-xlist-faces-displayRET, find flycheck-error click it, edit the underline color -> Apply and Save You can add some piece of code to your init file: (set-face-attribute 'flycheck-error nil :underline '(:color "red2" :style wave)) where red2 is the color used.


5

Here is an example of a working configuration Note that executable is not that of python itself (as in your case) but to actual pylintrc that you want to use. This can be achieved with the following .emacs snippet: (add-hook 'python-mode-hook (lambda () (setq flycheck-python-pylint-executable "<your path to>/pylint") ...


Only top voted, non community-wiki answers of a minimum length are eligible