question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Check for incompatible CLI arguments

See original GitHub issue

Introduction

This bounty request is geared towards improving the overall user experience of interacting with the Kernel through the command line options. We are constantly looking to improve and enhance features that will accelerate the development for Aion users.

Current situation

The current CLI implementation provides correct behavior by ignoring errors the user may make in selecting options that are incompatible with one another. When incompatible options are provided, only one of the options will be executed. The option that will be executed depends on the functionality ordering inside the class implementation, not on the order of the given arguments. This situation may lead some users to be puzzled by the execution behavior and can be remedied by printing warning messages in case of incompatible arguments as described below.

Task Description

  • Analyse the method call from the class Cli.java to determine which combinations of command line arguments are incompatible.
  • Add a new method checkArguments(Arguments givenOptions) to the class Cli.java that should be called after the command line parser call where the program arguments are checked and a warning message is printed signaling that incompatible options were given.
  • Example:
    • The current functionality allows only one of the account options to be executed by a program call. The option to be executed depends on the ordering inside the class, not on the order of the given arguments. Therefore if a user runs the command ./aion.sh -a list -a create the list accounts option will be ignored and the program will proceed to creating a new account. The new functionality introduced here should ensure that a meaningful message is printed for the user before the create account functionality is triggered. The message for this task would be: The given arguments «-a list» and «-a create» require incompatible tasks. Only «-a create» will be executed.
  • The functionality must be accompanied by unit tests for the checkArguments method that provide full coverage of the method and illustrate how it handles varying numbers of incompatible options.

Acceptance Criteria

  • The code implements the targets described above.
  • The code is well documented and fully covered by unit tests.
  • The code is compliant with Aion’s code conventions.
  • The code gets merged into the main code repository.

Required Skill

Users must have the following skills and experience:

  • Java software development
  • Debugging and unit testing

Guidance

Details regarding this issue can be requested in comments. Further technical support is available through Gitter.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
Destinercommented, Nov 1, 2018

Seems like PR is merged @AlexandraRoatis.

0reactions
kzeinecommented, Nov 2, 2018

The work for this bounty has been completed and merged for this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incompatible command arguments for netstat? - Super User
1.1 just displays the command-line parameters with descriptions like if you'd just typed netstat without any arguments. Why is this the case?
Read more >
Exim: incompatible command-line options or arguments
Hello, default queue and pending stopped yesterday from last update of Cpanel/MailScanner FE: I can´t deliver all Messages in queue from WHM ...
Read more >
Unix/C command line arguments: Every single function has ...
I am supposed to take in arguments from the command line, to build a sample Unix-style 'ls' style program that lists the directory...
Read more >
Resolve an Amazon RDS instance that is in an incompatible ...
Choose Parameter group actions, and then choose Edit. Enter the valid parameter values, and then choose Save Changes.
Read more >
Command-line syntax overview for System.CommandLine
An introduction to the command-line syntax that the System.CommandLine library recognizes by default. Mentions exceptions where syntax in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found