Comments (7)
Thanks for the detailed report 😍
The warning is computed by the Emacs bytecode compiler, not by Flycheck itself. You can use M-x flycheck-compile to see exactly how it is invoked.
from flycheck.
The warning is computed by the Emacs bytecode compiler, not by Flycheck itself.
Thanks for the quick reply! Any idea how to avoid the warning?
from flycheck.
@ktetzlaff You can use declare-function
for this. See https://www.gnu.org/software/emacs/manual/html_node/elisp/Declaring-Functions.html
from flycheck.
You can use
declare-function
for this. ...
@bbatsov Yes, that works. However, I would need to add declare-function
to a lot of files. Is it somehow possible to declare a function globally? I.e. make a user defined function work like a built-in/preloaded function?
Or trick flycheck into ignoring the warning for a specific function?
from flycheck.
See flycheck-emacs-lisp-load-path
maybe?
from flycheck.
See
flycheck-emacs-lisp-load-path
maybe?
@cpitclaudel I have flycheck-emacs-lisp-load-path
set to inherit
and the flycheck-compile
output shows that the directory containing the test files gets added (--directory /home/kail/tmp
). So: No - unfortunately that doesn't help.
from flycheck.
I have the same issue, just with the function ‘...' might not be defined at runtime.
I have code such as this:
(use-package web-mode
:mode ("\\.vue\\'" . web-mode)
:config
(customize-set-variable 'web-mode-markup-indent-offset 2)
(customize-set-variable 'web-mode-css-indent-offset 2)
(customize-set-variable 'web-mode-code-indent-offset 2))
(defun my/twee-mode-language-at-pos ()
"Determine language at point, defaulting to web-mode if not Twee code."
(if (save-excursion
(beginning-of-line)
(looking-at "^\s*<<"))
"twee"
(web-mode-language-at-pos)))
I get the function ‘web-mode-language-at-pos’ might not be defined at runtime.
even though if I use (require 'web-mode)
it works just fine.
If I expand the use-package
macro, I get:
(progn
(defvar use-package--warning43
(function
(lambda
(keyword err)
(let
((msg
(format "%s/%s: %s" 'web-mode keyword
(error-message-string err))))
(display-warning 'use-package msg :error)))))
(condition-case-unless-debug err
(progn
(unless
(fboundp 'web-mode)
(autoload
(function web-mode)
"web-mode" nil t))
(eval-after-load 'web-mode
'(condition-case-unless-debug err
(progn
(customize-set-variable 'web-mode-markup-indent-offset 2)
(customize-set-variable 'web-mode-css-indent-offset 2)
(customize-set-variable 'web-mode-code-indent-offset 2)
t)
(error
(funcall use-package--warning43 :config err))))
(add-to-list 'auto-mode-alist
'("\\.vue\\'" . web-mode)))
(error
(funcall use-package--warning43 :catch err))))
Seems like the require
part is under a conditional, which is why the byte compiler may have trouble recognizing this.
Anyways, this isn't really a Flycheck bug. The byte compiler also complains. I just wish there was a way to get rid of these.
from flycheck.
Related Issues (20)
- test failure: flycheck-define-checker/awk-gawk/syntax-error HOT 1
- Flycheck's Emacs Lisp checker is unable to identify functions defined in nested block
- flycheck in buffers with no file name
- *compilation* buffer takes precedence when it exists HOT 1
- Is CLA assistant working ? HOT 4
- Rust: couldn't create a temp dir: Operation not permitted HOT 5
- Need a version of flycheck-define-checker and flycheck-define-command-checker that doesn't have to have the checker executable be hard-coded to a string but rather looked up dynamically HOT 1
- Problems setting up PHP_CodeSniffer in Emacs HOT 1
- Support oxlint please HOT 2
- Discrepancy between flycheck-compile output and Flycheck errors buffer using slim-lint checker HOT 2
- Consider downgrading seq dep version HOT 7
- Error when loading: Eager macro-expansion skipped due to cycle HOT 4
- Checker `python-ruff` fails for Python buffers not visiting a file. HOT 18
- Hardcoded "python3" value for executable breaks Windows installs HOT 4
- python-ruff problem with ignore-per-file extensions
- "go-staticcheck" cannot check
- Error message displayed by flycheck-next-error quickly disappears from minibuffer
- Suspicious state from =python-ruff= with a message requesting to create a new issue here HOT 5
- What package do i need to install
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flycheck.