Skip to content

Commit 64cadb4

Browse files
committed
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
1 parent a9253f1 commit 64cadb4

File tree

8 files changed

+67
-0
lines changed

8 files changed

+67
-0
lines changed

.coafile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[Default]
2+
enabled = True
3+
4+
[commit]
5+
bears = GitCommitBear
6+
7+
[python]
8+
bears = PEP8Bear

.travis.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: python
2+
sudo: no
3+
python:
4+
- 3.4
5+
- 3.5
6+
- 3.6
7+
env:
8+
- EVM_EMACS=emacs-24.4-travis
9+
- EVM_EMACS=emacs-24.5-travis
10+
- EVM_EMACS=emacs-25.1-travis
11+
- EVM_EMACS=emacs-25.2-travis
12+
before_install:
13+
- curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw > travis.sh && source ./travis.sh
14+
- evm install $EVM_EMACS --use --skip
15+
- cask
16+
install:
17+
- pip install -r requirements.txt
18+
script:
19+
- PYTHONPATH="`pwd`" cask exec ert-runner

Cask

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(source gnu)
2+
(source melpa)
3+
4+
(package "flycheck-coala" "0.1" "Flycheck plugin for coala.io code analyzer")
5+
6+
(development
7+
(depends-on "dash")
8+
(depends-on "flycheck")
9+
(depends-on "f")
10+
(depends-on "ert-runner"))

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Flycheck coala Checker
22
======================
3+
[![Build Status](https://travis-ci.org/coala/coala-emacs.svg?branch=master)](https://travis-ci.org/coala/coala-emacs)
34

45
Integrate [coala](https://coala.io) with
56
[flycheck](http://www.flycheck.org).

requirements.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
coala
2+
coala-bears
3+
pyflakes~=1.4.0

test/coala-test.el

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
;;; coala-emacs --- tests
2+
;;; Commentary:
3+
(require 'flycheck)
4+
(require 'flycheck-ert)
5+
6+
;;; Code:
7+
8+
;;; Directories
9+
10+
(flycheck-ert-def-checker-test coala python coala-python
11+
(unwind-protect
12+
(flycheck-ert-should-syntax-check
13+
"test/resources/language/pep8.py" 'python-mode
14+
'(1 nil warning "The code does not comply to PEP8."
15+
:checker coala))))
16+
17+
(provide 'coala-test)
18+
;;; coala-test.el ends here

test/resources/language/pep8.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
a = 1 + 1 # <- not PEP8 compliant

test/test-helper.el

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
;; -*- lexical-binding: t -*-
2+
3+
(require 'f)
4+
(let ((coala-emacs-dir (f-parent (f-dirname (f-this-file)))))
5+
(add-to-list 'load-path coala-emacs-dir)
6+
(add-to-list 'process-environment (format "PYTHONPATH=%s" coala-emacs-dir)))
7+
(require 'flycheck-coala)

0 commit comments

Comments
 (0)