-
Notifications
You must be signed in to change notification settings - Fork 73
Console: print help on unrecognized argument #816
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
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| [<Test>] | ||
| member _.InvalidArgument() = | ||
| let invalidArgument = $"lint --framework net8.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@webwarrior-ws please remove this part of the test, it's too confusing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced with "--invalidArg someValue"
e69d69b to
636c9f6
Compare
|
CI failure unrelated to the PR. |
Kinda disagree. Anyway let's just cherry-pick commit ee14b6d here to make it pass, and we will rebase later depending on what PR we merge first. |
No, that error I already fixed. Now it's failing |
|
Let's look at the logs to investigate. Save the logs to your computer. After that, let's retry CI again to see if the error is deterministic. |
CI of the last commit in the branch is green. Also I remember seeing this error in CI from time to time without particular reason. |
Ok, that proves that the issue is non-deterministic.
You're referring to this bug: #763 and I fixed it (or mitigated it, in case this error is the same) here: 8c60856 So, as I said, please gather the logs of this failed run to investigate them (before pushing anything here and losing them). If the issue is the same as bug 763, upload those logs to that github issue and reopen it, and we continue investigating there. |
That github issue also says in the title "... instead of fallingback to |
Added comment to issue 763 with logs of failed run. I don't have permissions to reopen it. |
e52d051 to
011311b
Compare
Added a commit for that. |
Added a test that checks if passing invalid argument(s) to "fsharplint lint" results in "unrecognized argument" error.
011311b to
e290e99
Compare
If unknown named argument is passed to "fsharplint lint" or several targets are passed instead of one, show "unrecognized argument" error and print usage. Declare parser beforehand so that it can be used in other functions e.g. to print usage. Fixes fsprojects#800
Also lint single file instead of project because project is using .NET 9 and that leads to error: ``` The current .NET SDK does not support targeting .NET 9.0. Either target .NET 8.0 or lower, or use a version of the .NET SDK that supports .NET 9.0. Download the .NET SDK from https://aka.ms/dotnet/download ```
When target type cannot be determined. Instead, show an error prompting to explicitly set input type using --file-type parameter.
6104cc3 to
11dafb4
Compare
If unknown named argument is passed to "fsharplint lint" or several targets are passed instead of one, show "unrecognized argument" error and print usage.
Fixes #800