File: test-elixir.el

package info (click to toggle)
flycheck 36.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,600 kB
  • sloc: lisp: 16,210; python: 718; makefile: 219; cpp: 24; ruby: 23; perl: 21; ada: 17; f90: 16; haskell: 15; javascript: 15; sh: 14; erlang: 14; xml: 14; ansic: 12; php: 9; tcl: 8; fortran: 3; vhdl: 2; awk: 1; sql: 1
file content (30 lines) | stat: -rw-r--r-- 1,344 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
;;; test-elixir.el --- Flycheck Specs: Elixir -*- lexical-binding: t; -*-
;;; Code:
(require 'flycheck-buttercup)
(require 'test-helpers)

(describe "Language Elixir"
  (flycheck-buttercup-def-checker-test elixir-credo elixir infos-without-strict-mode
    (flycheck-buttercup-should-syntax-check
     "language/elixir/lib/infos.ex" 'elixir-mode
     '(1 11 info "Modules should have a @moduledoc tag."
         :checker elixir-credo)))

  (flycheck-buttercup-def-checker-test elixir-credo elixir infos-with-strict-mode
    (let ((flycheck-elixir-credo-strict t))
      (flycheck-buttercup-should-syntax-check
       "language/elixir/lib/infos.ex" 'elixir-mode
       '(1 11 info "Modules should have a @moduledoc tag."
           :checker elixir-credo)
       '(2 nil info "Do not use parentheses when defining a function which has no arguments."
           :checker elixir-credo))))

  (flycheck-buttercup-def-checker-test elixir-credo elixir warnings
    (flycheck-buttercup-should-syntax-check
     "language/elixir/lib/warnings.ex" 'elixir-mode
     '(5 nil warning "There are identical sub-expressions to the left and to the right of the '&&' operator."
         :checker elixir-credo)
     '(8 8 warning "length(list) == 0 is expensive. Prefer Enum.empty?/1 or list == []"
         :checker elixir-credo))))

;;; test-elixir.el ends here