-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
2,903 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ | |
/.classpath | ||
/.project | ||
/.settings/ | ||
.gradle/**/* | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
language: java | ||
|
||
before_install: | ||
- chmod +x gradlew |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Copyright (c) 2015, CFLint | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
* Neither the name of the CFLint nor the | ||
names of its contributors may be used to endorse or promote products | ||
derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
buildscript { | ||
repositories { | ||
mavenLocal() | ||
jcenter { | ||
url "http://jcenter.bintray.com/" | ||
} | ||
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" } | ||
} | ||
dependencies { | ||
classpath 'com.bmuschko:gradle-nexus-plugin:2.3' | ||
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3" | ||
} | ||
} | ||
|
||
plugins { | ||
id 'java' | ||
id 'com.github.johnrengelman.shadow' version '1.2.2' | ||
} | ||
|
||
apply plugin: "base" | ||
apply plugin: "signing" | ||
apply plugin: "com.bmuschko.nexus" | ||
|
||
apply plugin: 'java' | ||
apply plugin: 'maven' | ||
apply from: 'cobertura.gradle' | ||
apply from: 'deploy.gradle' | ||
|
||
sourceCompatibility = 1.7 | ||
targetCompatibility = 1.7 | ||
|
||
repositories { | ||
maven { url "https://oss.sonatype.org/content/repositories/snapshots" } | ||
maven { url "http://repo.maven.apache.org/maven2" } | ||
} | ||
dependencies { | ||
compile group: 'com.github.cfparser', name: 'cfparser', version:'2.0.0' | ||
compile group: 'com.github.cfparser', name: 'cfml.parsing', version:'2.0.0' | ||
compile group: 'com.github.cfparser', name: 'cfml.dictionary', version:'2.0.0' | ||
compile group: 'junit', name: 'junit', version:'4.11' | ||
compile group: 'com.googlecode.json-simple', name: 'json-simple', version:'1.1' | ||
compile group: 'org.jdom', name: 'jdom', version:'1.1.3' | ||
compile group: 'org.antlr', name: 'antlr4-runtime', version:'4.5' | ||
compile group: 'org.antlr', name: 'stringtemplate', version:'4.0.2' | ||
compile group: 'org.antlr', name: 'antlr4', version:'4.5' | ||
compile group: 'net.htmlparser.jericho', name: 'jericho-html', version:'3.3' | ||
compile group: 'log4j', name: 'log4j', version:'1.2.17' | ||
compile group: 'commons-cli', name: 'commons-cli', version:'1.2' | ||
compile group: 'ro.fortsoft.pf4j', name: 'pf4j', version:'0.6' | ||
compile group: 'org.slf4j', name: 'slf4j-log4j12', version:'1.7.5' | ||
compile group: 'ant', name: 'ant', version:'1.7.0' | ||
compile group: 'com.sun.xml.bind', name: 'jaxb-impl', version:'2.1.8' | ||
runtime group: 'commons-logging', name: 'commons-logging-api', version:'1.1' | ||
runtime group: 'org.slf4j', name: 'slf4j-api', version:'1.7.5' | ||
runtime group: 'org.javolution', name: 'javolution', version:'5.2.6' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
logger.info "Configuring Cobertura Plugin" | ||
|
||
configurations{ | ||
coberturaRuntime {extendsFrom testRuntime} | ||
} | ||
|
||
dependencies { | ||
coberturaRuntime 'net.sourceforge.cobertura:cobertura:1.9.4' | ||
} | ||
|
||
def serFile="${project.buildDir}/cobertura.ser" | ||
def classes="${project.buildDir}/classes/main" | ||
def classesCopy="${classes}-copy" | ||
|
||
|
||
task cobertura(type: Test){ | ||
dependencies { | ||
testRuntime 'net.sourceforge.cobertura:cobertura:1.9.4' | ||
} | ||
|
||
systemProperty "net.sourceforge.cobertura.datafile", serFile | ||
} | ||
|
||
cobertura.doFirst { | ||
logger.quiet "Instrumenting classes for Cobertura" | ||
ant { | ||
delete(file:serFile, failonerror:false) | ||
delete(dir: classesCopy, failonerror:false) | ||
copy(todir: classesCopy) { fileset(dir: classes) } | ||
|
||
taskdef(resource:'tasks.properties', classpath: configurations.coberturaRuntime.asPath) | ||
'cobertura-instrument'(datafile: serFile) { | ||
fileset(dir: classes, | ||
includes:"**/*.class", | ||
excludes:"**/*Test.class") | ||
} | ||
} | ||
} | ||
|
||
cobertura.doLast{ | ||
if (new File(classesCopy).exists()) { | ||
//create html cobertura report | ||
ant.'cobertura-report'(destdir:"${project.reportsDir}/cobertura", | ||
format:'html', srcdir:"src/main/java", datafile: serFile) | ||
//create xml cobertura report | ||
ant.'cobertura-report'(destdir:"${project.reportsDir}/cobertura", | ||
format:'xml', srcdir:"src/main/java", datafile: serFile) | ||
ant.delete(file: classes) | ||
ant.move(file: classesCopy, tofile: classes) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
configurations { | ||
jaxDoclet | ||
} | ||
|
||
nexus { | ||
sign = true | ||
repositoryUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/' | ||
snapshotRepositoryUrl = 'https://oss.sonatype.org/content/repositories/snapshots/' | ||
} | ||
|
||
task deploy() { | ||
if (release.toBoolean() == true) { | ||
def strippedSnapshotVersion = version.replaceFirst(/-SNAPSHOT/, '') | ||
ant.propertyfile(file: "gradle.properties") { | ||
entry( key: "version", value: "$strippedSnapshotVersion") | ||
entry( key: "release", value: "false") | ||
} | ||
} | ||
else if (snapshot.toBoolean() == true) { | ||
def strippedSnapshotVersion = version.replaceFirst(/-SNAPSHOT/, '') | ||
ant.propertyfile(file: "gradle.properties") { | ||
entry( key: "version", value: "$strippedSnapshotVersion-SNAPSHOT") | ||
entry( key: "snapshot", value: "false") | ||
} | ||
} | ||
} | ||
|
||
uploadArchives.mustRunAfter deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Tue, 06 Oct 2015 20:08:05 -0600 | ||
group=com.github.cflint | ||
version=0.5.1 | ||
name=CFLint | ||
release=false | ||
snapshot=false |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Sun Aug 16 19:51:35 MDT 2015 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-bin.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
#!/usr/bin/env bash | ||
|
||
############################################################################## | ||
## | ||
## Gradle start up script for UN*X | ||
## | ||
############################################################################## | ||
|
||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | ||
DEFAULT_JVM_OPTS="" | ||
|
||
APP_NAME="Gradle" | ||
APP_BASE_NAME=`basename "$0"` | ||
|
||
# Use the maximum available, or set MAX_FD != -1 to use that value. | ||
MAX_FD="maximum" | ||
|
||
warn ( ) { | ||
echo "$*" | ||
} | ||
|
||
die ( ) { | ||
echo | ||
echo "$*" | ||
echo | ||
exit 1 | ||
} | ||
|
||
# OS specific support (must be 'true' or 'false'). | ||
cygwin=false | ||
msys=false | ||
darwin=false | ||
case "`uname`" in | ||
CYGWIN* ) | ||
cygwin=true | ||
;; | ||
Darwin* ) | ||
darwin=true | ||
;; | ||
MINGW* ) | ||
msys=true | ||
;; | ||
esac | ||
|
||
# For Cygwin, ensure paths are in UNIX format before anything is touched. | ||
if $cygwin ; then | ||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` | ||
fi | ||
|
||
# Attempt to set APP_HOME | ||
# Resolve links: $0 may be a link | ||
PRG="$0" | ||
# Need this for relative symlinks. | ||
while [ -h "$PRG" ] ; do | ||
ls=`ls -ld "$PRG"` | ||
link=`expr "$ls" : '.*-> \(.*\)$'` | ||
if expr "$link" : '/.*' > /dev/null; then | ||
PRG="$link" | ||
else | ||
PRG=`dirname "$PRG"`"/$link" | ||
fi | ||
done | ||
SAVED="`pwd`" | ||
cd "`dirname \"$PRG\"`/" >&- | ||
APP_HOME="`pwd -P`" | ||
cd "$SAVED" >&- | ||
|
||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar | ||
|
||
# Determine the Java command to use to start the JVM. | ||
if [ -n "$JAVA_HOME" ] ; then | ||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then | ||
# IBM's JDK on AIX uses strange locations for the executables | ||
JAVACMD="$JAVA_HOME/jre/sh/java" | ||
else | ||
JAVACMD="$JAVA_HOME/bin/java" | ||
fi | ||
if [ ! -x "$JAVACMD" ] ; then | ||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME | ||
Please set the JAVA_HOME variable in your environment to match the | ||
location of your Java installation." | ||
fi | ||
else | ||
JAVACMD="java" | ||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | ||
Please set the JAVA_HOME variable in your environment to match the | ||
location of your Java installation." | ||
fi | ||
|
||
# Increase the maximum file descriptors if we can. | ||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then | ||
MAX_FD_LIMIT=`ulimit -H -n` | ||
if [ $? -eq 0 ] ; then | ||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then | ||
MAX_FD="$MAX_FD_LIMIT" | ||
fi | ||
ulimit -n $MAX_FD | ||
if [ $? -ne 0 ] ; then | ||
warn "Could not set maximum file descriptor limit: $MAX_FD" | ||
fi | ||
else | ||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" | ||
fi | ||
fi | ||
|
||
# For Darwin, add options to specify how the application appears in the dock | ||
if $darwin; then | ||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" | ||
fi | ||
|
||
# For Cygwin, switch paths to Windows format before running java | ||
if $cygwin ; then | ||
APP_HOME=`cygpath --path --mixed "$APP_HOME"` | ||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` | ||
|
||
# We build the pattern for arguments to be converted via cygpath | ||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` | ||
SEP="" | ||
for dir in $ROOTDIRSRAW ; do | ||
ROOTDIRS="$ROOTDIRS$SEP$dir" | ||
SEP="|" | ||
done | ||
OURCYGPATTERN="(^($ROOTDIRS))" | ||
# Add a user-defined pattern to the cygpath arguments | ||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then | ||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" | ||
fi | ||
# Now convert the arguments - kludge to limit ourselves to /bin/sh | ||
i=0 | ||
for arg in "$@" ; do | ||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` | ||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option | ||
|
||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition | ||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` | ||
else | ||
eval `echo args$i`="\"$arg\"" | ||
fi | ||
i=$((i+1)) | ||
done | ||
case $i in | ||
(0) set -- ;; | ||
(1) set -- "$args0" ;; | ||
(2) set -- "$args0" "$args1" ;; | ||
(3) set -- "$args0" "$args1" "$args2" ;; | ||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;; | ||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; | ||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; | ||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; | ||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; | ||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; | ||
esac | ||
fi | ||
|
||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules | ||
function splitJvmOpts() { | ||
JVM_OPTS=("$@") | ||
} | ||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS | ||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" | ||
|
||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" |
Oops, something went wrong.