(eval-after-load 'flycheck
'(add-hook 'flycheck-mode-hook #'flycheck-odin-setup))
This is a wrapper around odin check $LOCATION -vet
. With no changes on the users' part, the default
behavior is is to run odin check $CURRENT_DIRECTORY -vet
(where '$CURRENT_DIRECTORY' is the directory of the current buffer).
This exposes the following variables that can be customized globally or with .dir-locals.el
flycheck-odin-project-path
Change the $LOCATION in odin check $LOCATION -vet
. This can be a directory or a file.
flycheck-odin-error-filters
A list of Emacs regexes of errors to ignore.
flycheck-odin-command-arguments
A list of compiler flags. Defaults to ("-vet")
An example configuration might look something like this:
((odin-mode
(flycheck-odin-project-path . "~/code/project/src")
(flycheck-odin-error-filters . ("^[^[:blank:]]*/Odin/core/"
"^[^[:blank:]]*/Odin/shared/some_library/"
"foobar"))))