This repository has been archived by the owner on Nov 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from gdkrmr/dev
Dev
- Loading branch information
Showing
7 changed files
with
198 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
*.elc | ||
\#*\# | ||
.cask* | ||
dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
language: julia | ||
julia: | ||
- 0.5.2 | ||
# there is no Lint.jl for 0.6 and nightly yet | ||
|
||
# TODO: only test master! | ||
|
||
sudo: false | ||
|
||
cache: | ||
- directories: | ||
- "$HOME/emacs/" | ||
- ".cask/" | ||
- "$HOME/.emacs.d/.cask" | ||
- "$HOME/.julia" | ||
|
||
env: | ||
matrix: | ||
- EMACS_VERSION=24.5 | ||
- EMACS_VERSION=25.2 | ||
- EMACS_VERSION=snapshot | ||
|
||
matrix: | ||
fast_finish: true | ||
allow_failures: | ||
- env: EMACS_VERSION=snapshot | ||
|
||
before_install: | ||
# Install a proper Emacs for testing | ||
- export PATH="$HOME/bin:$PATH" | ||
- wget 'https://raw.githubusercontent.com/flycheck/emacs-travis/master/emacs-travis.mk' | ||
- if [[ -n $EMACS_VERSION ]]; then make -f emacs-travis.mk install_emacs; fi | ||
- if [[ -n $EMACS_VERSION ]]; then make -f emacs-travis.mk install_cask; fi | ||
- if [[ -n $EMACS_VERSION ]]; then emacs --version; fi | ||
# Set up julia | ||
- julia -e "Pkg.update()" | ||
- julia -e 'Pkg.add("Lint")' | ||
- julia -e 'Pkg.build("Lint")' | ||
|
||
install: | ||
- cask install | ||
|
||
script: | ||
- make compile | ||
- make test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
(source gnu) | ||
(source melpa) | ||
|
||
(package-file "flycheck-julia.el") | ||
|
||
(development | ||
(depends-on "ess") | ||
(depends-on "julia-mode")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# modified from flycheck-ocaml | ||
|
||
EMACS=emacs | ||
EMACSFLAGS= | ||
CASK=cask | ||
VERSION:=$(shell EMACS=$(EMACS) $(CASK) version) | ||
PKGDIR:=$(shell EMACS=$(EMACS) $(CASK) package-directory) | ||
|
||
export EMACS | ||
|
||
|
||
SRCS=flycheck-julia.el | ||
OBJECTS=$(SRCS:.el=.elc) | ||
|
||
EMACSBATCH=$(EMACS) -Q --batch $(EMACSFLAGS) | ||
|
||
.PHONY: compile dist test \ | ||
clean clean-elc clean-dist clean-deps | ||
|
||
compile : $(OBJECTS) | ||
|
||
dist : | ||
$(CASK) package | ||
|
||
deps : $(PKGDIR) | ||
|
||
# Testing | ||
test : | ||
$(CASK) exec $(EMACSBATCH) \ | ||
-l flycheck-julia.el -l test/flycheck-julia-test.el \ | ||
-f ert-run-tests-batch-and-exit | ||
|
||
# Cleanup targets | ||
clean : clean-elc clean-dist clean-deps | ||
|
||
clean-elc : | ||
rm -rf $(OBJECTS) | ||
|
||
clean-dist : | ||
rm -rf $(DISTDIR) | ||
|
||
clean-deps : | ||
rm -rf .cask/ | ||
|
||
$(PKGDIR) : Cask | ||
$(CASK) install | ||
touch $(PKGDIR) | ||
|
||
%.elc : %.el $(PKGDIR) | ||
$(CASK) exec $(EMACSBATCH) \ | ||
-f batch-byte-compile $< | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
;;; flycheck-julia-test.el --- Flycheck Julia: Test cases -*- lexical-binding: t; -*- | ||
|
||
;; Copyright (C) 2017 Guido Kraemer <guido.kraemer@gmx.de> | ||
|
||
;; Author: Guido Kraemer <guido.kraemer@gmx.de> | ||
;; URL: https://github.com/gdkrmr/flycheck-julia | ||
|
||
;; 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/>. | ||
|
||
;;; Commentary: | ||
|
||
;; Test cases Flycheck OCaml. | ||
|
||
;;; Code: | ||
|
||
|
||
(require 'flycheck-julia) | ||
(require 'flycheck-ert) | ||
|
||
(load "ess-autoloads.el") | ||
(require 'ess-site) | ||
|
||
(ert-deftest flycheck-julia-start-server () | ||
:tags '(server) | ||
(flycheck-julia-server-start) | ||
(should (flycheck-julia-serverp)) | ||
(flycheck-julia-server-stop)) | ||
|
||
(ert-deftest flycheck-julia-kill-server () | ||
:tags '(server) | ||
(flycheck-julia-server-start) | ||
(sleep-for 5) | ||
(flycheck-julia-server-stop) | ||
(sleep-for 5) | ||
(should (not (flycheck-julia-serverp)))) | ||
|
||
(ert-deftest flycheck-julia-restart-server () | ||
:tags '(server) | ||
(flycheck-julia-server-start) | ||
(sleep-for 5) | ||
(flycheck-julia-server-restart) | ||
(sleep-for 5) | ||
(should (flycheck-julia-serverp)) | ||
(flycheck-julia-server-stop)) | ||
|
||
(provide 'flycheck-julia-test) | ||
|
||
;;; flycheck-julia-test.el ends here |