Workers Auto Approve
Check for incompatible CLI arguments
Java, CLI, Kernel, Config, Unit Test, Testing
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`](https://github.com/aionnetwork/aion/blob/f1db3deae290ef7b49cc1d47a7418e28e09e198e/modAionImpl/src/org/aion/zero/impl/cli/Cli.java#L85-L417) from the class [`Cli.java`](https://github.com/aionnetwork/aion/blob/master-pre-merge/modAionImpl/src/org/aion/zero/impl/cli/Cli.java) to determine which combinations of command line arguments are incompatible.
* Add a new method `checkArguments(Arguments givenOptions)` to the class [`Cli.java`](https://github.com/aionnetwork/aion/blob/master-pre-merge/modAionImpl/src/org/aion/zero/impl/cli/Cli.java) that should be called after the [command line parser call](https://github.com/aionnetwork/aion/blob/f1db3deae290ef7b49cc1d47a7418e28e09e198e/modAionImpl/src/org/aion/zero/impl/cli/Cli.java#L89) where the program arguments are checked and a warning message is printed signaling that incompatible options were given.
* 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](https://github.com/aionnetwork/aion/wiki/Aion-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
Details regarding this issue can be requested in comments.
Further technical support is available through [Gitter](https://gitter.im/aionnetwork/Lobby).
Setup your profile
Tell us a little about you:
No results found for
Type to search skills..
Required [[totalcharacter]] / 240
Are you currently looking for work?
[[ option.string ]]
Setup your profile
Our tools are based on the principles of earn (💰), learn (📖), and meet (💬).
Select the ones you are interested in. You can change it later in your settings.
I'm also an organization manager looking for a great community.
Enable your organization profile
Gitcoin products can help grow community around your brand. Create your tribe, events, and incentivize your community with bounties. Announce new and upcoming events using townsquare. Find top-quality hackers and fund them to work with you on a grant.
These are the organizations you own. If you don't see your organization here please be sure that information is public on your GitHub profile. Gitcoin will sync this information for you.
Select the products you are interested in:
Out of the box you will receive Tribes Lite for your organization. Please provide us with a contact email: