commandlineparser / commandlineparser/commandline
ushort and short not supported
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 478
- PR merge metrics
- No merged PRs in 30d
Description
```
class Options
{
[Option('p', "port", Required = false, HelpText = "port number")]
public int Port { get;set; }
}
```
If i change the type of Port to ushort or short I get an error when starting the program:
"ERROR(S):
Error setting value to option 'p, port': Check if Option or Value attribute values are set
properly for the given type."
Expected behavior:
1. clear error message that the type is not supported
2. support the types ushort and short
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the reported error with the C# Options example, changing Port between int, ushort, and short. Trace the option value conversion and error-reporting path; done means ushort and short work or receive a clear unsupported-type message, with tests covering both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100