Skip to content

Commit

Permalink
config: add non-main files checkstyle run
Browse files Browse the repository at this point in the history
  • Loading branch information
rnveach committed Dec 3, 2022
1 parent 2af09a0 commit 86fe98a
Show file tree
Hide file tree
Showing 39 changed files with 167 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .ci/bump-cs-version-in-esclipsecs-plugin.sh
Expand Up @@ -10,6 +10,6 @@ fi
VERSION=$1
cd eclipsecs-sevntu-plugin

mvn versions:set-property -DgenerateBackupPoms=false -Dproperty=checkstyle.version -DnewVersion="$VERSION"
mvn -e --no-transfer-progress versions:set-property -DgenerateBackupPoms=false -Dproperty=checkstyle.version -DnewVersion="$VERSION"

echo "Version updated to $VERSION at eclipsecs-sevntu-plugin/pom.xml"
2 changes: 1 addition & 1 deletion .ci/bump-cs-version-in-sevntu-checks.sh
Expand Up @@ -9,6 +9,6 @@ fi

VERSION=$1
cd sevntu-checks
mvn versions:set-property -DgenerateBackupPoms=false -Dproperty=checkstyle.version -DnewVersion="$VERSION"
mvn -e --no-transfer-progress versions:set-property -DgenerateBackupPoms=false -Dproperty=checkstyle.version -DnewVersion="$VERSION"

echo "Version updated to $VERSION at sevntu-checks/pom.xml"
2 changes: 1 addition & 1 deletion .ci/bump-cs-version-in-sonar-plugin.sh
Expand Up @@ -10,6 +10,6 @@ fi
VERSION=$1
cd sevntu-checkstyle-sonar-plugin

mvn versions:set-property -DgenerateBackupPoms=false -Dproperty=checkstyle.version -DnewVersion="$VERSION"
mvn -e --no-transfer-progress versions:set-property -DgenerateBackupPoms=false -Dproperty=checkstyle.version -DnewVersion="$VERSION"

echo "Version updated to $VERSION at sevntu-checkstyle-sonar-plugin/pom.xml"
38 changes: 19 additions & 19 deletions .ci/checks-no-exception.sh
Expand Up @@ -7,17 +7,17 @@ case $1 in

setup)
cd sevntu-checks
mvn -e clean install -Pno-validations
mvn -e --no-transfer-progress clean install -Pno-validations
cd ..
;;

checkstyle)
cd sevntu-checks
BRANCH=$(git rev-parse --abbrev-ref HEAD)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' \
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
Expand All @@ -38,10 +38,10 @@ checkstyle)
struts)
cd sevntu-checks
BRANCH=$(git rev-parse --abbrev-ref HEAD)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' \
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
Expand All @@ -62,10 +62,10 @@ struts)
guava)
cd sevntu-checks
BRANCH=$(git rev-parse --abbrev-ref HEAD)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' \
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
Expand All @@ -86,10 +86,10 @@ guava)
hibernate-orm)
cd sevntu-checks
BRANCH=$(git rev-parse --abbrev-ref HEAD)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' \
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
Expand All @@ -110,10 +110,10 @@ hibernate-orm)
spotbugs)
cd sevntu-checks
BRANCH=$(git rev-parse --abbrev-ref HEAD)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' \
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
Expand All @@ -134,10 +134,10 @@ spotbugs)
spring-framework)
cd sevntu-checks
BRANCH=$(git rev-parse --abbrev-ref HEAD)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' \
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
Expand All @@ -158,10 +158,10 @@ spring-framework)
hbase)
cd sevntu-checks
BRANCH=$(git rev-parse --abbrev-ref HEAD)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' \
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
Expand All @@ -182,10 +182,10 @@ hbase)
pmd-elasticsearch-lombok-ast)
cd sevntu-checks
BRANCH=$(git rev-parse --abbrev-ref HEAD)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' \
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
Expand All @@ -208,10 +208,10 @@ pmd-elasticsearch-lombok-ast)
alot-of-projects)
cd sevntu-checks
BRANCH=$(git rev-parse --abbrev-ref HEAD)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' \
CS_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
SEVNTU_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
SEVNTU_POM_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo CS_version: ${CS_POM_VERSION}
echo SEVNTU_version: ${SEVNTU_POM_VERSION}
Expand Down
36 changes: 18 additions & 18 deletions .ci/validation.sh
Expand Up @@ -15,41 +15,41 @@ eclipse-cs)
| sed "s/-SNAPSHOT//")
cd ../
cd sevntu-checks
mvn -B -e clean install -Pno-validations
mvn -e --no-transfer-progress clean install -Pno-validations
cd ..
checkout_from "https://github.com/checkstyle/eclipse-cs.git"
cd .ci-temp/eclipse-cs/
echo "Eclipse-cs tag: "$ECLIPSECS_TAG_NAME
git checkout $ECLIPSECS_TAG_NAME
mvn -B -e install
mvn -e --no-transfer-progress install
cd ../../
cd eclipsecs-sevntu-plugin
mvn -e verify
mvn -e javadoc:javadoc
mvn -e --no-transfer-progress verify
mvn -e --no-transfer-progress javadoc:javadoc
;;

