A Flycheck checker for GNU Guile

Andrew Whatson 5206e71f41 Add configuration notes to README 4 rokov pred
.dir-locals.el 0b96f1fcf3 Add some instructions, fix formatting 4 rokov pred
.gitignore bdb0c0406b Fix byte-compile warning 4 rokov pred
COPYING 7effea147b Add COPYING, README, and Emacs package boilerplate 4 rokov pred
README.md 2940f1622f Add configuration notes to README 4 rokov pred
flycheck-guile.el cda27230a3 Improve parsing of some errors 4 rokov pred

README.md

Melpa Status Melpa Stable Status

flycheck-guile

This library provides a flycheck checker for the GNU Guile programming language. It requires a working Geiser configuration, and runs guild compile on your code to collect warnings and errors.

Installation

MELPA

This package is available on MELPA.

After following MELPA's Getting Started guide, you can install this package with M-x package-install flycheck-guile.

Guix

This package is available on Guix.

It can be installed to your user profile with guix install emacs-flycheck-guile.

Manual installation

To install it manually, just download this code add the directory to your Emacs load-path.

Usage

Call (require 'flycheck-guile) somewhere in your Emacs configuration to load the checker.

Once loaded, the checker will automatically activate in scheme-mode buffers with geiser-mode, where guile is the current scheme implementation.

Configuration

This package can be configured via M-x customize-group flycheck-guile.

The flycheck-guile-warnings variable contains the list of warnings reported by the compiler. If you find a warning particularly annoying (eg. spurious "unused variable" warnings), it can be suppressed by removing it from this list.

Troubleshooting

If it seems like the checker is not working, try running M-x flycheck-verify-checker guile for some diagnostics.

It may also be useful to run M-x flycheck-compile guile, which shows the full compilation command and its output.

If the checker is working, but can't find your guile modules (ie. reporting "no code for module" errors), make sure that you have correctly configured geiser-guile-load-path for your project. The checker uses this variable to determine the load paths passed to guild compile.

A simple way to configure load paths is to add a .dir-locals.el file to the root directory of the project:

((nil
  (eval . (with-eval-after-load 'geiser-guile
            (let ((root-dir
                   (file-name-directory
                    (locate-dominating-file default-directory ".dir-locals.el"))))
              (unless (member root-dir geiser-guile-load-path)
                (setq-local geiser-guile-load-path
                            (cons root-dir geiser-guile-load-path))))))))

This will look for the Guile module (foo bar baz) in foo/bar/baz.scm relative to the root directory of the project.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

See COPYING for details.

Credits

flycheck-guile was originally written by Ricardo Wurmus as part of Guile Studio.