Skip to content
Commits on Source (7)
......@@ -7,12 +7,12 @@ set -e
uname -a
mvn --version
mvn -e clean install -Pno-validations
mvn -B -e clean install -Pno-validations
git clone https://github.com/checkstyle/contribution && cd contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
sed -i.'' 's/#spring-framework/spring-framework/' projects-to-test-on.properties
sed -i.'' 's/#nbia-dcm4che-tools/nbia-dcm4che-tools/' projects-to-test-on.properties
sed -i.'' 's/#findbugs/findbugs/' projects-to-test-on.properties
sed -i.'' 's/#spotbugs/spotbugs/' projects-to-test-on.properties
sed -i.'' 's/#pmd/pmd/' projects-to-test-on.properties
sed -i.'' 's/#apache-ant/apache-ant/' projects-to-test-on.properties
./launch.sh -Dcheckstyle.config.location=checks-only-javadoc-error.xml
......
......@@ -14,22 +14,54 @@ ECJ_PATH=~/.m2/repository/$ECJ_MAVEN_VERSION/$ECJ_JAR
if [ ! -f $ECJ_PATH ]; then
echo "$ECJ_PATH is not found, downloading ..."
mkdir -p $(dirname "$ECJ_PATH")
wget http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/eclipse/downloads/drops4/$ECJ_MAVEN_VERSION/$ECJ_JAR -O $ECJ_PATH
ECLIPSE_URL="http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/eclipse/downloads/drops4"
wget $ECLIPSE_URL/$ECJ_MAVEN_VERSION/$ECJ_JAR -O $ECJ_PATH
fi
mkdir -p target/classes
mkdir -p target/eclipse
mkdir -p target/classes target/test-classes target/eclipse
RESULT_FILE=target/eclipse/report.txt
echo "Executing eclipse compiler, output is redirected to $RESULT_FILE..."
java -jar $ECJ_PATH -target 1.8 -source 1.8 -cp $1 \
-nowarn:[./target/generated-sources/antlr] -d target/eclipse-compile \
-enableJavadoc src/main/java src/test/java target/generated-sources/antlr -properties config/org.eclipse.jdt.core.prefs \
> $RESULT_FILE 2>&1 | true
echo "java -jar $ECJ_PATH -target 1.8 -source 1.8 -cp $1 ..."
echo "Checking for ERROR|WARNING|INFO in $RESULT_FILE ..."
if [[ $(grep -E "ERROR|WARNING|INFO" $RESULT_FILE | cat | wc -l) > 0 ]]; then
set +e
java -jar $ECJ_PATH -target 1.8 -source 1.8 -encoding UTF-8 -cp $1 \
-d target/eclipse-compile \
-properties config/org.eclipse.jdt.core.prefs \
-enableJavadoc \
-nowarn:[target/generated-sources/antlr] \
src/main/java \
target/generated-sources/antlr \
src/test/java \
src/it/java \
> $RESULT_FILE 2>&1
EXIT_CODE=$?
set -e
if [[ $EXIT_CODE != 0 ]]; then
echo "Content of $RESULT_FILE:"
cat $RESULT_FILE
false
else
# check compilation of resources, all WARN and INFO are ignored
set +e
java -jar $ECJ_PATH -target 1.8 -source 1.8 -cp $1 \
-d target/eclipse-compile \
-nowarn \
src/main/java \
src/test/java \
target/generated-sources/antlr \
src/test/resources \
src/it/resources \
> $RESULT_FILE 2>&1
EXIT_CODE=$?
set -e
if [[ $EXIT_CODE != 0 ]]; then
echo "Content of $RESULT_FILE:"
cat $RESULT_FILE
false
fi
fi
......@@ -7,7 +7,7 @@
# IDEA_PATH="/Applications/IntelliJ IDEA.app/Contents/MacOS/idea" ./.ci/idea_inspection.sh
#
# Example Linux:
# IDEA_PATH=/opt/idea-IC-171.4694.70/bin/idea.sh ./.ci/idea_inspection.sh
# export IDEA_PATH=$HOME/java/idea-IU-172.4574.11 && ./.ci/idea_inspection.sh
#################################################
PROJECT_DIR=$PWD/
......@@ -29,15 +29,14 @@ if [[ -z $IDEA_PATH ]]; then
fi
#Execute compilation of Checkstyle to generate all source files
mvn -e compile
mvn -e clean compile
mkdir -p $RESULTS_DIR
rm -rf $RESULTS_DIR/*
echo "Intellij Idea validation is about to start"
echo "Progress output will be flushed at end. Validation is in progress ..."
IDEA_OUTPUT=`exec "$IDEA_PATH" inspect $PROJECT_DIR $INSPECTIONS_PATH $RESULTS_DIR -$NOISE_LVL`
echo $IDEA_OUTPUT
IDEA_OUTPUT=`$IDEA_PATH/bin/inspect.sh $PROJECT_DIR $INSPECTIONS_PATH $RESULTS_DIR -$NOISE_LVL`
if [[ $IDEA_OUTPUT == "Already running" ]]; then
echo "It might be that Intellij Idea is running, please close it."
......
#!/usr/bin/perl
# This script takes null delimited files as input
# it drops paths that match the listed exclusions
# output is null delimited to match input
$/="\0";
my @excludes=qw(
(^|/)images/
^src/it/resources/
^src/test/resources/
^src/test/resources-noncompilable/
/messages.*_..\.properties$
/releasenotes_old\.xml$
/releasenotes\.xml$
/.*_..\.translation[^/]*$
);
my $exclude = join "|", @excludes;
while (<>) {
chomp;
next if m{$exclude};
print "$_$/";
}
#!/bin/sh
pkg=$1
if [ "$pkg" = "" -o ! -e "$pkg" ]; then
echo "no package supplied" 1>&2
exit 1
fi
leadsize=96
o=`expr $leadsize + 8`
set `od -j $o -N 8 -t u1 $pkg`
il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
# echo "sig il: $il dl: $dl"
sigsize=`expr 8 + 16 \* $il + $dl`
o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`
set `od -j $o -N 8 -t u1 $pkg`
il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
# echo "hdr il: $il dl: $dl"
hdrsize=`expr 8 + 16 \* $il + $dl`
o=`expr $o + $hdrsize`
EXTRACTOR="dd if=$pkg ibs=$o skip=1"
COMPRESSION=`($EXTRACTOR |file -) 2>/dev/null`
if echo $COMPRESSION |grep -q gzip; then
DECOMPRESSOR=gunzip
elif echo $COMPRESSION |grep -q bzip2; then
DECOMPRESSOR=bunzip2
elif echo $COMPRESSION |grep -iq xz; then # xz and XZ safe
DECOMPRESSOR=unxz
elif echo $COMPRESSION |grep -q cpio; then
DECOMPRESSOR=cat
else
# Most versions of file don't support LZMA, therefore we assume
# anything not detected is LZMA
DECOMPRESSOR=`which unlzma 2>/dev/null`
case "$DECOMPRESSOR" in
/* ) ;;
* ) DECOMPRESSOR=`which lzmash 2>/dev/null`
case "$DECOMPRESSOR" in
/* ) DECOMPRESSOR="lzmash -d -c" ;;
* ) DECOMPRESSOR=cat ;;
esac
;;
esac
fi
$EXTRACTOR 2>/dev/null | $DECOMPRESSOR
aaaa
aaaaaa
Aapt
aar
aarch
abbreviationaswordinname
abcun
abego
abstractcheck
abstractclassname
abstractjavadoc
abstracttypeaware
ABx
Acceptabletokens
Acheckstyle
acm
Aconfig
adb
addons
adf
adr
AFDF
AFilter
aggregators
Agoogle
Aleksey
allchecks
allclasses
alot
ambig
Amessages
androidx
ANNOS
annotationlocation
annotationonsameline
annotationusestyle
anoninner
anoninnerlength
antfile
antlib
antlr
ANTLRv
Antrl
antrun
anttask
Aop
api
apidocs
apirefs
apogeum
apos
applet
appveyor
APRV
areaoftest
arget
argn
Arity
Arquillian
arraycopy
arraylist
arraytrailingcomma
arraytypestyle
asda
ASF
ASingle
Aspectj
Asrc
assertj
ASTNo
asttreestringprinter
Asun
atclause
atclauseorder
ATest
AThis
atid
ation
atlassian
attlist
attr
autoboxing
autocrlf
Autoproxy
Autowire
Autowired
Autowiring
avax
avgt
avoidescapedunicodecharacters
avoidinlineconditionals
avoidnestedblocks
avoidstarimport
avoidstaticimport
awt
backend
backport
Backquote
Backticks
BADN
badpackage
baratali
Barowski
basedir
basefont
basetag
baz
bbb
BBBB
bc
BCA
bcff
BClass
bdc
bdo
beanutils
Bechter
beforeexecutionexclusionfilefilter
bestpractices
bew
bfd
bintray
bitbucket
bitset
bjrke
blablabla
bleh
Blic
blockandinlinetags
blockcommentposition
blockcommentstyle
blockquote
blog
blogspot
bluej
bluejcheckstyle
BNOT
Bolkensteyn
booleanexpressioncomplexity
bothfiles
bountysource
Bpmn
bracesareused
breadcrumbs
bsr
Bsubscribe
BTest
buf
bugdatabase
bugfixes
Bunsubscribe
bunzip
bw
BXOR
bykey
Bytecode
bzip
Cacheable
cachefile
callstack
camelcase
casegroup
catchparametername
cba
cbc
cbeaff
ccc
CCCC
CClass
ccomment
CDATA
cde
cdfd
Cdi
Cfg
Cfml
Cfoo
cfz
cgi
charset
CHDBACBF
CHDBEFIF
CHDCBAHA
CHDCDBGG
CHDCEAHH
CHDCFJDG
CHDCHAHD
CHDCHBAE
CHDDCDHH
CHDDIECH
CHDDIEDI
CHDFHHBB
CHDGBICD
CHDGHIDG
CHDGJCHC
CHDHDECF
CHDHGJGD
CHDHJECF
CHDJBFDB
checkchmod
checkconfig
checkouting
checkstyle
checkstyleanttask
checkstylecompilation
checkutil
chmod
chr
ci
cidfile
circleci
Claira
classdataabstractioncoupling
classfanoutcomplexity
classloader
classname
classpath
classpathref
classtypeparametername
clazz
clemens
Clickable
Clientjunk
clirr
Cloneable
clp
clss
cmdline
CMP
cmt
CNAME
Cnt
cobertura
codacy
codeanalyzers
codeclimate
codeconv
codeconventions
codeconvtoc
codecov
codehaus
codeselectorpresentation
codeship
codestyle
colgroup
columnlimit
Combobox
commentsindentation
commerical
Compat
Compiletime
Comspace
Concat
config
configurationloader
Connell's
constantname
Contextualizable
contextualization
contextualized
Contextualizing
courtlink
courtlinkkk
covariantequals
COVEREDRATIO
cpio
cpp
crlf
cron
crossplatform
CSOFF
CSON
css
CStyle
csv
ctor
ctx
customimportorder
cvs
cyclomatic
cyclomaticcomplexity
cz
daaf
dalvik
Daniil
daniilyar
Darguments
Datasource
davidwalsh
Dcheckstyle
dcm
DDDD
Ddry
declarationorder
DECOMPRESSOR
ded
defau
defaultcasepresent
defaultcomeslast
delims
DENORMALIZER
Depedency
Deque
DEREF
descendanttoken
descr
Deserializable
designforextension
DEST
destfile
Destructuring
detailast
detailnodetreestringprinter
Dexec
dfn
Dfoo
Dforbiddenapis
Dgpg
Dgui
Diachenko
dirname
distelli
Djacoco
Dlinkcheck
DMail
Dmaven
doccheck
Dockter
doclet
DOCTYPE
Don''t
donotignoreexceptions
Dorekit
DOTALL
doubletag
Dpi
Dpmd
Dpuppycrawl
dropdown
drydock
Dskip
dsm
Dsonar
Dspotbugs
Dstrict
Dtest
Dubinin
Duser
Dxml
Dxwiki
eb
ecj
eclemma
eclipsecommunityawards
ected
edb
edef
edf
edu
efnforce
ej
ejb
elasticsearch
elementdef
elif
elist
Ellipsize
emacs
emptyblock
emptycatchblock
emptyforinitializerpad
emptyforiteratorpad
emptylineseparator
emptystatement
emptytag
Emtpy
endeavours
endline
ent
enum
enumer
envvar
eol
eot
equalsavoidnull
equalshashcode
equalsverifier
erial
errorprone
esac
Eslint
esslingen
etsy
ev
Evt
Exceptiontest
executablestatementcount
executon
Exif
explicitinitialization
expr
Externalizable
faa
fallsthrough
fallthrough
fallthru
Fannotation
favicon
Fblocks
Fchecks
Fcheckstyle
fchurn
Fcoding
Fcom
fd
FDCB
FDCF
Fdesign
FDF
featuretested
FEF
ffd
fff
FFFD
FFFE
FFFF
Fheader
fht
fieldset
filebasic
filechooser
filefilters
filelength
filepath
fileset
filesetcheck
filestructure
filesystem
filetab
filetabcharacter
filetext
Fimports
finalclass
finalizer
finallocalvariable
finalparameters
findbugs
Findentation
firefox
firstsentence
FIXME
Fjava
Fjavadoc
Flas
flattr
flowtested
Flushables
Fmain
Fmetrics
Fmodifier
Fnaming
forbiddenapis
foreach
Fpuppycrawl
fq
fqn
freedomsponsors
Fregexp
Fresources
Frob
fsc
Fsizes
Ftl
Ftools
ftp
ftpclient
fullident
fullname
func
Fwhitespace
Fx
gav
generalform
genericwhitespace
Getenv
gg
gh
ghprb
gitattributes
github
githubusercontent
gitignore
Gjs
google
googleapis
googleblog
googleecommon
googlegroups
googlesource
govstrangefolder
gplus
gradle
gradlew
Grenner
grep
grepped
grp
Gsp
GString
Gtk
gui
gunzip
gwt
gx
gz
gzip
hadoop
hamcrest
Haml
Hardcoded
hashcode
hashset
hashtable
hbase
hcoles
hdr
hdrsize
Headerjava
Hejl
herokuapp
HEXDIGIT
hh
hiddenfield
hideutilityclassconstructor
hipparchus
hne
Homepage
horizontalwhitespace
Hostname
href
htag
htdocs
html
HTMLJS
htmlunit
http
hurz
iae
ibs
ico
identificator
identifiernames
Idref
idx
Igno
IGNORETHIS
igorminar
IInterfacable
Ilja
illegalcatch
illegalimport
illegalinstantiation
illegalthrows
illegaltoken
illegaltokentext
illegaltype
Imag
Ime
img
iml
impl
importcontrol
importcontrolloader
importcontroltest
importorder
importrule
imprt
Incompatabilities
Inet
infinispan
initialiser
Inlined
inlining
innerassignment
Innerclass
INNERR
innertypelast
Inpection
instanceof
Intelli
intellij
intercell
interfaceistype
interfacememberimpliedmodifier
interfacetypeparametername
invalidformat
invalidinherit
ioe
ioffset
IPv
isindex
isrutf
isset
issuecomment
itemvalue
ith
itr
ivanov
ivanovjr
iws
Izmailov
jacoco
Jakub
jarchitect
javac
javadoc
javadocdetailnodeparser
javadocmethod
javadocpackage
javadocparagraph
javadocpropertiesgenerator
javadocstyle
javadoctagcontinuationindentation
javadoctags
javadoctype
javadocvariable
Javaee
javaguide
javall
javamail
javancss
javaparser
javarevisited
javascript
javase
javastrangefolder
javax
Jax
jayway
JB
JBoss
JButton
JCheck
JCombo
JComponent
jcp
jdbc
JDE
jdee
jdepend
jdk
jdt
jedit
jenkins
Jenkinsfile
jetbrains
JFile
JFrame
jgit
jgrasp
jguru
jira
jjva
jkl
JLabel
Jlo
jls
JNDI
JOption
jp
Jpa
JPanel
Jpdl
jpeg
jpf
jpg
jprofiler
jq
jqno
jquery
jre
JScroll
Jscs
jsecurity
Jsf
jshiell
JSJ
jslint
jsni
json
jsoref
jsp
JSplit
jsr
JTable
JText
JToggle
JTool
jtree
junit
jvm
jxr
kailasam
kazgroup
kbd
kclee
KDoc
keygen
konstantinos
Kordas
Kotlin
kused
lambdaparametername
lbc
LBRACK
lbt
lcurly
leadsize
Leanback
leftcurly
len
lexer
lgpl
lharris
LHSOf
libcore
liberapay
libexec
lifecycle
linebreak
linecolumn
linelength
linkcheck
linkplain
linksource
linux
Lisetskii
lkuehne
llll
lmessage
LNOT
localctx
localfinalvariablename
localhost
localvariablename
Loggable
lombok
Loughran
lparen
lpb
lpl
lucene
lui
luiframework
LVL
LZMA
lzmash
madbean
magicnumber
mailhost
mailto
mainframemodel
marazmatic
Massol
mavenbadge
maxmethods
MCHECKSTYLE
mct
membername
MENFORCER
metadata
Metaspace
methodcount
methodlength
methodname
methodparampad
methodtypeparametername
MEZk
Micha
Microsoft
minimalistic
Mipmap
misconfigured
Misordered
missingctor
missingdeprecated
missingoverride
missingswitchdefault
missingtag
Mixin
mkdir
mkordas
MLINKCHECK
mockfile
mockito
modifiedcontrolvariable
modifierorder
Mohnen
mojohaus
moks
moradan
moz
MRELEASE
MSITE
MSONAR
mstudman
MTAGLIST
multicharacter
multiline
Multimap
multiplestringliterals
multiplevariabledeclarations
Multiset
multithreading
mutableexception
MVC
mvn
Mycheckstyle
mycompany
mycompanychecks
mycustom
myfile
myfolder
myformat
MYN
myname
mypackage
myproject
Mysql
mytag
n'th
NAMEFILE
nameofcompany
nameofdivision
nameofproject
namespace
Nanos
nbactions
nbia
nbsp
ncss
ndex
needbraces
Nejmeh
NEQ
nestedfordepth
nestedifdepth
nestedtrydepth
netbeans
newdomain
newlineatendoffile
Nfc
Nfo
Niederhauser
nio
nlow
NMTOKEN
noarch
noarg
noauto
nobr
noclone
nocstylearray
nodeps
NODESET
noembed
noerr
nofinalizer
NOI
noinfo
noinspection
nolinewrap
nonascii
noncompilable
nonconstantfieldnames
nondex
nonemptyatclausedescription
nonemptyblocks
NONGROUP
NONJAVA
nonjavadoc
nonnull
nonvalidating
noparentfile
noscript
nospace
Nothin
notjava
NOTNULL
nowarn
nowhitespaceafter
nowhitespacebefore
nowildcard
nowrap
npath
npathcomplexity
npe
nts
nullanalysis
NULLCHECK
nullness
numericliterals
nutsandbolts
nyu
objblock
oburn
ogg
olddomain
ololo
olympe
onestatement
onestatementperline
onetoplevel
onetoplevelclass
onevariableperline
oo
OOL
opencollective
openjdk
operatorwrap
optgroup
optimisation
Optimizable
oraclejdk
orderingandspacing
orekit
Orgorgan
orm
Osgi
oss
osx
outertypefilename
outertypenumber
outter
ove
overloadmethodsdeclarationorder
overloadsplit
overridable
Overriden
OVERRIDERS
packageannotation
packagedeclaration
packagediffdirectory
packageinfo
packagename
packagenamesloader
packageobjectfactory
packagestate
packge
packifc
packpub
Pageflow
pageview
Papaioannou
paraception
parameterassignment
parametername
parameternumber
paramnum
Parcelable
parenpad
parrt
parsetreetablepresentation
Passembly
pathcomplexity
pathelement
Paulicke
paypal
pdf
Peclipse
perl
pex
pgjdbc
Pgpg
pguyot
php
pid
pitest
pitesttyle
pkga
pkghtml
pkginfo
pkx
plugin
pmd
pmdruleset
PModel
png
Pno
Pointcut
pojo
Popup
Postgresql
powermock
Ppitest
prameterless
prebuilts
preformatted
printf
println
priva
programpractice
Proguard
propertycachefile
propertyfile
prot
PROTECTE
protonpack
pubconstr
pubifc
PUBLI
pubpub
puppycrawl
pw
pwd
px
py
qa
qalab
qaplug
Qube
qux
qw
qwe
qwerty
rawtypes
rb
RBRACK
rcurly
rdiachenko
RDz
README
Readonly
rebasing
redundantimport
redundantmodifier
refactored
refactoring
refid
regex
regexp
regexpheader
regexpmultiline
regexponfilename
regexpsingleline
regexpsinglelinejava
relativized
releasenotes
requirethis
Rethrown
returncount
revwalk
rfe
rga
Rgb
rhs
RHSOf
rickgiles
rightcurly
rl
rnveach
romani
romanivanov
Rootsmorejunk
rp
rparen
rpmfind
rq
Rrequired
Rrridden
RRRR
RSPEC
rss
rtc
Rtl
ru
ruleset
Ruslan
rw
sabaka
Sameline
sbe
sbt
scache
Schneeberger
scm
scp
screenshot
Scss
sdk
selfexplanatory
Selkin
separatorwrap
servlet
SETPOINT
sevntu
sflogo
shengchen
Shiell
Shipil
shipilev
sickboy
sigsize
Simplifiable
simplifybooleanexpression
simplifybooleanreturn
singleline
singlelined
singlelinejavadoc
singlespaceseparator
sivakumar
Slawinski
slf
slist
Sms
smth
snyk
solr
som
someinner
somename
someoneelse
sonarcloud
sonarjava
sonarqube
sonarsource
sonatype
Sopov
sourcefile
sourceforce
sourceforge
sourcepath
sourcesets
spacebar
specialescape
spellchecker
spliterator
spotbugs
spotbugsreports
spotify
springframework
sqale
sqe
sql
src
ssh
ssl
stackexchange
stackoverflow
stackoverflowerror
Stacktrace
standalone
staticvariablename
Stdlib
stdout
stefanbirkner
stemp
stevewall
sthref
stmt
streamapi
strictfp
stringliteralequality
Studman
Styleable
styleguide
stylesheets
subdir
subelements
subext
subscope
sudo
suitebuilder
sukhodolsky
summaryjavadoc
superclasses
superclone
superfinalize
Superinterface
supertype
suppressioncommentfilter
suppressionfilter
suppressionsloader
suppressionsstringprinter
suppressionxpathfilter
suppresswarnings
suppresswarningsfilter
suppresswarningsholder
suppresswithnearbycommentfilter
suppresswithplaintextcommentfilter
svg
svn
sxpath
sysprop
systemout
systemtests
Taglib
taglist
taskdef
tbody
tcr
td
teamcity
technetwork
technotes
tected
Testik
testmodules
TEXCEPTION
textlevel
Tfo
tfoot
thead
thesummaryfragment
thetaphi
throwable
throwscount
Thymeleaf
tmp
toc
todo
todocomment
tok
tokenizer
tokenks
tokennizer
tokentype
tolist
Toolbar
Touchscreen
trailingcomment
treelayout
treewalker
TRequest
tschneeberger
tstamp
tt
ttf
ttype
tw
typecastparenpad
typename
typeof
typevariablenames
uber
Ubuntu
ucc
UElement
ufeff
ul
UMD
UML
uname
uncomment
uncommentedmain
Unconstructable
unicode
Uninstantiable
uniq
uniqueproperties
Unitless
unlzma
unnecessaryparentheses
Unproxyable
unregister
unsubscribe
unusedimports
unxz
uppercased
upperell
upsss
uri
url
userguide
username
usr
UTests
utf
UUID
UWF
Validator
VALUEEEE
vararg
variabledeclarationusagedistance
variabledistance
Veach
versioning
verticalwhitespace
Vetrenko
Veyor
Vfs
viewcvs
visibilitymodifier
visualstudio
VK
Vladislav
Vladlis
vm
vscode
Vtl
Wadl
Wakelock
Warni
wbr
Weakento
Webflow
Weblogic
Webp
website
webtoolkit
Wellformedness
wercker
wget
wheretobreak
whi
Whitebox
whitelist
whitespaceafter
whitespacearound
Wifi
wiki
wikipedia
wiktionary
woff
wontfix
wordpress
workaround
workflows
writetag
writingchecks
writingdoccomments
writingfilefilters
writingfilters
writingjavadocchecks
writinglisteners
Wsdl
www
Xandy
xargs
xcode
xcommons
xdoc
xdocspagetitle
xerces
xf
xfeff
xfff
xfffa
xfffb
xffff
xffffffff
xffffffffffffffff
xg
Xhenseval
XHTML
xml
xmlcatalog
XMLHTTP
xmllogger
xmlns
xmlp
xmlstarlet
xmlvalidate
Xms
Xmx
xpath
xpathfilegeneratorauditlistener
xpathfilter
xpathmapper
xpathquerygenerator
xsd
Xshow
xsi
xsl
Xslt
xsltproc
XSO
Xss
xterm
xtr
xwiki
XXXX
XXXXXX
xxxxxxxxxx
XXXXXXXXXXXXXXXXXXXXXXXXXXXX
xy
XYzz
xz
xzvf
Yaml
Yaroslavtsev
yml
youtrack
Youtube
Yoyodyne
yyyy
Yzz
zf
zh
#!/bin/bash
# Attention, there is no "-x" to avoid problems on Wercker
set -e
###############################
function checkPitestReport() {
ignored=("$@")
fail=0
SEARCH_REGEXP="(span class='survived'|class='uncovered'><pre>)"
grep -irE "$SEARCH_REGEXP" target/pit-reports \
| sed -E 's/.*\/([A-Za-z]+.java.html)/\1/' | sort > target/actual.txt
printf "%s\n" "${ignored[@]}" | sed '/^$/d' > target/ignored.txt
if [ "$(diff --unified target/ignored.txt target/actual.txt)" != "" ] ; then
fail=1
echo "Actual:" ;
grep -irE "$SEARCH_REGEXP" target/pit-reports \
| sed -E 's/.*\/([A-Za-z]+.java.html)/\1/' | sort
echo "Ignore:" ;
printf '%s\n' "${ignored[@]}"
echo "Diff:"
diff --unified target/ignored.txt target/actual.txt | cat
fi;
if [ "$fail" -ne "0" ]; then
echo "Difference between 'Actual' and 'Ignore' lists is detected, lists should be equal."
echo "build will be failed."
fi
sleep 5s
exit $fail
}
###############################
case $1 in
pitest-annotation|pitest-design|pitest-header|pitest-imports \
|pitest-metrics|pitest-misc|pitest-modifier|pitest-naming \
|pitest-regexp|pitest-sizes|pitest-whitespace|pitest-ant \
|pitest-api|pitest-common|pitest-filters|pitest-main \
|pitest-packagenamesloader|pitest-tree-walker|pitest-utils \
|pitest-xpath)
mvn -e -P$1 clean test org.pitest:pitest-maven:mutationCoverage;
declare -a ignoredItems=();
checkPitestReport "${ignoredItems[@]}"
;;
pitest-blocks)
mvn -e -P$1 clean test org.pitest:pitest-maven:mutationCoverage;
declare -a ignoredItems=(
"LeftCurlyCheck.java.html:<td class='covered'><pre><span class='survived'> &#38;&#38; annotation.getNextSibling().getType() == TokenTypes.ANNOTATION) {</span></pre></td></tr>"
"LeftCurlyCheck.java.html:<td class='covered'><pre><span class='survived'> &#38;&#38; previousAnnotation.getPreviousSibling().getLineNo()</span></pre></td></tr>"
"LeftCurlyCheck.java.html:<td class='covered'><pre><span class='survived'> if (tokenAfterLast.getLineNo() &#62; lastAnnotation.getLineNo()) {</span></pre></td></tr>"
"LeftCurlyCheck.java.html:<td class='covered'><pre><span class='survived'> return previousAnnotation;</span></pre></td></tr>"
"LeftCurlyCheck.java.html:<td class='covered'><pre><span class='survived'> while (previousAnnotation.getPreviousSibling() != null</span></pre></td></tr>"
);
checkPitestReport "${ignoredItems[@]}"
;;
pitest-coding)
mvn -e -P$1 clean test org.pitest:pitest-maven:mutationCoverage;
declare -a ignoredItems=(
"EqualsAvoidNullCheck.java.html:<td class='covered'><pre><span class='survived'> &#38;&#38; field.getColumnNo() + minimumSymbolsBetween &#60;= objCalledOn.getColumnNo()) {</span></pre></td></tr>"
"HiddenFieldCheck.java.html:<td class='covered'><pre><span class='survived'> processVariable(ast);</span></pre></td></tr>"
"IllegalInstantiationCheck.java.html:<td class='covered'><pre><span class='survived'> classNames.clear();</span></pre></td></tr>"
"IllegalInstantiationCheck.java.html:<td class='covered'><pre><span class='survived'> imports.clear();</span></pre></td></tr>"
"IllegalInstantiationCheck.java.html:<td class='covered'><pre><span class='survived'> instantiations.clear();</span></pre></td></tr>"
"IllegalInstantiationCheck.java.html:<td class='covered'><pre><span class='survived'> processClassDef(ast);</span></pre></td></tr>"
"IllegalTypeCheck.java.html:<td class='covered'><pre><span class='survived'> while (toVisit != null) {</span></pre></td></tr>"
"MultipleVariableDeclarationsCheck.java.html:<td class='covered'><pre><span class='survived'> &#38;&#38; newNode.getColumnNo() &#62; currentNode.getColumnNo()) {</span></pre></td></tr>"
"MultipleVariableDeclarationsCheck.java.html:<td class='covered'><pre><span class='survived'> if (newNode.getLineNo() &#62; currentNode.getLineNo()</span></pre></td></tr>"
"MultipleVariableDeclarationsCheck.java.html:<td class='covered'><pre><span class='survived'> || newNode.getLineNo() == currentNode.getLineNo()</span></pre></td></tr>"
"RequireThisCheck.java.html:<td class='covered'><pre><span class='survived'> &#38;&#38; ast1.getColumnNo() &#60; ast2.getColumnNo()) {</span></pre></td></tr>"
"RequireThisCheck.java.html:<td class='covered'><pre><span class='survived'> current.clear();</span></pre></td></tr>"
"RequireThisCheck.java.html:<td class='covered'><pre><span class='survived'> final boolean methodNameInMethodCall = parentType == TokenTypes.DOT</span></pre></td></tr>"
"UnnecessaryParenthesesCheck.java.html:<td class='covered'><pre><span class='survived'> if (type != TokenTypes.ASSIGN</span></pre></td></tr>"
"VariableDeclarationUsageDistanceCheck.java.html:<td class='covered'><pre><span class='survived'> &#38;&#38; currentNode.getType() == TokenTypes.LITERAL_CATCH) {</span></pre></td></tr>"
"VariableDeclarationUsageDistanceCheck.java.html:<td class='covered'><pre><span class='survived'> if (currentNode.getType() == TokenTypes.LITERAL_IF) {</span></pre></td></tr>"
"VariableDeclarationUsageDistanceCheck.java.html:<td class='covered'><pre><span class='survived'> if (elseBlock.getType() == TokenTypes.LITERAL_ELSE) {</span></pre></td></tr>"
"VariableDeclarationUsageDistanceCheck.java.html:<td class='covered'><pre><span class='survived'> if (!isVarInOperatorDeclaration &#38;&#38; operator.getType() == TokenTypes.LITERAL_IF) {</span></pre></td></tr>"
"VariableDeclarationUsageDistanceCheck.java.html:<td class='covered'><pre><span class='survived'> while (currentNode != null</span></pre></td></tr>"
);
checkPitestReport "${ignoredItems[@]}"
;;
pitest-indentation)
mvn -e -P$1 clean test org.pitest:pitest-maven:mutationCoverage;
declare -a ignoredItems=(
"AbstractExpressionHandler.java.html:<td class='covered'><pre><span class='survived'> if (colNum == null || thisLineColumn &#60; colNum) {</span></pre></td></tr>"
"AbstractExpressionHandler.java.html:<td class='covered'><pre><span class='survived'> if (currLine &#60; realStart) {</span></pre></td></tr>"
"AbstractExpressionHandler.java.html:<td class='covered'><pre><span class='survived'> if (toTest.getColumnNo() &#60; first.getColumnNo()) {</span></pre></td></tr>"
"ArrayInitHandler.java.html:<td class='covered'><pre><span class='survived'> if (firstChildPos &#62;= 0) {</span></pre></td></tr>"
"BlockParentHandler.java.html:<td class='covered'><pre><span class='survived'> level.addAcceptedIndent(level.getFirstIndentLevel() + getLineWrappingIndent());</span></pre></td></tr>"
"BlockParentHandler.java.html:<td class='covered'><pre><span class='survived'> return getIndentCheck().getLineWrappingIndentation();</span></pre></td></tr>"
"CommentsIndentationCheck.java.html:<td class='covered'><pre><span class='survived'> &#38;&#38; root.getFirstChild().getFirstChild().getFirstChild().getNextSibling() != null;</span></pre></td></tr>"
"CommentsIndentationCheck.java.html:<td class='covered'><pre><span class='survived'> distanceAim += nextToken.getLastChild().getLineNo() - nextToken.getLineNo();</span></pre></td></tr>"
"CommentsIndentationCheck.java.html:<td class='covered'><pre><span class='survived'> if (comment.getColumnNo() &#60; nextStmt.getColumnNo()) {</span></pre></td></tr>"
"CommentsIndentationCheck.java.html:<td class='covered'><pre><span class='survived'> if (comment.getType() == TokenTypes.SINGLE_LINE_COMMENT) {</span></pre></td></tr>"
"CommentsIndentationCheck.java.html:<td class='covered'><pre><span class='survived'> if (isUsingOfObjectReferenceToInvokeMethod(blockBody)) {</span></pre></td></tr>"
"CommentsIndentationCheck.java.html:<td class='covered'><pre><span class='survived'> if (isUsingOfObjectReferenceToInvokeMethod(root)) {</span></pre></td></tr>"
"CommentsIndentationCheck.java.html:<td class='covered'><pre><span class='survived'> if (nextToken.getType() == TokenTypes.BLOCK_COMMENT_BEGIN) {</span></pre></td></tr>"
"CommentsIndentationCheck.java.html:<td class='covered'><pre><span class='survived'> if (root.getFirstChild().getType() == TokenTypes.LITERAL_NEW) {</span></pre></td></tr>"
"CommentsIndentationCheck.java.html:<td class='covered'><pre><span class='survived'> if (root.getLineNo() &#62;= comment.getLineNo()) {</span></pre></td></tr>"
"CommentsIndentationCheck.java.html:<td class='covered'><pre><span class='survived'> || previousSibling.getType() == TokenTypes.ANNOTATION_DEF;</span></pre></td></tr>"
"CommentsIndentationCheck.java.html:<td class='covered'><pre><span class='survived'> || previousSibling.getType() == TokenTypes.CLASS_DEF</span></pre></td></tr>"
"CommentsIndentationCheck.java.html:<td class='covered'><pre><span class='survived'> || previousSibling.getType() == TokenTypes.INTERFACE_DEF</span></pre></td></tr>"
"CommentsIndentationCheck.java.html:<td class='covered'><pre><span class='survived'> return root.getFirstChild().getFirstChild().getFirstChild() != null</span></pre></td></tr>"
"ElseHandler.java.html:<td class='covered'><pre><span class='survived'> return getMainAst().getFirstChild();</span></pre></td></tr>"
"ElseHandler.java.html:<td class='covered'><pre><span class='survived'> super.checkTopLevelToken();</span></pre></td></tr>"
"ForHandler.java.html:<td class='covered'><pre><span class='survived'> checkExpressionSubtree(forEach, expected, false, false);</span></pre></td></tr>"
"ForHandler.java.html:<td class='covered'><pre><span class='survived'> checkWrappingIndentation(getMainAst(), getForLoopRightParen(getMainAst()));</span></pre></td></tr>"
"HandlerFactory.java.html:<td class='covered'><pre><span class='survived'> createdHandlers.clear();</span></pre></td></tr>"
"HandlerFactory.java.html:<td class='covered'><pre><span class='survived'> register(TokenTypes.INDEX_OP, IndexHandler.class);</span></pre></td></tr>"
"IndentationCheck.java.html:<td class='covered'><pre><span class='survived'> handlerFactory.clearCreatedHandlers();</span></pre></td></tr>"
"IndentationCheck.java.html:<td class='covered'><pre><span class='survived'> handlers.clear();</span></pre></td></tr>"
"IndentationCheck.java.html:<td class='covered'><pre><span class='survived'> primordialHandler.checkIndentation();</span></pre></td></tr>"
"IndentLevel.java.html:<td class='covered'><pre><span class='survived'> for (int i = levels.nextSetBit(0); i &#62;= 0;</span></pre></td></tr>"
"MethodDefHandler.java.html:<td class='covered'><pre><span class='survived'> if (node.getLineNo() &#60; lineStart) {</span></pre></td></tr>"
"MethodDefHandler.java.html:<td class='covered'><pre><span class='survived'> if (node.getType() == TokenTypes.ANNOTATION) {</span></pre></td></tr>"
"NewHandler.java.html:<td class='covered'><pre><span class='survived'> checkExpressionSubtree(type, getIndent(), false, false);</span></pre></td></tr>"
"NewHandler.java.html:<td class='covered'><pre><span class='survived'> checkLeftParen(lparen);</span></pre></td></tr>"
"NewHandler.java.html:<td class='covered'><pre><span class='survived'> return false;</span></pre></td></tr>"
"PackageDefHandler.java.html:<td class='covered'><pre><span class='survived'> checkWrappingIndentation(getMainAst(), semi);</span></pre></td></tr>"
"SwitchHandler.java.html:<td class='covered'><pre><span class='survived'> checkExpressionSubtree(</span></pre></td></tr>"
"SwitchHandler.java.html:<td class='covered'><pre><span class='survived'> checkSwitchExpr();</span></pre></td></tr>"
"SynchronizedHandler.java.html:<td class='covered'><pre><span class='survived'> checkExpressionSubtree(syncAst, expected, false, false);</span></pre></td></tr>"
"SynchronizedHandler.java.html:<td class='covered'><pre><span class='survived'> checkSynchronizedExpr();</span></pre></td></tr>"
"SynchronizedHandler.java.html:<td class='covered'><pre><span class='survived'> checkWrappingIndentation(getMainAst(),</span></pre></td></tr>"
"SynchronizedHandler.java.html:<td class='covered'><pre><span class='survived'> super.checkIndentation();</span></pre></td></tr>"
"TryHandler.java.html:<td class='covered'><pre><span class='survived'> checkTryResParen(getTryResLparen(), &#34;lparen&#34;);</span></pre></td></tr>"
);
checkPitestReport "${ignoredItems[@]}"
;;
pitest-javadoc)
mvn -e -P$1 clean test org.pitest:pitest-maven:mutationCoverage;
declare -a ignoredItems=(
"AbstractJavadocCheck.java.html:<td class='covered'><pre><span class='survived'> Arrays.sort(acceptableJavadocTokens);</span></pre></td></tr>"
"AbstractJavadocCheck.java.html:<td class='covered'><pre><span class='survived'> Arrays.sort(defaultJavadocTokens);</span></pre></td></tr>"
"AbstractJavadocCheck.java.html:<td class='covered'><pre><span class='survived'> beginJavadocTree(root);</span></pre></td></tr>"
"AbstractJavadocCheck.java.html:<td class='covered'><pre><span class='survived'> finishJavadocTree(root);</span></pre></td></tr>"
"AbstractJavadocCheck.java.html:<td class='covered'><pre><span class='survived'> javadocTokens.clear();</span></pre></td></tr>"
"AbstractJavadocCheck.java.html:<td class='covered'><pre><span class='survived'> TREE_CACHE.get().clear();</span></pre></td></tr>"
"AbstractJavadocCheck.java.html:<td class='covered'><pre><span class='survived'> TREE_CACHE.get().clear();</span></pre></td></tr>"
"AbstractTypeAwareCheck.java.html:<td class='covered'><pre><span class='survived'> if (!currentClassName.isEmpty()) {</span></pre></td></tr>"
"AbstractTypeAwareCheck.java.html:<td class='covered'><pre><span class='survived'> if (dotIdx == -1) {</span></pre></td></tr>"
"AbstractTypeAwareCheck.java.html:<td class='covered'><pre><span class='survived'> imports.clear();</span></pre></td></tr>"
"AbstractTypeAwareCheck.java.html:<td class='covered'><pre><span class='survived'> typeParams.clear();</span></pre></td></tr>"
"JavadocMethodCheck.java.html:<td class='covered'><pre><span class='survived'> final int col = noargMultilineStart.start(1) - 1;</span></pre></td></tr>"
"JavadocMethodCheck.java.html:<td class='covered'><pre><span class='survived'> return (ast.getType() == TokenTypes.METHOD_DEF || ast.getType() == TokenTypes.CTOR_DEF)</span></pre></td></tr>"
"JavadocMethodCheck.java.html:<td class='covered'><pre><span class='survived'> return true;</span></pre></td></tr>"
"JavadocMethodCheck.java.html:<td class='covered'><pre><span class='survived'> while (remIndex &#60; lines.length) {</span></pre></td></tr>"
"JavadocMethodCheck.java.html:<td class='covered'><pre><span class='survived'> while (remIndex &#60; lines.length) {</span></pre></td></tr>"
"JavadocPackageCheck.java.html:<td class='covered'><pre><span class='survived'> directoriesChecked.clear();</span></pre></td></tr>"
"JavadocPackageCheck.java.html:<td class='covered'><pre><span class='survived'> setFileExtensions(&#34;java&#34;);</span></pre></td></tr>"
"JavadocPackageCheck.java.html:<td class='covered'><pre><span class='survived'> super.beginProcessing(charset);</span></pre></td></tr>"
"JavadocParagraphCheck.java.html:<td class='covered'><pre><span class='survived'> if (nextNode.getType() == JavadocTokenTypes.TEXT</span></pre></td></tr>"
"JavadocParagraphCheck.java.html:<td class='covered'><pre><span class='survived'> || nextNode.getType() == JavadocTokenTypes.HTML_ELEMENT) {</span></pre></td></tr>"
"JavadocStyleCheck.java.html:<td class='covered'><pre><span class='survived'> &#38;&#38; builder.charAt(index - 1) == &#39;*&#39;) {</span></pre></td></tr>"
"JavadocStyleCheck.java.html:<td class='covered'><pre><span class='survived'> else if (index &#62; 0 &#38;&#38; builder.charAt(index) == &#39;/&#39;</span></pre></td></tr>"
"JavadocStyleCheck.java.html:<td class='covered'><pre><span class='survived'> trimTail(builder);</span></pre></td></tr>"
"JavadocTagContinuationIndentationCheck.java.html:<td class='covered'><pre><span class='survived'> &#38;&#38; (text.length() &#60;= offset</span></pre></td></tr>"
"JavadocTagContinuationIndentationCheck.java.html:<td class='covered'><pre><span class='survived'> while (inlineTag != null) {</span></pre></td></tr>"
"JavadocTagInfo.java.html:<td class='covered'><pre><span class='survived'> .collect(Collectors.toMap(JavadocTagInfo::getName, tagName -&#62; tagName)));</span></pre></td></tr>"
"JavadocTagInfo.java.html:<td class='covered'><pre><span class='survived'> .collect(Collectors.toMap(JavadocTagInfo::getText, tagText -&#62; tagText)));</span></pre></td></tr>"
"JavadocTag.java.html:<td class='uncovered'><pre><span class='survived'> return tagInfo == JavadocTagInfo.SEE</span></pre></td></tr>"
"JavadocTypeCheck.java.html:<td class='covered'><pre><span class='survived'> tagCount++;</span></pre></td></tr>"
"SummaryJavadocCheck.java.html:<td class='covered'><pre><span class='survived'> for (int i = 0; !found &#38;&#38; i &#60; children.length - 1; i++) {</span></pre></td></tr>"
"SummaryJavadocCheck.java.html:<td class='covered'><pre><span class='survived'> if (child.getType() != JavadocTokenTypes.JAVADOC_INLINE_TAG</span></pre></td></tr>"
"TagParser.java.html:<td class='covered'><pre><span class='survived'> &#38;&#38; (Character.isWhitespace(currentLine.charAt(column))</span></pre></td></tr>"
"TagParser.java.html:<td class='covered'><pre><span class='survived'> || currentLine.charAt(column) == &#39;*&#39;)) {</span></pre></td></tr>"
"TagParser.java.html:<td class='covered'><pre><span class='survived'> while (column &#60; currentLine.length()</span></pre></td></tr>"
"WriteTagCheck.java.html:<td class='covered'><pre><span class='survived'> log(lineNo, MSG_MISSING_TAG, tag);</span></pre></td></tr>"
"WriteTagCheck.java.html:<td class='covered'><pre><span class='survived'> tagCount += 1;</span></pre></td></tr>"
);
checkPitestReport "${ignoredItems[@]}"
;;
# pitesttyle-gui)
# mvn -e -P$1 clean test org.pitest:pitest-maven:mutationCoverage;
# # post validation is skipped, we do not test gui throughly
# ;;
*)
echo "Unexpected argument: $1"
sleep 5s
false
;;
esac
......@@ -4,13 +4,15 @@
#Run "firefox target/site/linkcheck.html" after completion to review html report
set -e
pwd
uname -a
mvn --version
curl -I https://sourceforge.net/projects/checkstyle/
mvn -e clean site -Dcheckstyle.ant.skip=true -DskipTests -DskipITs -Dpmd.skip=true -Dfindbugs.skip=true -Dcobertura.skip=true -Dcheckstyle.skip=true
mvn -e clean site -Dcheckstyle.ant.skip=true -DskipTests -DskipITs \
-Dpmd.skip=true -Dspotbugs.skip=true -Djacoco.skip=true -Dcheckstyle.skip=true
echo "------------ grep of linkcheck.html--BEGIN"
# "grep ... | cat" is required command is running in "set -e" mode and grep could return exit code 1 if nothing is matching
# "grep ... | cat" is required command is running in "set -e" mode and
# grep could return exit code 1 if nothing is matching
grep externalLink target/site/linkcheck.html | cat
echo "------------ grep of linkcheck.html--END"
RESULT=$(grep externalLink target/site/linkcheck.html | grep -v 'Read timed out' | wc -l)
......
#!/bin/bash
# Attention, there is no "-x" to avoid problems on Wercker
set -e
function checkout_from {
CLONE_URL=$1
PROJECT=$(echo "$CLONE_URL" | sed -nE 's/.*\/(.*).git/\1/p')
mkdir -p .ci-temp
cd .ci-temp
if [ -d "$PROJECT" ]; then
echo "Target project $PROJECT is already cloned, latest changes will be fetched"
cd $PROJECT
git fetch
cd ../
else
for i in 1 2 3 4 5; do git clone $CLONE_URL && break || sleep 15; done
fi
cd ../
}
function build_checkstyle {
if [[ "$SHIPPABLE" == "true" ]]; then
echo "Build checkstyle ..."
mvn clean install -Pno-validations
fi
}
case $1 in
no-exception-openjdk7-openjdk8)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo 'CS_POM_VERSION='${CS_POM_VERSION}
build_checkstyle
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i'' 's/^guava/#guava/' projects-for-circle.properties
sed -i'' 's/#openjdk7/openjdk7/' projects-for-circle.properties
sed -i'' 's/#openjdk8/openjdk8/' projects-for-circle.properties
groovy launch.groovy --listOfProjects projects-for-circle.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
;;
no-exception-openjdk9-lucene-and-others)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo 'CS_POM_VERSION='${CS_POM_VERSION}
build_checkstyle
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i'' 's/^guava/#guava/' projects-for-circle.properties
# till hg is installed
#sed -i'' 's/#openjdk9/openjdk9/' projects-for-circle.properties
sed -i'' 's/#infinispan/infinispan/' projects-for-circle.properties
sed -i'' 's/#protonpack/protonpack/' projects-for-circle.properties
sed -i'' 's/#jOOL/jOOL/' projects-for-circle.properties
sed -i'' 's/#lucene-solr/lucene-solr/' projects-for-circle.properties
groovy launch.groovy --listOfProjects projects-for-circle.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
;;
no-exception-cassandra-storm-tapestry)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo 'CS_POM_VERSION='${CS_POM_VERSION}
build_checkstyle
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i'' 's/^guava/#guava/' projects-for-circle.properties
sed -i'' 's/#tapestry-5/tapestry-5/' projects-for-circle.properties
sed -i'' 's/#storm/storm/' projects-for-circle.properties
sed -i'' 's/#cassandra/cassandra/' projects-for-circle.properties
groovy launch.groovy --listOfProjects projects-for-circle.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
;;
no-exception-hadoop-apache-groovy-scouter)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo 'CS_POM_VERSION='${CS_POM_VERSION}
build_checkstyle
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i'' 's/^guava/#guava/' projects-for-circle.properties
sed -i'' 's/#apache-commons/apache-commons/' projects-for-circle.properties
sed -i'' 's/#hadoop/hadoop/' projects-for-circle.properties
sed -i'' 's/#groovy/groovy/' projects-for-circle.properties
sed -i'' 's/#scouter/scouter/' projects-for-circle.properties
groovy launch.groovy --listOfProjects projects-for-circle.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
;;
*)
echo "Unexpected argument: $1"
sleep 5s
false
;;
esac
#!/bin/sh
#set checkstyle sonar profile
curl -X POST -u admin:admin -F 'backup=@config/default_sonar_profile.xml' -v http://localhost:9000/api/profiles/restore
curl -X POST -u admin:admin \
-F 'backup=@config/default_sonar_profile.xml' -v http://localhost:9000/api/profiles/restore
#execute inspection
mvn -e sonar:sonar -P sonar -Dsonar.language=java -Dsonar.profile=checksyle-profile
mvn -e sonar:sonar -P sonar -Dsonar.language=java -Dsonar.profile=checkstyle-profile
# Uncomment following to get HTML report.
# mvn sonar:sonar -Dsonar.analysis.mode=preview -Dsonar.issuesReport.html.enable=true \
# -Dsonar.language=java -Dsonar.profile=checksyle-profile
# -Dsonar.language=java -Dsonar.profile=checkstyle-profile
#get and parse response from sonar
#give some time to sonar for report processing
sleep "60"
curl -u admin:admin -v http://localhost:9000/api/issues/search?componentRoots=com.puppycrawl.tools:checkstyle \
curl -u admin:admin \
-v http://localhost:9000/api/issues/search?componentRoots=com.puppycrawl.tools:checkstyle \
> response.json
OUTPUT="$(cat response.json | jq '.total')"
......
#!/bin/bash
# This CI acceptance test is based on:
# https://github.com/jsoref/spelling/blob/04648bdc63723e5cdf5cbeaff2225a462807abc8
# It is conceptually `f` which runs `w` (spelling-unknown-word-splitter)
# plus `fchurn` which uses `dn` mostly rolled together.
set -e
spellchecker=.ci/jsoref-spellchecker
whitelist_path=.ci/jsoref-spellchecker/whitelist.words
dict=$spellchecker/english.words
word_splitter=$spellchecker/spelling-unknown-word-splitter.pl
run_output=$spellchecker/unknown.words
if [ ! -e $dict ]; then
echo "Retrieve ./usr/share/dict/linux.words"
words_rpm=$spellchecker/words.rpm
mirror="https://rpmfind.net"
file_path="/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/w/"
file_name=$(curl -s "${mirror}${file_path}" | grep -o "words-.*.noarch.rpm")
curl "${mirror}${file_path}${file_name}" -o $words_rpm
$spellchecker/rpm2cpio.sh $words_rpm |\
cpio -i --to-stdout ./usr/share/dict/linux.words > $dict
rm $words_rpm
fi
if [ ! -e $word_splitter ]; then
echo "Retrieve w"
curl -s https://raw.githubusercontent.com/jsoref/spelling/master/w |\
perl -p -n -e "s</usr/share/dict/words><$dict>" > $word_splitter
chmod u+x $word_splitter
echo "Retrieved."
ls -la $word_splitter
fi
echo "Clean up from previous run"
rm -f $run_output
echo "Run w"
(git 'ls-files' -z 2> /dev/null || hg locate -0) |\
.ci/jsoref-spellchecker/exclude.pl |\
xargs -0 $word_splitter |\
$word_splitter |\
perl -p -n -e 's/ \(.*//' > $run_output
printDetails() {
echo ''
echo 'If you are ok with the output of this run, you will need to'
}
echo "Review results"
if [ ! -e $whitelist_path ]; then
echo "No preexisting $whitelist_path file."
printDetails
echo "cat > $whitelist_path <<EOF=EOF"
cat $run_output
echo EOF=EOF
exit 2
fi
diff_output=`diff -U1 $whitelist_path $run_output |grep -v "$spellchecker" || true`
if [ -z "$diff_output" ]; then
echo "No new words and misspellings found."
exit 0
fi
new_output=`diff -i -U0 $whitelist_path $run_output |grep -v "$spellchecker" |\
perl -n -w -e 'next unless /^\+/; next if /^\+{3} /; s/^.//; print;'`
if [ -z "$new_output" ]; then
echo "There are now fewer misspellings than before."
echo "$whitelist_path could be updated:"
echo ''
echo "patch $whitelist_path <<EOF"
echo "$diff_output"
echo "EOF"
sleep 5
exit 1
fi
echo "New misspellings found, please review:"
echo "$new_output"
printDetails
echo "patch $whitelist_path <<EOF"
echo "$diff_output"
echo "EOF"
sleep 5
exit 1
......@@ -2,8 +2,12 @@
set -e
# On Travis, after clone, all files are with 644 permission, on local they are 664, so we check only executable bit
CHMOD=$(find -type f -not -path '*/\.git/*' -a -type f -not -name '*.sh' -a \( -type d -not -perm 775 -o -type f -executable \))
# On Travis, after clone, all files are with 644 permission, on local they are 664,
# so we check only executable bit
CHMOD=$(find -type f -not -path '*/\.git/*' \
-a -type f -not -name '*.sh' \
-a -type f -not -name '*.pl' \
-a \( -type d -not -perm 775 -o -type f -executable \))
if [[ ! -z $CHMOD ]]; then
echo "Expected mode for non '.sh' files is 664.";
echo "Files that violates this rule:"
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- copy from http://maven.apache.org/xsd/decoration-1.0.0.xsd ,
just to make build stable in offline mode.
source was a bit formatted to pass LineLength and NewlineAtEndOfFile and
spelling validation
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
xmlns="http://maven.apache.org/DECORATION/1.0.0"
targetNamespace="http://maven.apache.org/DECORATION/1.0.0">
<xs:element name="project" type="DecorationModel">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The &lt;code&gt;&amp;lt;project&amp;gt;&lt;/code&gt; element
is the root of the site decoration descriptor.
The following table lists all of the possible child elements.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="DecorationModel">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The &lt;code&gt;&amp;lt;project&amp;gt;&lt;/code&gt; element
is the root of the site decoration descriptor.
The following table lists all of the possible child elements.
</xs:documentation>
</xs:annotation>
<xs:all>
<xs:element minOccurs="0" name="bannerLeft" type="Banner">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Banner logo on the masthead of the site to the left.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="bannerRight" type="Banner">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Banner logo on the masthead of the site to the right.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="publishDate" type="PublishDate">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Modify the date published display properties.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="version" type="Version">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Modify the version published display properties.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="poweredBy">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Powered by logos list.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="logo" minOccurs="0" maxOccurs="unbounded" type="Logo"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="skin" type="Skin">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The artifact containing the skin for the site.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="body" type="Body">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The main site content decoration.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="custom">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Custom configuration for use with customized Velocity templates.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The full name of the project.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="Banner">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Banner logo on the masthead of the site.
</xs:documentation>
</xs:annotation>
<xs:all>
<xs:element minOccurs="0" name="name" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The name of the banner.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="src" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The location of an image for the banner.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="alt" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The alt description for the banner image.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="href" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The href of a link to be used for the banner image.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
<xs:complexType name="Body">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The main content decoration.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" name="head">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Additional content (like Javascript) to include in the HEAD
block of the generated pages.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="links">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
A list of links to display in the navigation.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="item" minOccurs="0" maxOccurs="unbounded" type="LinkItem"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="breadcrumbs">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
A list of breadcrumbs to display in the navigation.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="item" minOccurs="0" maxOccurs="unbounded" type="LinkItem"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="menu" type="Menu" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
A list of menus to include in the navigation.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LinkItem">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
A link in the navigation.
</xs:documentation>
</xs:annotation>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The name to display for the link.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="href" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The href to use for the link.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="Menu">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
A menu in the navigation.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" name="item" type="MenuItem" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
A list of menu item.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The name to display for the menu.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="inherit" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The way in which the menu is inherited. Can be one of
: &lt;code&gt;top&lt;/code&gt;, &lt;code&gt;bottom&lt;/code&gt;.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="inheritAsRef" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
If this is a reference, setting &lt;inheritAsRef&gt;true&lt;/inheritAsRef&gt;
means that it will be populated
in the project, whereas if it is false,
it is populated in the parent and then inherited.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ref" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
A reference to a pre-defined menu, such as a
&lt;code&gt;reports&lt;/code&gt;, &lt;code&gt;modules&lt;/code&gt;
or &lt;code&gt;parentProject&lt;/code&gt;.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="img" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The location of an image.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="MenuItem">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
A menu item.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" name="description" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
A description of the menu item. This is used on any summary pages for a menu.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="item" type="MenuItem" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">Menu item.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="collapse" type="xs:boolean" default="false">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Whether to collapse children elements of an item menu (by default).
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ref" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
A reference to a pre-defined menu item, such as a report (specified by the report goal
name). Any elements explicitly given override those from the pre-defined reference.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The name to display for the link.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="href" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The href to use for the link.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="Skin">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
An skin artifact declaration.
</xs:documentation>
</xs:annotation>
<xs:all>
<xs:element minOccurs="0" name="groupId" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The skin group ID.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="artifactId" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The skin artifact ID.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="version" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The skin version.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
<xs:complexType name="Version">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Modify display properties for version published.
</xs:documentation>
</xs:annotation>
<xs:attribute name="position" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Where to place the version published
(left, right, navigation-top, navigation-bottom, bottom).
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="PublishDate">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Modify display properties for date published.
</xs:documentation>
</xs:annotation>
<xs:attribute name="position" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Where to place the date published
(left, right, navigation-top, navigation-bottom, bottom).
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="format" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Date format to use. The default is MM/dd/yyyy.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="Logo">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
Power by logo on the navigation.
</xs:documentation>
</xs:annotation>
<xs:attribute name="img" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The href of a link to be used for the power by image.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The name to display for the link.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="href" type="xs:string">
<xs:annotation>
<xs:documentation source="version">1.0.0</xs:documentation>
<xs:documentation source="description">
The href to use for the link.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:schema>
......@@ -4,6 +4,85 @@ set -e
case $1 in
checkstyle-and-sevntu)
export MAVEN_OPTS='-Xmx2000m'
mvn -e clean verify -DskipTests -DskipITs -Dpmd.skip=true -Dspotbugs.skip=true -Djacoco.skip=true
;;
jacoco)
export MAVEN_OPTS='-Xmx2000m'
mvn -e clean test \
jacoco:restore-instrumented-classes \
jacoco:report@default-report \
jacoco:check@default-check
;;
test-de)
mvn -e clean integration-test failsafe:verify \
-DargLine='-Duser.language=de -Duser.country=DE -Xms1024m -Xmx2048m'
;;
test-es)
mvn -e clean integration-test failsafe:verify \
-DargLine='-Duser.language=es -Duser.country=ES -Xms1024m -Xmx2048m'
;;
test-fi)
mvn -e clean integration-test failsafe:verify \
-DargLine='-Duser.language=fi -Duser.country=FI -Xms1024m -Xmx2048m'
;;
test-fr)
mvn -e clean integration-test failsafe:verify \
-DargLine='-Duser.language=fr -Duser.country=FR -Xms1024m -Xmx2048m'
;;
test-zh)
mvn -e clean integration-test failsafe:verify \
-DargLine='-Duser.language=zh -Duser.country=ZH -Xms1024m -Xmx2048m'
;;
test-jp)
mvn -e clean integration-test failsafe:verify \
-DargLine='-Duser.language=jp -Duser.country=JP -Xms1024m -Xmx2048m'
;;
test-pt)
mvn -e clean integration-test failsafe:verify \
-DargLine='-Duser.language=pt -Duser.country=PT -Xms1024m -Xmx2048m'
;;
test-tr)
mvn -e clean integration-test failsafe:verify \
-DargLine='-Duser.language=tr -Duser.country=TR -Xms1024m -Xmx2048m'
;;
travis-osx)
mvn -e package -Dlinkcheck.skip=true
mvn -e package -Passembly
;;
site)
mvn -e clean site -Pno-validations
;;
javac9)
javac $(grep -Rl --include='*.java' ': Compilable with Java9' src/test/resources-noncompilable)
;;
javac8)
# InputCustomImportOrderNoPackage2 - nothing is required in front of first import
files=($(grep -REL --include='*.java' \
--exclude='InputCustomImportOrderNoPackage2.java' \
'//non-compiled (syntax|with javac)?\:' \
src/test/resources-noncompilable))
mkdir -p target
for file in "${files[@]}"
do
javac -d target "${file}"
done
;;
nondex)
mvn -e --fail-never clean nondex:nondex -DargLine='-Xms1024m -Xmx2048m'
cat `grep -RlE 'td class=.x' .nondex/ | cat` < /dev/null > output.txt
......@@ -35,10 +114,13 @@ versions)
assembly-run-all-jar)
mvn -e clean package -Passembly
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo version:$CS_POM_VERSION
FOLDER=src/it/resources/com/google/checkstyle/test/chapter3filestructure/rule332nolinewrap
FILE=InputNoLineWrapGood.java
java -jar target/checkstyle-$CS_POM_VERSION-all.jar -c /google_checks.xml \
src/it/resources/com/google/checkstyle/test/chapter3filestructure/rule332nolinewrap/InputNoLineWrapGood.java > output.log
$FOLDER/$FILE > output.log
if grep -vE '(Starting audit)|(warning)|(Audit done.)' output.log ; then exit 1; fi
if grep 'warning' output.log ; then exit 1; fi
;;
......@@ -46,20 +128,23 @@ assembly-run-all-jar)
sonarqube)
# token could be generated at https://sonarcloud.io/account/security/
# executon on local: SONAR_TOKEN=xxxxxxxxxx ./.ci/travis/travis.sh sonarqube
if [[ -v TRAVIS_PULL_REQUEST && $TRAVIS_PULL_REQUEST && $TRAVIS_PULL_REQUEST =~ ^([0-9]*)$ ]]; then exit 0; fi
if [[ -v TRAVIS_PULL_REQUEST && $TRAVIS_PULL_REQUEST && $TRAVIS_PULL_REQUEST =~ ^([0-9]*)$ ]];
then
exit 0;
fi
if [[ -z $SONAR_TOKEN ]]; then echo "SONAR_TOKEN is not set"; sleep 5s; exit 1; fi
export MAVEN_OPTS='-Xmx2000m'
mvn -e clean package cobertura:cobertura sonar:sonar \
mvn -e clean package sonar:sonar \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login=$SONAR_TOKEN \
-Dcobertura.report.format=xml -Dmaven.test.failure.ignore=true \
-Dmaven.test.failure.ignore=true \
-Dcheckstyle.skip=true -Dpmd.skip=true -Dcheckstyle.ant.skip=true
;;
release-dry-run)
if [ $(git log -1 | grep -E "\[maven-release-plugin\] prepare release" | cat | wc -l) -lt 1 ]; then
if [ $(git log -1 | grep -E "\[maven-release-plugin\] prepare release" | cat | wc -l) -lt 1 ];then
mvn -e release:prepare -DdryRun=true --batch-mode -Darguments='-DskipTests -DskipITs \
-Dcobertura.skip=true -Dpmd.skip=true -Dfindbugs.skip=true -Dxml.skip=true \
-Djacoco.skip=true -Dpmd.skip=true -Dspotbugs.skip=true -Dxml.skip=true \
-Dcheckstyle.ant.skip=true -Dcheckstyle.skip=true -Dgpg.skip=true'
fi
;;
......@@ -89,17 +174,25 @@ all-sevntu-checks)
;;
no-error-test-sbe)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
echo version:$CS_POM_VERSION
mvn -e clean install -Pno-validations
mkdir -p .ci-temp/
cd .ci-temp/
git clone https://github.com/real-logic/simple-binary-encoding.git
cd simple-binary-encoding
git checkout 963814f8ca1456de9daaf67e78663e7d877871a9
sed -i'' "s/'com.puppycrawl.tools:checkstyle:.*'/'com.puppycrawl.tools:checkstyle:$CS_POM_VERSION'/" build.gradle
git checkout 1.8.1
sed -i'' \
"s/'com.puppycrawl.tools:checkstyle:.*'/'com.puppycrawl.tools:checkstyle:$CS_POM_VERSION'/" \
build.gradle
./gradlew build
;;
no-exception-test-checkstyle-sevntu-checkstyle)
CS_POM_VERSION=$(mvn -e -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
git clone https://github.com/checkstyle/contribution
cd contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
......@@ -109,10 +202,14 @@ no-exception-test-checkstyle-sevntu-checkstyle)
mvn -e clean install -Pno-validations
cd contribution/checkstyle-tester
export MAVEN_OPTS="-Xmx2048m"
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion $CS_POM_VERSION
;;
no-exception-test-guava)
CS_POM_VERSION=$(mvn -e -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
git clone https://github.com/checkstyle/contribution
cd contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
......@@ -121,10 +218,14 @@ no-exception-test-guava)
mvn -e clean install -Pno-validations
cd contribution/checkstyle-tester
export MAVEN_OPTS="-Xmx2048m"
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties
--config checks-nonjavadoc-error.xml --checkstyleVersion $CS_POM_VERSION
;;
no-exception-test-guava-with-google-checks)
CS_POM_VERSION=$(mvn -e -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
git clone https://github.com/checkstyle/contribution
cd contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
......@@ -134,10 +235,14 @@ no-exception-test-guava-with-google-checks)
sed -i.'' 's/warning/ignore/' src/main/resources/google_checks.xml
cd contribution/checkstyle-tester
export MAVEN_OPTS="-Xmx2048m"
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config ../../src/main/resources/google_checks.xml
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config ../../src/main/resources/google_checks.xml --checkstyleVersion $CS_POM_VERSION
;;
no-exception-test-hibernate)
CS_POM_VERSION=$(mvn -e -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
git clone https://github.com/checkstyle/contribution
cd contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
......@@ -146,22 +251,30 @@ no-exception-test-hibernate)
mvn -e clean install -Pno-validations
cd contribution/checkstyle-tester
export MAVEN_OPTS="-Xmx2048m"
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion $CS_POM_VERSION
;;
no-exception-test-findbugs)
no-exception-test-spotbugs)
CS_POM_VERSION=$(mvn -e -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
git clone https://github.com/checkstyle/contribution
cd contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
sed -i.'' 's/#findbugs/findbugs/' projects-to-test-on.properties
sed -i.'' 's/#spotbugs/spotbugs/' projects-to-test-on.properties
cd ../../
mvn -e clean install -Pno-validations
cd contribution/checkstyle-tester
export MAVEN_OPTS="-Xmx2048m"
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion $CS_POM_VERSION
;;
no-exception-test-spring-framework)
CS_POM_VERSION=$(mvn -e -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
git clone https://github.com/checkstyle/contribution
cd contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
......@@ -170,10 +283,14 @@ no-exception-test-spring-framework)
mvn -e clean install -Pno-validations
cd contribution/checkstyle-tester
export MAVEN_OPTS="-Xmx2048m"
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion $CS_POM_VERSION
;;
no-exception-test-hbase)
CS_POM_VERSION=$(mvn -e -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
git clone https://github.com/checkstyle/contribution
cd contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
......@@ -182,10 +299,14 @@ no-exception-test-hbase)
mvn -e clean install -Pno-validations
cd contribution/checkstyle-tester
export MAVEN_OPTS="-Xmx2048m"
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion $CS_POM_VERSION
;;
no-exception-test-Pmd-elasticsearch-lombok-ast)
CS_POM_VERSION=$(mvn -e -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
git clone https://github.com/checkstyle/contribution
cd contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
......@@ -196,10 +317,14 @@ no-exception-test-Pmd-elasticsearch-lombok-ast)
mvn -e clean install -Pno-validations
cd contribution/checkstyle-tester
export MAVEN_OPTS="-Xmx2048m"
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion $CS_POM_VERSION
;;
no-exception-test-alot-of-project1)
CS_POM_VERSION=$(mvn -e -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
git clone https://github.com/checkstyle/contribution
cd contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
......@@ -213,44 +338,8 @@ no-exception-test-alot-of-project1)
mvn -e clean install -Pno-validations
cd contribution/checkstyle-tester
export MAVEN_OPTS="-Xmx2048m"
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml
;;
cobertura-check)
set +e
echo "Output and Error output will be redirected to mvn-log.log file ..."
mvn -e clean compile cobertura:cobertura cobertura:check -DargLine='-Xms1024m -Xmx2048m' &> mvn-log.log
echo "Printing mvn-log.log file:"
cat mvn-log.log
sleep 5s
set -e
echo "Grep for hidden errors (due to quiet=true mode in pom.xml):"
grep -R "<td class=\"nbHitsUncovered\"" target/site/cobertura/* --exclude=*grammars* | cat > mvn-log-grep.log
cat mvn-log-grep.log
if [[ $(cat mvn-log-grep.log | wc -l) -gt 0 ]]; then
sleep 5s
false
fi
echo "Checking that all classes are covered:"
xmlstarlet sel -t -m "//class" -v "@name" -n target/site/cobertura/coverage.xml | sed "s/\./\//g" | sed "/^$/d" | sort | uniq > cobertura_classes.log
find target/classes -type f -name "*.class" | grep -vE ".*\\$.*" | sed "s/target\/classes\///g" | sed "s/.class//g" | sed "/^$/d" | sort | uniq > target_classes.log
xmlstarlet sel -N pom=http://maven.apache.org/POM/4.0.0 -t -m "//pom:instrumentation/pom:excludes" -v "pom:exclude" -n pom.xml | sed "s/*//g" | sed "s/.class//g" | sed "/^$/d" | sort | uniq > cobertura_excluded_classes.log
# xmlstarlet has an issue. It concatenates this line with the previous one and removes new line character,
# so we need to split them apart. We use the command till update of xmlstarlet to higher version.
sed -i'' "s/com\/puppycrawl\/tools\/checkstyle\/gui\/BaseCellEditor/\ncom\/puppycrawl\/tools\/checkstyle\/gui\/BaseCellEditor/" cobertura_excluded_classes.log
grep -Fxvf cobertura_classes.log target_classes.log > missed_classes_with_excludes.log
grep -Fvf cobertura_excluded_classes.log missed_classes_with_excludes.log > missed_classes_without_excludes.log | cat > output.log
echo "output.log content:"
cat output.log
if [[ -s missed_classes_without_excludes.log ]] ; then
echo "Classes which are missed in Cobertura coverage report:"
cat missed_classes_without_excludes.log
sleep 5s
false
else
echo "All classes are present in Cobertura coverage report."
fi
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion $CS_POM_VERSION
;;
*)
......
......@@ -4,7 +4,8 @@ set -e
if [[ ! $TRAVIS_PULL_REQUEST =~ ^([0-9]*)$ ]]; then exit 0; fi
LINK_COMMITS=https://api.github.com/repos/checkstyle/checkstyle/pulls/$TRAVIS_PULL_REQUEST/commits
COMMITS=$(curl -s -H "Authorization: token $READ_ONLY_TOKEN" $LINK_COMMITS | jq '.[0] | .commit.message')
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
......@@ -12,14 +13,20 @@ if [[ $ISSUE_NUMBER =~ ^#[0-9]+$ ]]; then
LINK_PR=https://api.github.com/repos/checkstyle/checkstyle/pulls/$TRAVIS_PULL_REQUEST
LINK_ISSUE=https://api.github.com/repos/checkstyle/checkstyle/issues/${ISSUE_NUMBER:1}
REGEXP=($ISSUE_NUMBER\|https://github.com/checkstyle/checkstyle/issues/${ISSUE_NUMBER:1})
PR_DESC=$(curl -s -H "Authorization: token $READ_ONLY_TOKEN" $LINK_PR | jq '.body' | grep -E $REGEXP | cat )
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;
echo 'Please put a reference to an Issue in the PR description,'
echo '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 )
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;
echo 'You are providing a PR for an Issue that is not approved yet,'
echo 'please ask admins to approve your Issue first'
RESULT=1;
fi
fi
if [[ $RESULT == 0 ]]; then
......
#!/bin/bash
# Attention, there is no "-x" to avoid problem on Travis
# to run on local:
# export READ_ONLY_TOKEN=9ffd28f
# && export TRAVIS_PULL_REQUEST="master" && ./.ci/travis/travis.sh releasenotes-gen
set -e
if [[ $TRAVIS_PULL_REQUEST =~ ^([0-9]*)$ ]]; then exit 0; fi
git clone https://github.com/checkstyle/contribution
echo "TRAVIS_PULL_REQUEST:"$TRAVIS_PULL_REQUEST
if [[ $TRAVIS_PULL_REQUEST =~ ^([0-9]*)$ ]]; then
echo "Build is not for Pull Request";
sleep 5;
exit 0;
fi
if [ -d contribution ]; then
cd contribution/
git reset --hard origin/master
git pull origin master
git fetch --tags
cd ../
else
git clone https://github.com/checkstyle/contribution
fi
cd contribution/releasenotes-builder
mvn -e clean compile package
cd ../../
# we need to do full clone as Travis do "git clone --depth=50"
git clone https://github.com/checkstyle/checkstyle
if [ -d checkstyle ]; then
cd checkstyle/
git reset --hard origin/master
git pull origin master
git fetch --tags
cd ../
else
git clone https://github.com/checkstyle/checkstyle
fi
cd checkstyle
LATEST_RELEASE_TAG=$(git describe $(git rev-list --tags --max-count=1))
cd ../
CS_RELEASE_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec | sed 's/-SNAPSHOT//' )
CS_RELEASE_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' \
--non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec | sed 's/-SNAPSHOT//' )
echo LATEST_RELEASE_TAG=$LATEST_RELEASE_TAG
echo CS_RELEASE_VERSION=$CS_RELEASE_VERSION
java -jar contribution/releasenotes-builder/target/releasenotes-builder-1.0-all.jar \
-localRepoPath checkstyle -startRef $LATEST_RELEASE_TAG -releaseNumber $CS_RELEASE_VERSION \
-localRepoPath checkstyle -remoteRepoPath checkstyle/checkstyle \
-startRef $LATEST_RELEASE_TAG -releaseNumber $CS_RELEASE_VERSION \
-githubAuthToken $READ_ONLY_TOKEN -generateAll -publishXdoc
echo ==============================================
......
......@@ -2,74 +2,103 @@
# Attention, there is no "-x" to avoid problems on Wercker
set -e
function checkout_from {
CLONE_URL=$1
PROJECT=$(echo "$CLONE_URL" | sed -nE 's/.*\/(.*).git/\1/p')
mkdir -p .ci-temp
cd .ci-temp
if [ -d "$PROJECT" ]; then
echo "Target project $PROJECT is already cloned, latest changes will be fetched"
cd $PROJECT
git fetch
cd ../
else
for i in 1 2 3 4 5; do git clone $CLONE_URL && break || sleep 15; done
fi
cd ../
}
case $1 in
no-error-pgjdbc)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
CS_POM_VERSION=$(mvn -e -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}
for i in 1 2 3 4 5; do git clone https://github.com/pgjdbc/pgjdbc.git && break || sleep 15; done
cd pgjdbc/pgjdbc
checkout_from https://github.com/pgjdbc/pgjdbc.git
cd .ci-temp/pgjdbc/pgjdbc
mvn -e checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION}
cd ../../
rm -rf pgjdbc
;;
no-error-orekit)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
CS_POM_VERSION=$(mvn -e -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}
for i in 1 2 3 4 5; do git clone https://github.com/Hipparchus-Math/hipparchus.git && break || sleep 15; done
cd hipparchus
git checkout 905006092493e350dcd68dd7b2ec1dedaf4983b7
mvn -e clean install -DskipTests
cd ../
for i in 1 2 3 4 5; do git clone https://github.com/CS-SI/Orekit.git && break || sleep 15; done
cd Orekit
# Orekit use 'develop' branch as target for PullRequest merges
git checkout develop
checkout_from https://github.com/CS-SI/Orekit.git
cd .ci-temp/Orekit
# no CI is enforced in project, so to make our build stable we should
# checkout to latest release (annotated tag)
#git checkout $(git describe --abbrev=0 --tags)
# Orekit use 'develop' branch as target for PullRequest merges, where all our breaking changes
# of 8.2 and above are applied
#git checkout develop
# due to temporal compilation problems(20180522) we use latest commit where compilation pass
git checkout 9862be9
mvn -e compile checkstyle:check -Dorekit.checkstyle.version=${CS_POM_VERSION}
cd ../
rm -rf hipparchus Orekit
rm -rf Orekit
;;
no-error-xwiki)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
CS_POM_VERSION=$(mvn -e -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}
for i in 1 2 3 4 5; do git clone https://github.com/xwiki/xwiki-commons/ && break || sleep 15; done
cd xwiki-commons
git checkout 44b0c0048c516dae20cf5f8a71181af836549484
mvn -e install -DskipTests -Dxwiki.clirr.skip=true checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION}
# till https://github.com/xwiki/xwiki-commons/pull/39
checkout_from https://github.com/checkstyle/xwiki-commons.git
cd .ci-temp/xwiki-commons
# till https://github.com/xwiki/xwiki-commons/pull/39
git checkout i5812-rename-util
mvn -f xwiki-commons-tools/xwiki-commons-tool-verification-resources/pom.xml \
install -DskipTests -Dcheckstyle.version=${CS_POM_VERSION}
mvn -e test-compile checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION}
cd ../../
rm -rf xwiki-commons
;;
no-error-apex-core)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
CS_POM_VERSION=$(mvn -e -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}
for i in 1 2 3 4 5; do git clone https://github.com/apache/incubator-apex-core/ && break || sleep 15; done
cd incubator-apex-core
checkout_from https://github.com/apache/incubator-apex-core.git
cd .ci-temp/incubator-apex-core
mvn -e compile checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION}
cd ../
rm -rf incubator-apex-core
;;
no-error-hibernate-search)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
CS_POM_VERSION=$(mvn -e -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}
for i in 1 2 3 4 5; do git clone https://github.com/hibernate/hibernate-search.git && break || sleep 15; done
cd hibernate-search
mvn -e -s settings-example.xml clean install -DskipTests=true -Dtest.elasticsearch.host.provided=true -Dpuppycrawl.checkstyle.version=${CS_POM_VERSION}
mvn -e -s settings-example.xml checkstyle:check -Dpuppycrawl.checkstyle.version=${CS_POM_VERSION}
checkout_from https://github.com/hibernate/hibernate-search.git
cd .ci-temp/hibernate-search
mvn -e clean install -DskipTests=true -Dtest.elasticsearch.host.provided=true \
-Dcheckstyle.skip=true -Dforbiddenapis.skip=true \
-Dpuppycrawl.checkstyle.version=${CS_POM_VERSION}
mvn -e checkstyle:check -Dpuppycrawl.checkstyle.version=${CS_POM_VERSION}
cd ../
rm -rf hibernate-search
;;
no-error-htmlunit)
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
CS_POM_VERSION=$(mvn -e -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 "checkouting project sources ..."
svn -q export https://svn.code.sf.net/p/htmlunit/code/trunk/htmlunit@r14923 htmlunit
cd htmlunit
sed -i "s/ <version>2.28-SNAPSHOT/ <version>2.28-20171106.080245-12/" pom.xml
sed -i "s/ <version>2.28-SNAPSHOT/ <version>2.28-20171106.080245-12/" pom.xml
echo "Running checkstyle validation ..."
mvn -e compile checkstyle:check -Dcheckstyle.version=${CS_POM_VERSION}
cd ../
......@@ -78,109 +107,162 @@ no-error-htmlunit)
no-error-checkstyles-sevntu)
set -e
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
CS_POM_VERSION=$(mvn -e -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}
mvn -e compile verify -Dmaven.sevntu-checkstyle-check.checkstyle.version=${CS_POM_VERSION} -Dmaven.test.skip=true -Dcheckstyle.ant.skip=true -Dpmd.skip=true -Dfindbugs.skip=true -Dcobertura.skip=true -Dforbiddenapis.skip=true -Dxml.skip=true
mvn -e compile verify -Dmaven.sevntu-checkstyle-check.checkstyle.version=${CS_POM_VERSION} \
-Dmaven.test.skip=true -Dcheckstyle.ant.skip=true -Dpmd.skip=true -Dspotbugs.skip=true \
-Djacoco.skip=true -Dforbiddenapis.skip=true -Dxml.skip=true
;;
no-error-sevntu-checks)
set -e
CS_POM_VERSION=$(mvn -e -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec)
CS_POM_VERSION=$(mvn -e -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}
for i in 1 2 3 4 5; do git clone https://github.com/sevntu-checkstyle/sevntu.checkstyle && break || sleep 15; done
cd sevntu.checkstyle/sevntu-checks
mvn -e -Pno-validations verify -Dcheckstyle.skip=false -Dcheckstyle.version=${CS_POM_VERSION} -Dcheckstyle.configLocation=../../config/checkstyle_checks.xml
checkout_from https://github.com/sevntu-checkstyle/sevntu.checkstyle.git
cd .ci-temp/sevntu.checkstyle/sevntu-checks
mvn -e -Pno-validations verify -Dcheckstyle.skip=false -Dcheckstyle.version=${CS_POM_VERSION} \
-Dcheckstyle.configLocation=../../config/checkstyle_checks.xml
cd ../../
rm -rf sevntu.checkstyle
;;
no-error-strata)
set -e
CS_POM_VERSION=$(mvn -e -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}
checkout_from https://github.com/OpenGamma/Strata.git
cd .ci-temp/Strata
mvn install -e -B -Dstrict -DskipTests \
-Dforbiddenapis.skip=true -Dcheckstyle.version=${CS_POM_VERSION}
cd ../
rm -rf Strata
;;
no-exception-struts)
for i in 1 2 3 4 5; do git clone https://github.com/checkstyle/contribution && break || sleep 15; done
cd contribution/checkstyle-tester
CS_POM_VERSION=$(mvn -e -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}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i'' 's/^guava/#guava/' projects-for-wercker.properties
sed -i'' 's/#apache-struts/apache-struts/' projects-for-wercker.properties
groovy ./launch.groovy --listOfProjects projects-for-wercker.properties --config checks-nonjavadoc-error.xml
groovy ./launch.groovy --listOfProjects projects-for-wercker.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-checkstyle-sevntu)
set -e
for i in 1 2 3 4 5; do git clone https://github.com/checkstyle/contribution && break || sleep 15; done
cd contribution/checkstyle-tester
CS_POM_VERSION=$(mvn -e -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}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i'' 's/^guava/#guava/' projects-for-wercker.properties
sed -i'' 's/#checkstyle/checkstyle/' projects-for-wercker.properties
sed -i'' 's/#sevntu-checkstyle/sevntu-checkstyle/' projects-for-wercker.properties
groovy ./launch.groovy --listOfProjects projects-for-wercker.properties --config checks-nonjavadoc-error.xml
groovy ./launch.groovy --listOfProjects projects-for-wercker.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-guava)
for i in 1 2 3 4 5; do git clone https://github.com/checkstyle/contribution && break || sleep 15; done
cd contribution/checkstyle-tester
CS_POM_VERSION=$(mvn -e -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}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i'' 's/^guava/#guava/' projects-for-wercker.properties
sed -i'' 's/#guava/guava/' projects-for-wercker.properties
groovy ./launch.groovy --listOfProjects projects-for-wercker.properties --config checks-nonjavadoc-error.xml
groovy ./launch.groovy --listOfProjects projects-for-wercker.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-hibernate-orm)
git clone https://github.com/checkstyle/contribution
cd contribution/checkstyle-tester
CS_POM_VERSION=$(mvn -e -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}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
sed -i.'' 's/#hibernate-orm/hibernate-orm/' projects-to-test-on.properties
groovy ./launch.groovy --listOfProjects projects-for-wercker.properties --config checks-nonjavadoc-error.xml
groovy ./launch.groovy --listOfProjects projects-for-wercker.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-findbugs)
git clone https://github.com/checkstyle/contribution
cd contribution/checkstyle-tester
no-exception-spotbugs)
CS_POM_VERSION=$(mvn -e -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}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
sed -i.'' 's/#findbugs/findbugs/' projects-to-test-on.properties
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml
sed -i.'' 's/#spotbugs/spotbugs/' projects-to-test-on.properties
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-spring-framework)
git clone https://github.com/checkstyle/contribution
cd contribution/checkstyle-tester
CS_POM_VERSION=$(mvn -e -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}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
sed -i.'' 's/#spring-framework/spring-framework/' projects-to-test-on.properties
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-hbase)
git clone https://github.com/checkstyle/contribution
cd contribution/checkstyle-tester
CS_POM_VERSION=$(mvn -e -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}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
sed -i.'' 's/#Hbase/Hbase/' projects-to-test-on.properties
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-Pmd-elasticsearch-lombok-ast)
git clone https://github.com/checkstyle/contribution
cd contribution/checkstyle-tester
CS_POM_VERSION=$(mvn -e -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}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
sed -i.'' 's/#pmd/pmd/' projects-to-test-on.properties
sed -i.'' 's/#elasticsearch/elasticsearch/' projects-to-test-on.properties
sed -i.'' 's/#lombok-ast/lombok-ast/' projects-to-test-on.properties
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-exception-alot-of-projects)
git clone https://github.com/checkstyle/contribution
cd contribution/checkstyle-tester
CS_POM_VERSION=$(mvn -e -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}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
sed -i.'' 's/^guava/#guava/' projects-to-test-on.properties
sed -i.'' 's/#RxJava/RxJava/' projects-to-test-on.properties
sed -i.'' 's/#java-design-patterns/java-design-patterns/' projects-to-test-on.properties
......@@ -188,9 +270,58 @@ no-exception-alot-of-projects)
sed -i.'' 's/#apache-ant/apache-ant/' projects-to-test-on.properties
sed -i.'' 's/#apache-jsecurity/apache-jsecurity/' projects-to-test-on.properties
sed -i.'' 's/#android-launcher/android-launcher/' projects-to-test-on.properties
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties --config checks-nonjavadoc-error.xml
groovy ./launch.groovy --listOfProjects projects-to-test-on.properties \
--config checks-nonjavadoc-error.xml --checkstyleVersion ${CS_POM_VERSION}
cd ../../
rm -rf contribution
;;
no-warning-imports-guava)
PROJECTS=checks-import-order/projects-to-test-imports-guava.properties
CONFIG=checks-import-order/checks-imports-error-guava.xml
REPORT=reports/guava/site/index.html
CS_POM_VERSION=$(mvn -e -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}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
groovy ./launch.groovy --listOfProjects $PROJECTS --config $CONFIG \
--checkstyleVersion ${CS_POM_VERSION}
RESULT=`grep -A 5 "&#160;Warning</td>" $REPORT | cat`
cd ../../
rm -rf contribution
if [ -z "$RESULT" ]; then
echo "Inpection did not find any warnings"
else
echo "$RESULT"
echo "Some warnings have been found. Verification failed."
sleep 5s
exit 1
fi
;;
no-warning-imports-java-design-patterns)
PROJECTS=checks-import-order/projects-to-test-imports-java-design-patterns.properties
CONFIG=checks-import-order/checks-imports-error-java-design-patterns.xml
REPORT=reports/java-design-patterns/site/index.html
CS_POM_VERSION=$(mvn -e -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}
checkout_from https://github.com/checkstyle/contribution.git
cd .ci-temp/contribution/checkstyle-tester
groovy ./launch.groovy --listOfProjects $PROJECTS --config $CONFIG \
--checkstyleVersion ${CS_POM_VERSION}
RESULT=`grep -A 5 "&#160;Warning</td>" $REPORT | cat`
cd ../../
rm -rf contribution
if [ -z "$RESULT" ]; then
echo "Inpection did not find any warnings"
else
echo "$RESULT"
echo "Some warnings have been found. Verification failed."
sleep 5s
exit 1
fi
;;
*)
......
version: 2
jobs:
build-caches:
machine: true
steps:
# restore_cache.keys does not work, so multiple restore_cache.key is used
- restore_cache:
key: m2-cache
- checkout
- run:
name: skip_ci creation
command: |
mkdir -p .ci-temp
echo -n ".github|appveyor.yml|.travis.yml|\.ci/" >> .ci-temp/skip_ci_files
echo -n "|distelli-manifest.yml|fast-forward-merge.sh" >> .ci-temp/skip_ci_files
echo -n "|LICENSE|LICENSE.apache20|README.md|release.sh" >> .ci-temp/skip_ci_files
echo -n "|RIGHTS.antlr|shippable.yml|codeship" >> .ci-temp/skip_ci_files
echo -n "|shippable.sh|wercker.yml|wercker.sh" >> .ci-temp/skip_ci_files
echo -n "|intellij-idea-inspections.xml" >> .ci-temp/skip_ci_files
echo -n "|org.eclipse.jdt.core.prefs" >> .ci-temp/skip_ci_files
echo -n "|Jenkinsfile" >> .ci-temp/skip_ci_files
SKIP_CI=false;
if [ $(git diff --name-only HEAD HEAD~1 \
| grep -vE $(cat .ci-temp/skip_ci_files) | wc -c) -gt 0 ] ; then
SKIP_CI=false;
else
SKIP_CI=true;
fi
echo $SKIP_CI > .ci-temp/skip_ci
- run:
name: download all maven dependencies and groovy
command: |
SKIP_CI=`cat .ci-temp/skip_ci`
echo "SKIP_CI="$SKIP_CI
if [[ $SKIP_CI == 'false' ]]; then
pwd
ls -la
java -version
mvn --version
mvn -Ppitest-metrics dependency:go-offline
else
echo "build is skipped ..."
fi
- persist_to_workspace:
root: /home/circleci/
paths:
- .m2
- project
- contribution
pitest1:
machine: true
parallelism: 4
steps:
- attach_workspace:
at: /home/circleci/
- run:
command: |
SKIP_CI=`cat .ci-temp/skip_ci`
echo "SKIP_CI="$SKIP_CI
if [[ $SKIP_CI == 'false' ]]; then
echo "./.ci/pitest.sh pitest-coding" >> commands.txt
echo "./.ci/pitest.sh pitest-common" >> commands.txt
echo "./.ci/pitest.sh pitest-imports" >> commands.txt
echo "./.ci/pitest.sh pitest-ant" >> commands.txt
CMD="$(circleci tests split commands.txt)"
echo "Command: $CMD"
eval $CMD
else
echo "build is skipped ..."
fi
pitest2:
machine: true
parallelism: 4
steps:
- attach_workspace:
at: /home/circleci/
- run:
command: |
SKIP_CI=`cat .ci-temp/skip_ci`
echo "SKIP_CI="$SKIP_CI
if [[ $SKIP_CI == 'false' ]]; then
echo "./.ci/pitest.sh pitest-main" >> commands.txt
echo "./.ci/pitest.sh pitest-javadoc" >> commands.txt
echo "./.ci/pitest.sh pitest-indentation" >> commands.txt
echo "./.ci/pitest.sh pitest-xpath" >> commands.txt
CMD="$(circleci tests split commands.txt)"
echo "Command: $CMD"
eval $CMD
else
echo "build is skipped ..."
fi
pitest3:
machine: true
parallelism: 4
steps:
- attach_workspace:
at: /home/circleci/
- run:
command: |
SKIP_CI=`cat .ci-temp/skip_ci`
echo "SKIP_CI="$SKIP_CI
if [[ $SKIP_CI == 'false' ]]; then
echo "./.ci/pitest.sh pitest-misc" >> commands.txt
echo "./.ci/pitest.sh pitest-design" >> commands.txt
echo "./.ci/pitest.sh pitest-api" >> commands.txt
echo "./.ci/pitest.sh pitest-utils" >> commands.txt
CMD="$(circleci tests split commands.txt)"
echo "Command: $CMD"
eval $CMD
else
echo "build is skipped ..."
fi
pitest4:
machine: true
parallelism: 4
steps:
- attach_workspace:
at: /home/circleci/
- run:
command: |
SKIP_CI=`cat .ci-temp/skip_ci`
echo "SKIP_CI="$SKIP_CI
if [[ $SKIP_CI == 'false' ]]; then
echo "./.ci/pitest.sh pitest-whitespace" >> commands.txt
echo "./.ci/pitest.sh pitest-filters" >> commands.txt
echo "./.ci/pitest.sh pitest-header" >> commands.txt
echo "./.ci/pitest.sh pitest-annotation" >> commands.txt
CMD="$(circleci tests split commands.txt)"
echo "Command: $CMD"
eval $CMD
else
echo "build is skipped ..."
fi
pitest5:
machine: true
parallelism: 4
steps:
- attach_workspace:
at: /home/circleci/
- run:
command: |
SKIP_CI=`cat .ci-temp/skip_ci`
echo "SKIP_CI="$SKIP_CI
if [[ $SKIP_CI == 'false' ]]; then
echo "./.ci/pitest.sh pitest-packagenamesloader" >> commands.txt
echo "./.ci/pitest.sh pitest-tree-walker" >> commands.txt
echo "./.ci/pitest.sh pitest-naming" >> commands.txt
echo "./.ci/pitest.sh pitest-metrics" >> commands.txt
CMD="$(circleci tests split commands.txt)"
echo "Command: $CMD"
eval $CMD
else
echo "build is skipped ..."
fi
pitest6:
machine: true
parallelism: 4
steps:
- attach_workspace:
at: /home/circleci/
- run:
command: |
SKIP_CI=`cat .ci-temp/skip_ci`
echo "SKIP_CI="$SKIP_CI
if [[ $SKIP_CI == 'false' ]]; then
echo "./.ci/pitest.sh pitest-blocks" >> commands.txt
echo "./.ci/pitest.sh pitest-sizes" >> commands.txt
echo "./.ci/pitest.sh pitest-modifier" >> commands.txt
echo "./.ci/pitest.sh pitest-regexp" >> commands.txt
CMD="$(circleci tests split commands.txt)"
echo "Command: $CMD"
eval $CMD
else
echo "build is skipped ..."
fi
pitest7:
machine: true
parallelism: 4
steps:
- attach_workspace:
at: /home/circleci/
- run:
command: |
SKIP_CI=`cat .ci-temp/skip_ci`
echo "SKIP_CI="$SKIP_CI
if [[ $SKIP_CI == 'false' ]]; then
echo "./.ci/pitest.sh pitest-gui" >> commands.txt
CMD="$(circleci tests split commands.txt)"
echo "Command: $CMD"
eval $CMD
else
echo "build is skipped ..."
fi
workflows:
version: 2
pitest-testing:
jobs:
- build-caches
- pitest1:
requires:
- build-caches
- pitest2:
requires:
- build-caches
- pitest3:
requires:
- build-caches
- pitest4:
requires:
- build-caches
- pitest5:
requires:
- build-caches
- pitest6:
requires:
- build-caches
# we do not do thorough testing of gui part
# - pitest7:
# requires:
# - build-caches
/src/test/resources/com/puppycrawl/tools/checkstyle/checks/newlineatendoffile/InputNewlineAtEndOfFileLf.java eol=lf
/src/test/resources/com/puppycrawl/tools/checkstyle/checks/newlineatendoffile/InputNewlineAtEndOfFileCrlf.java eol=crlf
/src/test/resources/com/puppycrawl/tools/checkstyle/checks/newlineatendoffile/InputNewlineAtEndOfFileCr.java -text
/src/test/resources/com/puppycrawl/tools/checkstyle/grammar/InputNewlineCrAtEndOfFile.java -text
/src/test/resources/com/puppycrawl/tools/checkstyle/grammar/javadoc/javadocTags/InputSpaceBeforeDescriptionInBlockJavadocTags.javadoc eol=lf
`/var/tmp $ javac YOUR_FILE.java`:
```
[[PLACE YOUR OUTPUT HERE]]
```
`/var/tmp $ cat YOUR_FILE.java`:
```
[[PLACE YOU OUTPUT HERE]]
```
/var/tmp $ javac YOUR_FILE.java
#[[PLACE YOUR OUTPUT HERE]]
`/var/tmp $ cat config.xml`:
/var/tmp $ cat config.xml
#[[PLACE YOUR OUTPUT HERE]]
```
[[PLACE YOUR OUTPUT HERE]]
```
/var/tmp $ cat YOUR_FILE.java
#[[PLACE YOU OUTPUT HERE]]
`/var/tmp $ java -Duser.language=en -Duser.country=US -jar checkstyle-X.XX-all.jar -c config.xml YOUR_FILE.java`:
```
[[PLACE YOUR OUTPUT HERE]]
/var/tmp $ RUN_LOCALE="-Duser.language=en -Duser.country=US"
/var/tmp $ java $RUN_LOCALE -jar checkstyle-X.XX-all.jar -c config.xml YOUR_FILE.java
#[[PLACE YOUR OUTPUT HERE]]
```
---------------
......@@ -28,4 +19,5 @@ Describe what you expect in detail.
--------------
Still not clear ??? - see example - http://checkstyle.sourceforge.net/report_issue.html#How_to_report_a_bug
Still not clear ???
see example - http://checkstyle.sourceforge.net/report_issue.html#How_to_report_a_bug