-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Group equality match #80
Closed
Closed
Changes from all commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
f8bb877
avoiding the NPE if there is no default command in a group
mhgrove 18b1446
adding optional discussion and example section at the end of the usag…
mhgrove e99c95f
removed the trim from the table printer in an earlier commit, which b…
mhgrove f1603c4
small fix for default command parsing to avoid errors when they're us…
mhgrove 2795807
Support running default command of a group with arguments
evren 38b8aef
another minor adjustment to default command handling for the default …
mhgrove d08240e
merging in 2795807
mhgrove 8fe108c
Ignoring eclipse bin folder.
4bad01e
Fixed bug on arguments separator, which makes the option arity flexible.
fc6427c
Modified arity value in test just to make it more clear.
77e928d
Merge branch 'feature/argsArity' into develop
3658456
Updated authors.
fe2f9b9
Fixed option parsing for high arity values, and added corresponding t…
0aff15d
* add the ability to get a group via the CliBuilder
mhgrove a509968
* basic full test suite for airline, runs as a separate program, so n…
mhgrove e50579d
* merging changes in from another fork, airline/tesla (https://github…
mhgrove 5197195
* merging changes in from another fork, airline/tesla (https://github…
mhgrove cee1acf
* merging changes in from another fork, airline/tesla (https://github…
mhgrove bc9089c
* merging changes in from another fork, airline/tesla (https://github…
mhgrove 5a38631
* merging changes in from another fork, airline/tesla (https://github…
mhgrove 5e9693b
* merging changes in from another fork, airline/tesla (https://github…
mhgrove e3d1e2c
* merging changes in from another fork, airline/tesla (https://github…
mhgrove 9b97e1f
* merging changes in from another fork, airline/tesla (https://github…
mhgrove bbaaa5d
* bump airline to 0.7 internally
mhgrove ceffc60
* actually using the command factory in the Cli if you specify it in …
mhgrove 002268a
Merge branch 'release/0.7'
mhgrove 79ccfb2
modifying how option sets are coalesced during parsing to ensure the …
mhgrove 0bfcd5f
* adding a usage printer for an HTML format, only works for a specifi…
mhgrove dd1ff78
* bumping airline rev
mhgrove 854f9e4
Added default command to synopsis.
f50c22c
Titles with multiple names for arguments.
8c5e8e2
Made a couple of improvements in the help system and the rendering lo…
e93961a
bumped version to 0.7.2
bc315b7
Updated CommandGroupUsage to print each command's arguments when prin…
cp-autobuild 369b88e
Added spaces between [ ] and other elements for better readability. U…
cp-autobuild af3e0f4
Refactored CommandGroupUsage to factor out common command arguments/o…
cp-autobuild 34a3bbf
Incremented version number
cp-autobuild cc1714b
Merge pull request #1 from snowell/feature/betterGroupOutput
mhgrove c279f36
Merge branch 'feature/betterGroupOutput' into develop
cp-autobuild 7078de4
Merge remote-tracking branch 'upstream/master' into develop
cp-autobuild 7e8941b
Added USAGE_AS_RONN param to Help.java and the ability to output ronn…
cp-autobuild a7c8115
Merge pull request #2 from snowell/feature/ronnOutput
mhgrove 5e055c0
Changed spaces to underscores in man page names because ronn requires…
cp-autobuild 1d06aca
Merge pull request #3 from snowell/feature/ronnUpdate
mhgrove 1186aa6
Fix Issue #26
rvesse a647950
Remove incorrect copyright header
rvesse 01a08f6
merging pull reset 4
mhgrove 625b14e
* Migrated to gradle.
a98e850
* Updating readme.
dbc26a1
* Updating artifactory settings.
688f62d
* Upgraded guava
594fe0c
Merge branch 'release/v0.7.3'
4e3cb51
Merge tag 'v0.7.3' into develop
5d8b5d1
* Added task for uploading to public repo.
1151003
Throw exception on unknown command instead of println so the appropri…
snowell 8cdac4f
Add SafeVarargs
leventov 53356ac
Upgrade Guava to 25.1-jre
leventov 0e4956e
Bump gradle and guava version
toktarev 6716aec
Update README.md
BenergySD 6c68253
Merge pull request #5 from BenergySD/patch-1
mhgrove 7d88040
Ben's changes for markdown support
PaulJackson123 39177f9
merge master and bens
noahgorstein 32cfe2c
add front matter to man pages for new docs
noahgorstein 22e83c3
Merge pull request #7 from stardog-union/benstuffs
snowell 77bcf5a
add meta description tags in manpages frontmatter
noahgorstein 56c2b2d
Merge pull request #8 from stardog-union/addMetaDescription
evren 9ea9379
Do away with matching end of group name
PaulJackson123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
apply plugin: 'java' | ||
apply plugin: 'idea' | ||
apply plugin: "maven" | ||
|
||
tasks.create(name: 'wrapper_task' ,type: Wrapper) { | ||
gradleVersion = '6.0.1' | ||
distributionUrl = "https://services.gradle.org/distributions/gradle-6.0.1-all.zip" | ||
} | ||
|
||
allprojects { | ||
group = "com.complexible.airline" | ||
sourceCompatibility = '1.8' | ||
targetCompatibility = '1.8' | ||
version = "0.8.1" | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
} | ||
|
||
ext { | ||
projectDescription = "Airline is a Java annotation-based framework for parsing Git like command line structures." | ||
projectUrl = "https://github.com/clarkparsia/airline" | ||
} | ||
|
||
|
||
dependencies { | ||
compile 'javax.inject:javax.inject:1' | ||
compile "com.google.guava:guava:27.0-jre" | ||
compile 'com.google.code.findbugs:jsr305:3.0.0' | ||
|
||
testCompile 'org.testng:testng:6.0.1' | ||
} | ||
|
||
if (project.hasProperty('artifactoryUrl') | ||
&& project.hasProperty('artifactoryUsername') | ||
&& project.hasProperty('artifactoryPassword')) { | ||
|
||
repoUpload(taskName: 'uploadArtifactory', | ||
url: artifactoryUrl, | ||
username: artifactoryUsername, | ||
password: artifactoryPassword) | ||
} | ||
|
||
if (project.hasProperty('publicRepository')) { | ||
repoUpload(taskName: 'uploadGithub', | ||
url: "file://localhost/$publicRepository") | ||
} | ||
|
||
def repoUpload(Map<String, String> options) { | ||
def taskName = options.taskName | ||
def repoUrl = options.url | ||
def username = null | ||
def passwd = null | ||
def auth = options.containsKey("username") && options.containsKey("password") | ||
if (auth) { | ||
username = options.username | ||
passwd = options.password | ||
} | ||
|
||
task(taskName, type: Upload) { | ||
configuration = configurations.archives | ||
repositories { | ||
mavenDeployer { | ||
repository(url: repoUrl) { | ||
if (auth) { | ||
authentication(userName: username, password: passwd) | ||
} | ||
} | ||
pom.project { | ||
name = archivesBaseName | ||
packaging = 'jar' | ||
description projectDescription | ||
url projectUrl | ||
} | ||
|
||
//mess with the generated pom to remove test dependencies from published artifacts | ||
pom.withXml { XmlProvider xmlProvider -> | ||
def xml = xmlProvider.asString() | ||
def pomXml = new XmlParser().parse(new ByteArrayInputStream(xml.toString().bytes)) | ||
|
||
pomXml.dependencies.dependency.each { dep -> | ||
if (dep.scope.text() != 'compile') { | ||
def parent = dep.parent() | ||
parent.remove(dep) | ||
} | ||
} | ||
|
||
// add exclusion nodes (only for compile conf) since the maven plugin | ||
// doesn't handle them as of gradle 1.9 | ||
project.configurations.compile.allDependencies.findAll { | ||
it instanceof ModuleDependency && !it.excludeRules.isEmpty() | ||
}.each { ModuleDependency dep -> | ||
def xmlDep = pomXml.dependencies.dependency.find { | ||
it.groupId[0].text() == dep.group && it.artifactId[0].text() == dep.name | ||
} | ||
def xmlExclusions = xmlDep.exclusions | ||
if (!xmlExclusions) xmlExclusions = xmlDep.appendNode('exclusions') | ||
|
||
dep.excludeRules.each { ExcludeRule rule -> | ||
def xmlExclusion = xmlExclusions.appendNode('exclusion') | ||
xmlExclusion.appendNode('groupId', rule.group) | ||
xmlExclusion.appendNode('artifactId', rule.module ?: '*') | ||
} | ||
} | ||
|
||
def newXml = new StringWriter() | ||
def printer = new XmlNodePrinter(new PrintWriter(newXml)) | ||
printer.preserveWhitespace = true | ||
printer.print(pomXml) | ||
xml.setLength(0) | ||
xml.append(newXml.toString()) | ||
} | ||
|
||
} | ||
} | ||
} | ||
} |
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,4 @@ | ||
publicRepository=/path/to/your/maven/checkout | ||
artifactoryUrl=/url/to/repo | ||
artifactoryUsername=user | ||
artifactoryPassword=secret |
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 @@ | ||
#Wed Feb 11 10:07:24 EST 2015 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Severe OSS Vulnerability:
pkg:maven/com.google.guava/[email protected]
0 Critical, 1 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies
Components
pkg:maven/com.google.guava/[email protected]
SEVERE Vulnerabilities (1)
The software creates a temporary file in a directory whose permissions allow unintended actors to determine the file's existence or otherwise access that file.
(at-me in a reply with
help
orignore
)Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]