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

Add command-line parser #123

Merged
merged 39 commits into from
Aug 13, 2021
Merged

Add command-line parser #123

merged 39 commits into from
Aug 13, 2021

Commits on Aug 9, 2021

  1. Add command-line parser

    Port of godotengine/godot#44594 to Godot 3.x.
    
    Co-authored-by: Shatur95 <genaloner@gmail.com>
    Co-authored-by: lupoDharkael <izhe@hotmail.es>
    3 people committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    d7d64e2 View commit details
    Browse the repository at this point in the history
  2. Remove override keywords in CommandLineParser

    Not properly supported in Godot 3.x.
    Xrayez committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    c2fc422 View commit details
    Browse the repository at this point in the history
  3. Fix shadowed variable when comparing option names

    Note: this could be ported to simple `PackedStringArray` equality comparison in Godot 4.0.
    
    [tests skip]
    Xrayez committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    c7ff6ab View commit details
    Browse the repository at this point in the history
  4. Formatting and style changes to CommandLineParser

    [tests skip]
    Xrayez committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    6f8d80a View commit details
    Browse the repository at this point in the history
  5. Fix typo in get_occurrence_count in CommandLineParser

    [tests skip]
    Xrayez committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    e10edfd View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    416d1e2 View commit details
    Browse the repository at this point in the history
  7. Rename parse_args to parse in CommandLineParser

    Consistent with other parsers in Godot, such as json/xml.
    
    [tests skip]
    Xrayez committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    807c142 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4fe0eb3 View commit details
    Browse the repository at this point in the history
  9. Rename get_error() to get_error_text() in CommandLineParser

    Consistent with `Expression.get_error_text()`, and `CommandLineParser`'s own `get_help_text()`.
    
    [tests skip]
    Xrayez committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    02d8645 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7be1c72 View commit details
    Browse the repository at this point in the history
  11. Rename more method in CommandLineParser

    `get_values/prefixes()` to `get_value/prefix_list()`, make consistent with other `_list()` methods on Godot.
    
    `get_forwarded_args()` to `get_forwarding_args()`, make consistent with `allow_forwarding_args` property.
    Xrayez committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    df0a2b3 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    db474d3 View commit details
    Browse the repository at this point in the history
  13. Remove dead code related to checkers in CommandLineParser

    These are not so trivial to implement in Godot 3.x since there's no Callable, which is Godot 4.x feature, and it might be better to see whether checher functionality is really needed in the first place, since validation is also possible to do via code after parsing, which is user-specific.
    Xrayez committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    d074e05 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    9c02f16 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    e0f102a View commit details
    Browse the repository at this point in the history
  16. Update docs for CommandLineParser

    [ci skip]
    Xrayez committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    66e37de View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    7141f6e View commit details
    Browse the repository at this point in the history
  18. Merge validate() into parse() in CommandLineParser

    There's not much benefit in separating the two, and in most cases makes API more confusing. Current parsing code validates arguments as well anyways.
    Xrayez committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    8b01b14 View commit details
    Browse the repository at this point in the history
  19. Add new_option() to CommandLineParser

    Allows to conveniently add new options without instantiating `CommandLineOption` classes manually.
    Xrayez committed Aug 9, 2021
    Configuration menu
    Copy the full SHA
    dcf414e View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    d6cb740 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    1a0fa2d View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    093b4d2 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2021

  1. Configuration menu
    Copy the full SHA
    76a7e5c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b66bbef View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    05f4b44 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2021

  1. Configuration menu
    Copy the full SHA
    1b77d73 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b05da1d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    514d73b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ff7ee37 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2021

  1. Add utility methods for CommandLineOption

    When declarative approach is not enough.
    Xrayez committed Aug 12, 2021
    Configuration menu
    Copy the full SHA
    1a41e9d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2eeadba View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8e4595c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    558dd3d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    37b7478 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f539979 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a4859a6 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2021

  1. Configuration menu
    Copy the full SHA
    20d3a30 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    90ea98a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9340536 View commit details
    Browse the repository at this point in the history