idea-extension)
cd sevntu-checks
mvn -e clean install -Pno-validations
mvn -e --no-transfer-progress clean install -Pno-validations
cd ..
cd sevntu-checkstyle-idea-extension
mvn -e verify
mvn -e --no-transfer-progress verify
;;

sonar-plugin)
cd sevntu-checks
mvn -e clean install -Pno-validations
mvn -e --no-transfer-progress clean install -Pno-validations
cd ..
cd sevntu-checkstyle-sonar-plugin
mvn -e verify
mvn -e --no-transfer-progress verify
;;

sevntu-checks)
cd sevntu-checks
mvn -e -Pcoverall install
mvn -e verify -Pno-validations,selftesting
mvn -e --no-transfer-progress -Pcoverall install
mvn -e --no-transfer-progress verify -Pno-validations,selftesting
if [[ $TRAVIS == 'true' ]]; then
mvn -e -Pcoverall jacoco:report coveralls:report
mvn -e --no-transfer-progress -Pcoverall jacoco:report coveralls:report
fi
;;

Expand Down Expand Up @@ -84,27 +84,27 @@ checkstyle-regression)
checkout_from "https://github.com/checkstyle/checkstyle"
# update checkstyle_sevntu_checks.xml file in checkstyle for new modules
cd sevntu-checks
SEVNTU_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
SEVNTU_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo sevntu version:$SEVNTU_VERSION
ECLIPSE_CS_VERSION=$(mvn -e -q -Dexec.executable='echo' \
ECLIPSE_CS_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' \
-Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo eclipse-cs version:$ECLIPSE_CS_VERSION
mvn -e install -Pno-validations
mvn -e test -Dtest=CheckstyleRegressionTest#setupFiles -Dregression-path=../.ci-temp
mvn -e --no-transfer-progress install -Pno-validations
mvn -e --no-transfer-progress test -Dtest=CheckstyleRegressionTest#setupFiles -Dregression-path=../.ci-temp
cd ../
# execute checkstyle validation on updated config file
cd .ci-temp/checkstyle
mvn -e clean verify -e -DskipTests -DskipITs -Dpmd.skip=true -Dspotbugs.skip=true \
mvn -e --no-transfer-progress clean verify -DskipTests -DskipITs -Dpmd.skip=true -Dspotbugs.skip=true \
-Dfindbugs.skip=true -Djacoco.skip=true -Dxml.skip=true \
-Dmaven.sevntu-checkstyle-check.checkstyle.version=$ECLIPSE_CS_VERSION \
-Dmaven.sevntu.checkstyle.plugin.version=$SEVNTU_VERSION
;;

eclipse-analysis)
cd sevntu-checks
mvn -e clean compile exec:exec -Peclipse-compiler
mvn -e --no-transfer-progress clean compile exec:exec -Peclipse-compiler
rm org.eclipse.jdt.core.prefs
;;

