Flycheck Ciao: on-the-fly syntax and assertion checking, and testing

Author(s): Miguel Angel Sanchez Ordaz.

Flycheck is an emacs extension for checking syntax on the fly. This package adds Flycheck support for Ciao mode with various checkers for different purposes:

  • ciaoc as syntax checker.

  • ciaopp as syntax and assertions checker.

Setup

Before installing this package, emacs 24 is needed for using Flycheck. If you do not have installed it yet, this package flycheck-ciao will do it automatically from MELPA repository, but as it is not available in emacs by default, you should add this code to your emacs init file.


(require 'package)

(add-to-list 'package-archives '("MELPA Stable" . "https://stable.melpa.org/packages/") t)

(package-initialize)

There are two options for the setup:

  • Insert the next line into your emacs init file.

    
    (eval-after-load 'flycheck '(add-hook 'flycheck-mode-hook 'flycheck-ciao-setup))

  • If you use use-package, you can insert instead.

    
    (use-package flycheck-ciao
      :after flycheck
      :hook
      (flycheck-mode . flycheck-ciao-setup)
      )

Using Flycheck

All options when using Flycheck are available on the top bar menu Tools -> Syntax Checking.

  • To enable Flycheck in the current buffer ESC ^X flycheck-mode .

    • If you are interested in having Flycheck enabled by default in all buffers where syntax checking is possible, insert the next line in your emacs init file.

      
      (add-hook 'after-init-hook 'global-flycheck-mode)

  • To list all errors found by the checker: C-c ! l or ESC ^X flycheck-list-errors .

  • To select a different syntax checker: C-c ! s or ESC ^X flycheck-select-checker .

  • To verify setup: C-c ! v or ESC ^X flycheck-verify-setup .