Commit ebdebb10 authored by Sebastian Wiesner's avatar Sebastian Wiesner

[Fix #630] Remove Elixir syntax checker

Elixir runs arbitrary code during compilation which brings all sorts of
troubles, including possible security issues.
parent a4244afe
master (in development)
=======================
- **Breaking changes**:
- Remove Elixir syntax checker due to code execution [GH-630]
- New features:
- Add `flycheck-perl-include-path` to set include directories for Perl
......
......@@ -16,7 +16,6 @@
(depends-on "coffee-mode")
(depends-on "cperl-mode")
(depends-on "d-mode")
(depends-on "elixir-mode")
(depends-on "erlang")
(depends-on "ess")
(depends-on "go-mode")
......
......@@ -195,13 +195,6 @@ adds a syntax checker which runs D unittests on the fly and reports the
results.
@end smallindentedblock
@flyclanguage{Elixir}
@itemize
@item
@flyc{elixir} (@uref{http://elixir-lang.org/,Elixir interpreter})
@end itemize
@flyclanguage{Emacs Lisp}
@enumerate
......
......@@ -186,7 +186,6 @@ attention to case differences."
coq
css-csslint
d-dmd
elixir
emacs-lisp
emacs-lisp-checkdoc
erlang
......@@ -5623,25 +5622,6 @@ Requires DMD 2.066 or newer. See URL `http://dlang.org/'."
(or "Warning" "Deprecation") ": " (message) line-end))
:modes d-mode)
(flycheck-define-checker elixir
"An Elixir syntax checker using the Elixir interpreter.
See URL `http://elixir-lang.org/'."
:command ("elixirc"
"-o" temporary-directory ; Move compiler output out of the way
"--ignore-module-conflict" ; Prevent tedious module redefinition
; warning.
source)
:error-patterns
;; Elixir compiler errors
((error line-start "** (" (zero-or-more not-newline) ") "
(file-name) ":" line ": " (message) line-end)
;; Warnings from Elixir >= 0.12.4
(warning line-start (file-name) ":" line ": warning:" (message) line-end)
;; Warnings from older Elixir versions
(warning line-start (file-name) ":" line ": " (message) line-end))
:modes elixir-mode)
(defconst flycheck-this-emacs-executable
(concat invocation-directory invocation-name)
"The path to the currently running Emacs executable.")
......
---
dependencies:
- { role: runtime-erlang }
- name: Download elixir
get_url: url=https://github.com/elixir-lang/elixir/releases/download/v{{version}}/Precompiled.zip
dest=/usr/src/elixir-{{version}}.zip
- name: Create Elixir directory
file: path=/opt/elixir-{{version}} state=directory
owner=root group=root mode=0755
- name: Extract Elixir
unarchive: src=/usr/src/elixir-{{version}}.zip copy=no
dest=/opt/elixir-{{version}}
creates=/opt/elixir-{{version}}/bin/elixirc
- name: Put Elixir compiler in PATH
file: path=/usr/local/bin/elixirc state=link
src=/opt/elixir-{{version}}/bin/elixirc
......@@ -20,8 +20,6 @@ dependencies:
tags: language-css
- role: language-d
tags: language-d
- role: language-elixir
tags: language-elixir
- role: language-erlang
tags: language-erlang
- role: language-fortran
......
......@@ -4025,17 +4025,6 @@ See https://github.com/flycheck/flycheck/issues/531 and Emacs bug #19206"))
'(4 8 error "module external_library is in file 'external_library.d' which cannot be read"
:checker d-dmd)))
(flycheck-ert-def-checker-test elixir elixir error
(flycheck-ert-should-syntax-check
"checkers/elixir-error.ex" 'elixir-mode
'(5 nil error "function puts/1 undefined" :checker elixir)))
(flycheck-ert-def-checker-test elixir elixir warnings
(flycheck-ert-should-syntax-check
"checkers/elixir-warnings.ex" 'elixir-mode
'(7 nil warning "this clause cannot match because a previous clause at line 4 always matches"
:checker elixir)))
(flycheck-ert-def-checker-test emacs-lisp emacs-lisp nil
;; Determine how the Emacs message for load file errors looks like: In Emacs
;; Snapshot, the message has three parts because the underlying file error is
......
# Test an error from Elixir
defmodule AnError do
def error_func do
puts "Flycheck is great!"
end
end
# A warning from Elixir
defmodule AlwaysMatch do
def func(_) do
IO.puts "Flycheck is great!"
end
def func(:atom) do
IO.puts "Cannot get here."
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment