Skip to content
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

feat: introduce ArgumentContext to replace ArgumentTiming #461

Merged
merged 3 commits into from
Jul 28, 2023

Commits on Jul 28, 2023

  1. feat: introduce ArgumentContext to replace ArgumentTiming

    The commit introduces the ArgumentContext class, deprecating the ArgumentTiming functionality in the CommandContext.java file, providing a comprehensive log of consumed inputs and parsing duration. This change enhances the precision and maintainability by providing more details about the argument parsing stage. CommandTree.java is also updated to adopt ArgumentContext in place of ArgumentTiming during parsing, while ArgumentContext.java is a new file introduced to store specific details about each argument's consumption of input and its parse times.
    Citymonstret committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    6448e58 View commit details
    Browse the repository at this point in the history
  2. Add access to consumed inputs in ArgumentContext

    The updated ArgumentContext.java now includes a new function that allows the retrieval of a list of consumed inputs. This modification was implemented to improve argument parsing, making it easier to discern and analyse the exact sequence of inputs consumed by an argument during the parsing stage, therefore enhancing the application's logging detail and command processing accountability.
    Citymonstret committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    d23e423 View commit details
    Browse the repository at this point in the history
  3. Add ArgumentContext unit tests

    Unit tests for the ArgumentContext class were added to ensure that its functionalities, such as "consumedInput" and "exactAlias", are working correctly. This includes testing the command building and execution process. This will help in quickly identifying and fixing any potential issues in the future.
    Citymonstret committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    3762677 View commit details
    Browse the repository at this point in the history