Skip to content

5 Fix interpretation of argument to parameter 'out'. #6

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions src/main/java/javancss/Javancss.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.OptionBuilder;
import static org.apache.commons.cli.Option.builder;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;

Expand Down Expand Up @@ -619,19 +619,19 @@ public Javancss( String[] args, String sRcsHeader_ ) throws IOException
public Javancss( String[] args ) throws IOException
{
Options options = new Options();
options.addOption( OptionBuilder.create( "help" ) );
options.addOption( OptionBuilder.create( "version" ) );
options.addOption( OptionBuilder.create( "debug" ) );
options.addOption( OptionBuilder.withDescription( "Counts the program NCSS (default)." ).create( "ncss" ) );
options.addOption( OptionBuilder.withDescription( "Assembles a statistic on package level." ).create( "package" ) );
options.addOption( OptionBuilder.withDescription( "Counts the object NCSS." ).create( "object" ) );
options.addOption( OptionBuilder.withDescription( "Counts the function NCSS." ).create( "function" ) );
options.addOption( OptionBuilder.withDescription( "The same as '-function -object -package'." ).create( "all" ) );
options.addOption( OptionBuilder.withDescription( "Opens a GUI to present the '-all' output in tabbed panels." ).create( "gui" ) );
options.addOption( OptionBuilder.withDescription( "Output in XML format." ).create( "xml" ) );
options.addOption( OptionBuilder.withDescription( "Output file name. By default output goes to standard out." ).create( "out" ) );
options.addOption( OptionBuilder.withDescription( "Recurse to subdirs." ).create( "recursive" ) );
options.addOption( OptionBuilder.withDescription( "Encoding used while reading source files (default: platform encoding)." ).hasArg().create( "encoding" ) );
options.addOption( builder( "help" ).build() );
options.addOption( builder( "version" ).build() );
options.addOption( builder( "debug" ).build() );
options.addOption( builder( "ncss" ).desc( "Counts the program NCSS (default)." ).build() );
options.addOption( builder( "package" ).desc( "Assembles a statistic on package level." ).build() );
options.addOption( builder( "object" ).desc( "Counts the object NCSS." ).build() );
options.addOption( builder( "function" ).desc( "Counts the function NCSS." ).build() );
options.addOption( builder( "all" ).desc( "The same as '-function -object -package'." ).build() );
options.addOption( builder( "gui" ).desc( "Opens a GUI to present the '-all' output in tabbed panels." ).build() );
options.addOption( builder( "xml" ).desc( "Output in XML format." ).build() );
options.addOption( builder( "out" ).desc( "Output file name. By default output goes to standard out." ).hasArg().argName("outFile").build() );
options.addOption( builder( "recursive" ).desc( "Recurse to subdirs." ).build() );
options.addOption( builder( "encoding" ).desc( "Encoding used while reading source files (default: platform encoding)." ).hasArg().argName("encoding").build() );

CommandLine cl;

Expand Down