forked from coala/coala-emacs
-
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.
project management: Cask, tests and CI
Use the ``cask`` library for project management. Use ``ert`` for tests. Adds an exemplary test for the PEP8Bear. CI is also part of project management. Closes coala#11
- Loading branch information
1 parent
b94c111
commit 0c3fe13
Showing
6 changed files
with
76 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Default] | ||
enabled = True | ||
|
||
[commit] | ||
bears = GitCommitBear | ||
|
||
[python] | ||
bears = PEP8Bear |
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,26 @@ | ||
language: python | ||
sudo: no | ||
python: | ||
- 3.4 | ||
- 3.5 | ||
env: | ||
# - EVM_EMACS=emacs-24.1-travis | ||
# - EVM_EMACS=emacs-24.2-travis | ||
- EVM_EMACS=emacs-24.3-travis | ||
- EVM_EMACS=emacs-24.4-travis | ||
- EVM_EMACS=emacs-24.5-travis | ||
- EVM_EMACS=emacs-25.1-travis | ||
- EVM_EMACS=emacs-25.2-travis | ||
# - EVM_EMACS=emacs-git-snapshot | ||
before_install: | ||
- curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw > travis.sh && source ./travis.sh | ||
- evm install $EVM_EMACS --use --skip | ||
- cask | ||
install: | ||
- pip install coala | ||
- pip install flake8 | ||
- pip install coveralls | ||
script: | ||
- PYTHONPATH="`pwd`" cask exec ert-runner | ||
after_success: | ||
- coveralls |
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,10 @@ | ||
(source gnu) | ||
(source melpa) | ||
|
||
(package "flycheck-coala" "0.1" "Flycheck plugin for coala.io code analyzer") | ||
|
||
(development | ||
(depends-on "dash") | ||
(depends-on "flycheck") | ||
(depends-on "f") | ||
(depends-on "ert-runner")) |
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,23 @@ | ||
;;; coala-emacs --- tests | ||
;;; Commentary: | ||
(require 'flycheck) | ||
(require 'flycheck-ert) | ||
|
||
;;; Code: | ||
|
||
;;; Directories | ||
|
||
(flycheck-ert-def-checker-test coala python coala-python | ||
(let ((setup-geiser | ||
(lambda () | ||
(setq-local geiser-scheme-implementation 'chicken) | ||
(geiser-mode)))) | ||
(add-hook 'scheme-mode-hook setup-geiser) | ||
(unwind-protect | ||
(flycheck-ert-should-syntax-check | ||
"test/resources/language/pep8.py" 'python-mode | ||
'(1 nil info "The code does not comply to PEP8." | ||
:checker coala))))) | ||
|
||
(provide 'coala-test) | ||
;;; coala-test.el ends here |
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 @@ | ||
a = 1 + 1 # <- not PEP8 compliant |
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 @@ | ||
;; -*- lexical-binding: t -*- | ||
|
||
(require 'f) | ||
(let ((coala-emacs-dir (f-parent (f-dirname (f-this-file))))) | ||
(add-to-list 'load-path coala-emacs-dir) | ||
(add-to-list 'process-environment (format "PYTHONPATH=%s" coala-emacs-dir)) | ||
(add-to-list 'process-environment "ELPY_TEST=1")) | ||
(require 'flycheck-coala) |