Expand All @@ -118,7 +118,7 @@ sonarqube)
if [[ -z $SONAR_TOKEN ]]; then echo "SONAR_TOKEN is not set"; sleep 5s; exit 1; fi
export MAVEN_OPTS='-Xmx2000m'
cd sevntu-checks
mvn -e clean package sonar:sonar \
mvn -e --no-transfer-progress clean package sonar:sonar \
-Dsonar.organization=checkstyle \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=$SONAR_TOKEN \
Expand Down
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Expand Up @@ -8,4 +8,4 @@ java -classpath sevntu-checks-X.XX.X.jar;checkstyle-X.XX-all.jar com.puppycrawl.

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.
Issues that are not following the guidelines, will be processed with last priority.
16 changes: 8 additions & 8 deletions deploy.sh
Expand Up @@ -55,7 +55,7 @@ deployIdea()
{
echo "Deploying Idea"
cd $SEVNTU_DIR/sevntu-checkstyle-idea-extension/
mvn clean deploy -Plocal-deploy -DdeployDir=$GH_SEVNTU_HOMR_DIR
mvn -e --no-transfer-progress clean deploy -Plocal-deploy -DdeployDir=$GH_SEVNTU_HOMR_DIR
if [ "$?" != "0" ]
then
echo "build for $SEVNTU_DIR/sevntu-checkstyle-idea-extension/"
Expand All @@ -74,15 +74,15 @@ deployEclipse()
#echo -n "Enter version number: "
#read version
#mvn org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=$version -f eclipse-pom.xml
mvn clean install -f eclipse-pom.xml -Plocal-deploy
mvn -e --no-transfer-progress clean install -f eclipse-pom.xml -Plocal-deploy
if [ "$?" != "0" ]
then
echo "build for eclipse-pom.xml."
exit 1
fi

cd $SEVNTU_DIR/update-site
mvn wagon:upload -DdeployDir=$GH_SEVNTU_HOMR_DIR
mvn -e --no-transfer-progress wagon:upload -DdeployDir=$GH_SEVNTU_HOMR_DIR
cd $GH_SEVNTU_HOMR_DIR
echo "$manualDeploy"
return
Expand All @@ -97,7 +97,7 @@ deployMavenLibrary()
# for test build - it will override as we need to be sure that in repository,
# we have previous release version but compiled with from new code
cd $SEVNTU_DIR/sevntu-checks
mvn clean javadoc:javadoc deploy -Plocal-deploy -DdeployDir=$GH_SEVNTU_HOMR_DIR
mvn -e --no-transfer-progress clean javadoc:javadoc deploy -Plocal-deploy -DdeployDir=$GH_SEVNTU_HOMR_DIR
if [ "$?" != "0" ]
then
echo "build for $SEVNTU_DIR/sevntu-checks."
Expand All @@ -121,18 +121,18 @@ deployToMavenCentral()
# for test build - it will override as we need to be sure that in repository,
# we have previous release version but compiled with from new code
cd $SEVNTU_DIR/sevntu-checks
mvn clean deploy -DskipStaging=false -Pgpg
mvn -e --no-transfer-progress clean deploy -DskipStaging=false -Pgpg
if [ "$?" != "0" ]
then
echo "build for $SEVNTU_DIR/sevntu-checks."
exit 1
fi

cd $SEVNTU_DIR/sevntu-checkstyle-idea-extension/
mvn clean deploy -DskipStaging=false -Pgpg
mvn -e --no-transfer-progress clean deploy -DskipStaging=false -Pgpg

cd $SEVNTU_DIR/sevntu-checkstyle-sonar-plugin/
mvn clean deploy -DskipStaging=false -Pgpg
mvn -e --no-transfer-progress clean deploy -DskipStaging=false -Pgpg

return
}
Expand All @@ -141,7 +141,7 @@ deploySonar()
{
echo "Deploying Sonar"
cd $SEVNTU_DIR/sevntu-checkstyle-sonar-plugin/
mvn clean install wagon:upload-single -DdeployDir=$GH_SEVNTU_HOMR_DIR
mvn -e --no-transfer-progress clean install wagon:upload-single -DdeployDir=$GH_SEVNTU_HOMR_DIR
if [ "$?" != "0" ]
then
echo "build for $SEVNTU_DIR/sevntu-checkstyle-sonar-plugin/"
Expand Down
4 changes: 2 additions & 2 deletions pom-version-bump.sh
Expand Up @@ -39,7 +39,7 @@ do
mv $i.new $i
done

#additional version reference, eclipse file
# additional version reference, eclipse file
FILE=eclipsecs-sevntu-plugin-feature/feature.xml
echo "Updating: "$FILE
xmlstarlet ed --ps \
Expand All @@ -48,7 +48,7 @@ xmlstarlet ed --ps \
$FILE > $FILE.new
mv $FILE.new $FILE

#special, non xml file
# special, non xml file
FILE=eclipsecs-sevntu-plugin/META-INF/MANIFEST.MF
echo "Updating: "$FILE
sed -i "s/Bundle-Version: $OLD_VERSION/Bundle-Version: $NEW_VERSION/" $FILE
Expand Down
6 changes: 3 additions & 3 deletions release.sh
Expand Up @@ -51,7 +51,7 @@ git clean -f -d
git checkout origin/master

cd sevntu-checks
ECLIPSE_CS_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${checkstyle.eclipse-cs.version}' \
ECLIPSE_CS_VERSION=$(mvn -e --no-transfer-progress -q -Dexec.executable='echo' -Dexec.args='${checkstyle.eclipse-cs.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
cd ..

Expand Down Expand Up @@ -79,7 +79,7 @@ git clean -f -d
git checkout origin/master

cd releasenotes-builder
mvn package -DskipTests
mvn -e --no-transfer-progress package -DskipTests
cd target

java -jar releasenotes-builder-1.0-all.jar -localRepoPath $CURRENT_DIR -remoteRepoPath $GITHUB_PROJECT -startRef $OLD_VERSION -releaseNumber $NEW_VERSION -githubAuthToken $SEVNTU_GITHUB_TOKEN -generateXdoc -xdocTemplate $CURRENT_DIR/sevntu_xdoc_freemarker.template
Expand Down Expand Up @@ -107,7 +107,7 @@ git reset --hard HEAD
git clean -f -d
git checkout tags/$ECLIPSE_CS_VERSION.0

mvn clean install
mvn -e --no-transfer-progress clean install

# update versions in all files
echo "Bumping all versions from $OLD_VERSION to $NEW_VERSION"
Expand Down

0 comments on commit 86fe98a

Please sign in to comment.