Commit 1de6aa3c authored by Sebastian Wiesner's avatar Sebastian Wiesner

[Fix #124] Add Scala syntax checker

parent e4a1c564
......@@ -18,6 +18,7 @@
(depends-on "php-mode")
(depends-on "php+-mode")
(depends-on "sass-mode")
(depends-on "scala-mode2")
(depends-on "scss-mode")
(depends-on "go-mode")
(depends-on "rust-mode")
......
......@@ -43,6 +43,7 @@ Features
- Rust
- RST (ReStructuredText)
- Sass
- Scala
- SCSS
- Shell scripts (POSIX Shell, Bash and Zsh)
- TeX/LaTeX
......
......@@ -520,6 +520,14 @@ CodeSniffer}
@unnumberedsec master (unreleased)
@itemize @bullet
@item
New syntax checkers:
@itemize @bullet
@item
@ghissue{124, Scala}
@end itemize
@item
New features:
......
......@@ -28,6 +28,7 @@ order of their appearance in the default value of
@iflyc ruby
@iflyc rust
@iflyc sass
@iflyc scala
@iflyc scss
@iflyc sh-dash
@iflyc sh-bash
......
No preview for this file type
......@@ -81,6 +81,8 @@ RST (ReStructuredText, using Docutils)
@item
Sass
@item
Scala
@item
SCSS
@item
Shell scripts (using Bash, Dash, or Zsh depending on the type of shell
......
......@@ -118,6 +118,7 @@ buffer-local wherever it is set."
ruby
rust
sass
scala
scss
sh-dash
sh-bash
......@@ -2730,6 +2731,15 @@ See URL `http://sass-lang.com'."
error))
:modes 'sass-mode)
(flycheck-declare-checker scala
"A Scala syntax checker using the Scala compiler.
See URL `http://www.scala-lang.org/'."
:command '("scalac" "-Ystop-after:parser" source)
:error-patterns
'(("^\\(?1:.*\\):\\(?2:[0-9]+\\): error: \\(?4:.*\\)$" error))
:modes 'scala-mode)
(flycheck-declare-checker scss
"A SCSS syntax checker using the SCSS compiler.
......
// Scala syntax error
object {
println("hello, world")
}
;;; test-scala.el --- Test the Scala checker -*- lexical-binding: t; -*-
;; Copyright (c) 2013 Sebastian Wiesner <lunaryorn@gmail.com>
;;
;; Author: Sebastian Wiesner <lunaryorn@gmail.com>
;; URL: https://github.com/lunaryorn/flycheck
;; This file is not part of GNU Emacs.
;; 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/>.
;;; Code:
(require 'ert)
(require 'flycheck)
(require 'scala-mode2 nil :no-error)
(ert-deftest checker-scala-syntax-error ()
:expected-result (flycheck-testsuite-fail-unless-checker 'scala)
(flycheck-testsuite-should-syntax-check
"checkers/scala-syntax-error.scala" 'scala-mode nil
'(3 nil "identifier expected but '{' found." error)))
;; Local Variables:
;; coding: utf-8
;; End:
;;; test-scala.el ends here
......@@ -101,35 +101,42 @@ else
apt "$EMACS"-nox || exit 1
fi
# Install the necessary interpreters and tools
apt nodejs npm \
python python-pip \
php5-cli php-pear \
ruby1.9.1 \
esl-erlang
# Install the necessary additional package managers
apt npm \
php-pear \
python-pip
# Install all checker tools
# Install syntax checker tools
apt bash \
tidy \
chktex \
esl-erlang \
golang-stable \
lacheck \
lua5.2 \
chktex lacheck \
php5-cli \
ruby1.9.1 \
rust \
scala \
tidy \
xmlstarlet \
zsh \
golang-stable \
rust
zsh
pip flake8 pep8-naming pylint docutils
pip docutils \
flake8 \
pep8-naming \
pylint
pear PHP_CodeSniffer
npm coffee-script coffeelint \
npm coffeelint \
coffee-script \
csslint \
jshint \
jsonlint
gem haml \
sass \
rubocop
rubocop \
sass
# Install Elixir compiler.
ELIXIR_VERSION=0.8.2
......
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