rvesse / airline

Java annotation-based framework for parsing Git like command line structures with deep extensibility
https://rvesse.github.io/airline/
Apache License 2.0
128 stars 20 forks source link

added channel implementation which allows other targets as System.out #78

Closed sdorra closed 6 years ago

sdorra commented 6 years ago

I'm planning an client server application which does the command application on the server side. The client sends the command line arguments to the server and the server parses the argument and executes the command.

The problem is that some of the internal classes uses System.out, which does not work in such an environment.

I've created a Channels class which replaces all System.out calls in airline. The Channels class is able to get an implementation of a ChannelFactory via java 6 ServiceLoader mechanism, the default implementation of the ChannelFactory uses System.out.

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 371


Changes Missing Coverage Covered Lines Changed/Added Lines %
airline-core/src/main/java/com/github/rvesse/airline/Channels.java 8 9 88.89%
airline-core/src/main/java/com/github/rvesse/airline/help/suggester/SuggestCommand.java 0 1 0.0%
airline-core/src/main/java/com/github/rvesse/airline/help/common/AbstractCommandGroupUsageGenerator.java 0 1 0.0%
airline-core/src/main/java/com/github/rvesse/airline/help/common/AbstractGlobalUsageGenerator.java 0 1 0.0%
airline-core/src/main/java/com/github/rvesse/airline/help/common/AbstractCommandUsageGenerator.java 1 2 50.0%
airline-core/src/main/java/com/github/rvesse/airline/help/Help.java 8 14 57.14%
<!-- Total: 21 32 65.63% -->
Totals Coverage Status
Change from base Build 366: 0.03%
Covered Lines: 5419
Relevant Lines: 7235

💛 - Coveralls
coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 371


Changes Missing Coverage Covered Lines Changed/Added Lines %
airline-core/src/main/java/com/github/rvesse/airline/Channels.java 8 9 88.89%
airline-core/src/main/java/com/github/rvesse/airline/help/suggester/SuggestCommand.java 0 1 0.0%
airline-core/src/main/java/com/github/rvesse/airline/help/common/AbstractCommandGroupUsageGenerator.java 0 1 0.0%
airline-core/src/main/java/com/github/rvesse/airline/help/common/AbstractGlobalUsageGenerator.java 0 1 0.0%
airline-core/src/main/java/com/github/rvesse/airline/help/common/AbstractCommandUsageGenerator.java 1 2 50.0%
airline-core/src/main/java/com/github/rvesse/airline/help/Help.java 8 14 57.14%
<!-- Total: 21 32 65.63% -->
Totals Coverage Status
Change from base Build 366: 0.03%
Covered Lines: 5419
Relevant Lines: 7235

💛 - Coveralls
rvesse commented 6 years ago

Thanks for the contribution. Lovely elegant solution to the problem!