-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 464-enum-trailing-comma
- Adapt base class for test - Update copyright in header for EnumTrailingCommaAndSemicolonCheck.java and EnumTrailingCommaAndSemicolonCheckTest.java - Rename input file to match check: InputEnumTrailingComma → InputEnumTrailingCommaAndSemicolonCheck
- Loading branch information
Showing
371 changed files
with
10,702 additions
and
4,344 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,100 @@ | ||
#!/bin/bash | ||
# Attention, there is no "-x" to avoid problems on Travis | ||
set -e | ||
|
||
case $1 in | ||
|
||
pr-description) | ||
.ci/xtr_pr-description.sh | ||
;; | ||
|
||
eclipse-cs) | ||
cd sevntu-checks | ||
mvn -e clean install -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dcobertura.skip=true | ||
cd .. | ||
git clone https://github.com/checkstyle/eclipse-cs.git | ||
cd eclipse-cs/ | ||
git checkout 8.10.0 | ||
mvn -e install | ||
cd ../ | ||
cd eclipsecs-sevntu-plugin | ||
mvn -e verify | ||
mvn -e javadoc:javadoc | ||
;; | ||
|
||
maven-plugin) | ||
cd sevntu-checks | ||
mvn -e clean install -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dcobertura.skip=true | ||
cd .. | ||
cd sevntu-checkstyle-maven-plugin | ||
mvn -e verify | ||
mvn -e javadoc:javadoc | ||
;; | ||
|
||
idea-extension) | ||
cd sevntu-checks | ||
mvn -e clean install -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dcobertura.skip=true | ||
cd .. | ||
cd sevntu-checkstyle-idea-extension | ||
mvn -e verify | ||
mvn -e javadoc:javadoc | ||
;; | ||
|
||
sonar-plugin) | ||
cd sevntu-checks | ||
mvn -e clean install -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dcobertura.skip=true | ||
cd .. | ||
cd sevntu-checkstyle-sonar-plugin | ||
mvn -e verify | ||
mvn -e javadoc:javadoc | ||
;; | ||
|
||
sevntu-checks) | ||
cd sevntu-checks | ||
mvn -e -Pcoverall install | ||
mvn -e verify -Pno-validations,selftesting | ||
mvn -e javadoc:javadoc | ||
if [[ $TRAVIS == 'true' ]]; then | ||
mvn -e -Pcoverall jacoco:report coveralls:report | ||
fi | ||
;; | ||
|
||
all-sevntu-checks-contribution) | ||
wget -q \ | ||
https://raw.githubusercontent.com/checkstyle/contribution/master/checkstyle-tester/checks-sevntu-error.xml | ||
xmlstarlet sel --net --template -m .//module -v "@name" -n checks-sevntu-error.xml \ | ||
| grep -vE "Checker|TreeWalker|Filter|Holder" | grep -v "^$" \ | ||
| sed "s/com\.github\.sevntu\.checkstyle\.checks\..*\.//" \ | ||
| sort | uniq | sed "s/Check$//" > web.txt | ||
xmlstarlet sel --net --template -m .//module -v "@name" -n sevntu-checks/sevntu-checks.xml \ | ||
| grep -vE "Checker|TreeWalker|Filter|Holder" | grep -v "^$" \ | ||
| sed "s/com\.github\.sevntu\.checkstyle\.checks\..*\.//" \ | ||
| sort | uniq | sed "s/Check$//" > file.txt | ||
diff -u web.txt file.txt | ||
;; | ||
|
||
checkstyle-regression) | ||
git clone https://github.com/checkstyle/checkstyle | ||
cd sevntu-checks | ||
mvn -e install -DskipTests -Dcheckstyle.skip=true -Dcobertura.skip=true | ||
mvn -e test -Dtest=CheckstyleRegressionTest#setupFiles -Dregression-path=../ | ||
cd ../ | ||
cd checkstyle | ||
mvn -e clean verify -e -DskipTests -DskipITs -Dpmd.skip=true \ | ||
-Dfindbugs.skip=true -Dcobertura.skip=true \ | ||
-Dmaven.sevntu-checkstyle-check.checkstyle.version=8.10 | ||
;; | ||
|
||
eclipse-analysis) | ||
cd sevntu-checks | ||
mvn -e clean compile exec:exec -Peclipse-compiler | ||
;; | ||
|
||
|
||
*) | ||
echo "Unexpected argument: $1" | ||
sleep 5s | ||
false | ||
;; | ||
|
||
esac |
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,29 @@ | ||
#!/bin/bash | ||
# Attention, there is no "-x" to avoid problems on Travis | ||
set -e | ||
|
||
if [[ ! $TRAVIS_PULL_REQUEST =~ ^([0-9]*)$ ]]; then exit 0; fi | ||
LINK_COMMITS=https://api.github.com/repos/sevntu-checkstyle/sevntu.checkstyle/pulls/$TRAVIS_PULL_REQUEST/commits | ||
COMMITS=$(curl -s -H "Authorization: token $READ_ONLY_TOKEN" $LINK_COMMITS | jq '.[0] | .commit.message') | ||
echo 'Commit messages from github: '${COMMITS:0:60}... | ||
ISSUE_NUMBER=$(echo $COMMITS | sed -e 's/^.*Issue //' | sed -e 's/:.*//') | ||
echo 'Issue number: '$ISSUE_NUMBER && RESULT=0 | ||
if [[ $ISSUE_NUMBER =~ ^#[0-9]+$ ]]; then | ||
LINK_PR=https://api.github.com/repos/sevntu-checkstyle/sevntu.checkstyle/pulls/$TRAVIS_PULL_REQUEST | ||
LINK_ISSUE=https://api.github.com/repos/sevntu-checkstyle/sevntu.checkstyle/issues/${ISSUE_NUMBER:1} | ||
REGEXP=($ISSUE_NUMBER\|https://github.com/sevntu-checkstyle/sevntu.checkstyle/issues/${ISSUE_NUMBER:1}) | ||
PR_DESC=$(curl -s -H "Authorization: token $READ_ONLY_TOKEN" $LINK_PR | jq '.body' | grep -E $REGEXP | cat ) | ||
echo 'PR Description grepped:'${PR_DESC:0:80} | ||
if [[ -z $PR_DESC ]]; then | ||
echo 'Please put a reference to an Issue in the PR description, this will bind the Issue to your PR in Github' && RESULT=1; | ||
fi | ||
LABEL_APRV=$(curl -s -H "Authorization: token $READ_ONLY_TOKEN" $LINK_ISSUE | jq '.labels [] | .name' | grep approved | cat | wc -l ) | ||
if [[ $LABEL_APRV == 0 ]]; then | ||
echo 'You are providing a PR for an Issue that is not approved yet, please ask admins to approve your Issue first' && RESULT=1; | ||
fi | ||
fi | ||
if [[ $RESULT == 0 ]]; then | ||
echo 'PR validation succeeded.'; | ||
else | ||
echo 'PR validation failed.' && false; | ||
fi |
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,11 @@ | ||
Please read http://checkstyle.sourceforge.net/report_issue.html | ||
|
||
**Note:** Sevntu checks are in a different JAR from the main Checkstyle JAR and cannot be run without the main JAR. | ||
The command to run sevntu in the Command Line Interface (CLI) is slightly different as noted below: | ||
``` | ||
java -classpath sevntu-checks-X.XX.X.jar;checkstyle-X.XX-all.jar com.puppycrawl.tools.checkstyle.Main -c config.xml YOUR_FILE.java | ||
``` | ||
|
||
Please provide issue report in format that we request, EACH DETAIL MAKE A HUGE HELP. | ||
|
||
Issues that are not following the guidelines, will be processed with last priority. |
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,29 @@ | ||
/var/tmp $ javac YOUR_FILE.java | ||
|
||
[[PLACE YOUR OUTPUT HERE]] | ||
|
||
/var/tmp $ cat YOUR_FILE.java | ||
|
||
[[PLACE YOU OUTPUT HERE]] | ||
|
||
/var/tmp $ cat config.xml | ||
|
||
[[PLACE YOUR OUTPUT HERE]] | ||
|
||
For Linux users: | ||
|
||
`/var/tmp $ java -classpath sevntu-checks-X.XX.X.jar:checkstyle-X.XX-all.jar com.puppycrawl.tools.checkstyle.Main -c config.xml YOUR_FILE.java` | ||
|
||
For Windows users: | ||
|
||
`C:\tmp> java -classpath sevntu-checks-X.XX.X.jar;checkstyle-X.XX-all.jar com.puppycrawl.tools.checkstyle.Main -c config.xml YOUR_FILE.java` | ||
|
||
[[PLACE YOUR OUTPUT HERE]] | ||
|
||
--------------- | ||
|
||
Describe what you expect in detail. | ||
|
||
-------------- | ||
|
||
Still not clear ??? - see example - https://github.com/sevntu-checkstyle/sevntu.checkstyle/wiki/How-to-report-the-issue-(example) |
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,16 @@ | ||
Mandatory to understand and do: | ||
0) Issue you are trying to fix/resolve has to have "approved" label. | ||
1) Put in description of Pull Request reference to issue if it exists. Example: "Issue: #XXXXXX" | ||
2) Commit message should adhere to the following rules: | ||
a) Must match one of the following patterns:\n" | ||
^Issue #\\d+: .*$ | ||
^Pull #\\d+: .*$ | ||
^(minor|config|infra|doc|spelling): .*$ | ||
b) It contains only one line of text | ||
c) Must not end with a period, space, or tab | ||
|
||
To avoid multiple iterations of fixes and CIs failures, please read http://checkstyle.sourceforge.net/contributing.html | ||
|
||
ATTENTION: We are not merging Pull Requests that not passing our CIs, but we help to resolve issues. | ||
|
||
Thanks for reading, remove whole this message and type what you need. |
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 |
---|---|---|
@@ -1,31 +1,102 @@ | ||
language: java | ||
sudo: false | ||
|
||
jdk: | ||
- oraclejdk8 | ||
|
||
before_install: git clone git://git.code.sf.net/p/eclipse-cs/git eclipse-cs-git | ||
&& cd eclipse-cs-git/ && git checkout 7.2.0 | ||
&& cd net.sf.eclipsecs.parent/ && mvn install | ||
&& cd ../../ | ||
|
||
install: cd sevntu-checks && mvn clean install && mvn javadoc:javadoc | ||
&& cd ../eclipsecs-sevntu-plugin && mvn verify && mvn javadoc:javadoc | ||
&& cd ../sevntu-checkstyle-maven-plugin && mvn verify && mvn javadoc:javadoc | ||
&& cd ../sevntu-checkstyle-idea-extension && mvn verify && mvn javadoc:javadoc | ||
&& cd ../sevntu-checkstyle-sonar-plugin && mvn verify && mvn javadoc:javadoc | ||
&& cd ../sevntu-checks && mvn jacoco:report coveralls:jacoco | ||
&& cd ../sevntu-checks && mvn verify -Pselftesting | ||
|
||
after_success: | ||
|
||
cache: | ||
directories: | ||
- ~/.m2 | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- xmlstarlet | ||
|
||
branches: | ||
only: | ||
- master | ||
|
||
install: | ||
- | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
# eclipse-cs | ||
- jdk: oraclejdk8 | ||
env: | ||
- DESC="eclipse-cs" | ||
- CMD="./.ci/travis.sh eclipse-cs" | ||
|
||
# maven-plugin | ||
- jdk: oraclejdk8 | ||
env: | ||
- DESC="maven-plugin" | ||
- CMD="./.ci/travis.sh maven-plugin" | ||
|
||
# idea-extension | ||
- jdk: oraclejdk8 | ||
env: | ||
- DESC="idea-extension" | ||
- CMD="./.ci/travis.sh idea-extension" | ||
|
||
# sonar-plugin | ||
- jdk: oraclejdk8 | ||
env: | ||
- DESC="sonar-plugin" | ||
- CMD="./.ci/travis.sh sonar-plugin" | ||
|
||
# checks | ||
- jdk: oraclejdk8 | ||
env: | ||
- DESC="checks" | ||
- CMD="./.ci/travis.sh sevntu-checks" | ||
|
||
# Ensure that all sevntu checks are used in contribution | ||
- jdk: oraclejdk8 | ||
env: | ||
- DESC="All sevntu checks should be used in contribution" | ||
- CMD="./.ci/travis.sh all-sevntu-checks-contribution" | ||
|
||
# regression on checkstyle | ||
- jdk: oraclejdk8 | ||
env: | ||
- DESC="checkstyle-regression" | ||
- CMD="./.ci/travis.sh checkstyle-regression" | ||
|
||
# eclipse static analysis | ||
- jdk: oraclejdk8 | ||
env: | ||
- DESC="eclipse-analysis" | ||
- CMD="./.ci/travis.sh eclipse-analysis" | ||
|
||
# testing of PR format | ||
- env: | ||
- DESC="test Issue ref in PR description" | ||
- CMD="./.ci/travis.sh pr-description" | ||
|
||
|
||
script: | ||
- SKIP_FILES1=".github|codeship-*|buddy.yml|appveyor.yml|circleci|distelli-manifest.yml" | ||
- SKIP_FILES2="|fast-forward-merge.sh|LICENSE|LICENSE.apache20|README.md|release.sh|RIGHTS.antlr" | ||
- SKIP_FILES3="|shippable.yml|shippable.sh|wercker.yml|wercker.sh|intellij-idea-inspections.xml" | ||
- SKIP_FILES=$SKIP_FILES1$SKIP_FILES2$SKIP_FILES3 | ||
- | | ||
if [[ $SKIP_CI != 'false' ]]; then | ||
if [[ $(git diff --name-only HEAD HEAD~1 | grep -vE "$SKIP_FILES" \ | ||
| cat | wc -c | sed 's/^ *//' ) > 0 ]]; then | ||
SKIP_CI="false" | ||
else | ||
SKIP_CI="true" | ||
fi | ||
fi | ||
- echo "SKIP_CI="$SKIP_CI | ||
- | | ||
set -e | ||
if [[ $SKIP_CI == 'false' ]]; | ||
then | ||
eval $CMD; | ||
echo "eval of CMD is completed" | ||
else | ||
echo "CI is skipped" | ||
fi | ||
after_success: |
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
#!/bin/sh | ||
sh deploy.sh --all | ||
#!/usr/bin/env bash | ||
|
||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
$CURRENT_DIR/deploy.sh --all |
Oops, something went wrong.