Skip to content

Commit 4f555fc

Browse files
committed
Add travis build configuration
1 parent 6db92a9 commit 4f555fc

File tree

4 files changed

+56
-3
lines changed

4 files changed

+56
-3
lines changed

.travis.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
language: java
2+
3+
jdk:
4+
- oraclejdk8
5+
6+
# see https://github.com/travis-ci/travis-ci/issues/8408
7+
before_install:
8+
- unset _JAVA_OPTIONS
9+
- git clone https://github.com/google/google-java-format.git
10+
- cd google-java-format
11+
- patch ./core/src/main/java/com/google/googlejavaformat/java/JavaFormatterOptions.java < ../patches/line.patch
12+
13+
# use travis-ci docker based infrastructure
14+
sudo: false
15+
16+
cache:
17+
directories:
18+
- $HOME/.m2
19+
20+
install: mvn install -DskipTests=true -V
21+
22+
script: cp ./core/target/google-java-format-*-all-deps.jar ../bin/google-java-format.jar
23+
24+
after_success:
25+
- cd ..
26+
- mkdir release
27+
- cp palint.py release/
28+
- cp -r bin release/
29+
- cd release
30+
- wget https://sourceforge.net/projects/checkstyle/files/latest/download
31+
- mv download bin/checkstyle.jar
32+
- zip -r release.zip .
33+
34+
deploy:
35+
provider: releases
36+
api-key: $GITHUB_TOKEN
37+
file: release.zip
38+
skip_cleanup: true
39+
on:
40+
tags: true

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
# cse-pa-lint
1+
# cse-pa-lint [![Build Status](https://travis-ci.org/mistzzt/cse-pa-lint.svg)][travis]
22
Detecting possible style in-correction in programming assignments
3+
4+
[travis]: <https://travis-ci.org/mistzzt/cse-pa-lint>

palint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
HOME = os.path.expanduser('~/')
1414
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
15-
CHECKSTYLE_PATH = os.path.join(SCRIPT_DIR, 'bin', 'checkstyle-8.3-all.jar')
15+
CHECKSTYLE_PATH = os.path.join(SCRIPT_DIR, 'bin', 'checkstyle.jar')
1616
STYLE_CONFIG_PATH = os.path.join(SCRIPT_DIR, 'bin', 'google_checks.xml')
17-
FORMATTER_PATH = os.path.join(SCRIPT_DIR, 'bin', 'google-java-format-1.6-SNAPSHOT-CSE11-all-deps.jar')
17+
FORMATTER_PATH = os.path.join(SCRIPT_DIR, 'bin', 'google-java-format.jar')
1818

1919
CONFIG_FILE_NAME = 'config.json'
2020
COMPILE_ERROR_FILE_NAME = 'compile_error.log'

patches/line.patch

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- JavaFormatterOptions.java 2017-10-29 21:23:59.057733900 -0700
2+
+++ Modified.java 2017-10-29 21:33:17.479177900 -0700
3+
@@ -29,7 +29,7 @@
4+
@Immutable
5+
public class JavaFormatterOptions {
6+
7+
- static final int DEFAULT_MAX_LINE_LENGTH = 100;
8+
+ static final int DEFAULT_MAX_LINE_LENGTH = 80;
9+
10+
public enum Style {
11+

0 commit comments

Comments
 (0)