From 9d2895269d81801385014fba3a85c4bc515c79db Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 29 May 2017 11:29:52 +0100 Subject: [PATCH 1/4] KCR29: builder: Rule: sortByName(): use explicit scoping --- .../main/java/net/kemitix/checkstyle/ruleset/builder/Rule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/Rule.java b/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/Rule.java index 8e8055b..6e6798e 100644 --- a/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/Rule.java +++ b/builder/src/main/java/net/kemitix/checkstyle/ruleset/builder/Rule.java @@ -95,7 +95,7 @@ public class Rule { * the right string; and a value greater than 0 if the left string is lexicographically greater than the right * string. */ - static int sortByName(final Rule left, final Rule right) { + protected static int sortByName(final Rule left, final Rule right) { return left.getLowerCaseRuleName() .compareTo(right.getLowerCaseRuleName()); } From 4a4da15d4fde90cf01142bb2e0bf7c238d9ee8cb Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 29 May 2017 11:45:55 +0100 Subject: [PATCH 2/4] KCR29: travis-ci: should only submit coverage report from Travis-CI --- travis-ci/travis-coveralls-report.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/travis-ci/travis-coveralls-report.sh b/travis-ci/travis-coveralls-report.sh index aab1704..ae6c472 100755 --- a/travis-ci/travis-coveralls-report.sh +++ b/travis-ci/travis-coveralls-report.sh @@ -1,3 +1,5 @@ #!/usr/bin/env bash -./mvnw --projects builder,plugin test jacoco:report coveralls:report +if [ "$TRAVIS" = "true" ];then + ./mvnw --projects builder,plugin test jacoco:report coveralls:report +fi From dd17826a609fbb67ad6c1824ad199273c0040ca5 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 29 May 2017 11:51:29 +0100 Subject: [PATCH 3/4] KCR29: travis-ci: dump $TRAVIS and other env Trying to detect when running in Travis CI and not Shippable so only Travis-CI submits to coveralls. --- travis-ci/travis-coveralls-report.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/travis-ci/travis-coveralls-report.sh b/travis-ci/travis-coveralls-report.sh index ae6c472..8411ecb 100755 --- a/travis-ci/travis-coveralls-report.sh +++ b/travis-ci/travis-coveralls-report.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +echo "TRAVIS: $TRAVIS" +set if [ "$TRAVIS" = "true" ];then ./mvnw --projects builder,plugin test jacoco:report coveralls:report fi From 7229c11b30643137d99966e876e766aadd80fae1 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 29 May 2017 12:04:43 +0100 Subject: [PATCH 4/4] KCR29: travis-ci: detect Travis-CI --- travis-ci/travis-coveralls-report.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/travis-ci/travis-coveralls-report.sh b/travis-ci/travis-coveralls-report.sh index 8411ecb..5ef727d 100755 --- a/travis-ci/travis-coveralls-report.sh +++ b/travis-ci/travis-coveralls-report.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -echo "TRAVIS: $TRAVIS" -set -if [ "$TRAVIS" = "true" ];then +## Only send coveralls reports from Travis-CI. Some CIs, like Shippable, lie by setting TRAVIS=true. +## Currently, Shippable, does not set TRAVIS_LANGUAGE, but Travis-CI does. +if [ "$TRAVIS_LANGUAGE" = "java" ];then ./mvnw --projects builder,plugin test jacoco:report coveralls:report fi