/commandlineparser-subverbextension

Extension methods to help with parsing subverbs using the .NET CommandLineParser library.

Primary LanguageC#MIT LicenseMIT

Subverbs extension for CommandLineParser

Nuget (with prereleases) Nuget (with prereleases)
Sonar Quality Gate Sonar Documented API Density Azure DevOps coverage (branch)

This project contains a library with extension methods to help with parsing subverbs using the .NET CommandLineParser library.

Subverb structures are currently not officially supported in CommandLineParser and the feature is being tracked in this issue here.

Until an official solution has been implemented you can use this library to nest and group verbs as deeply as you desire without breaking, for example, the auto help.

Build Status

Branch Status
master Build status
develop Build status

How To Use

See the links below for an example in one of the supported languages.

Build Instructions

Prerequisites

The .NET Core SDK and .NET Framework Dev Pack can also be installed via the Visual Studio installer.

Visual Studio

Open the solution and build like normal.
NuGet packages will be located in the bin folders.

Cake

Run one of the targets below by calling build.ps1 from a powershell prompt:

>.\build.ps1 -Target <Target here>
Target Does
Build Builds the solution.
Test Builds and tests the solution.
Publish Versions the assemblies based on the current tag by modifying Directory.Build.props, builds/tests the solution and copies the artifacts to ./publish.

WARNING: Cleans the repository via git clean -xdf. Make sure unadded files are committed first.

Contributing

Contributions are welcome, thanks for wanting to help out!

To make your contribution as smooth as possible for both of us please follow the guidelines below.

  • File an issue stating what currently isn't working for you (perferably with a pseudo code example of the verbs, parser settings and commandline calls that were used).
  • If you decide to fix it yourself:
    • Thanks :)
    • Create a branch based on develop instead of master.
    • Add some tests to test your fix or feature (at least one that tests the code example from your issue).
    • Submit a pull request while targeting the develop branch.
    • I'll try to review it as soon as I have time (usually during the weekend).

Note that, because this project is only an extension, issues might also be caused by CommandLineParser itself. Please confirm that your issue is not already a known issue there before filing an issue on this project.