fsprojects / fsprojects/FSharpLint
Should check for existence of --argument instead of fallingback to <inline source>?
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 327
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Description
Given this current behaviour of fsharplint:
% dotnet fsharplint test
ERROR: unrecognized argument: 'test'.
USAGE: fsharplint [--help] [--format <standard|msbuild>] [--version] [<subcommand> [<options>]]
SUBCOMMANDS:
lint <options> Runs FSharpLint against a file or a collection of files.
Use 'fsharplint <subcommand> --help' for additional information.
OPTIONS:
--format, -f <standard|msbuild>
Output format of the linter.
--version Prints current version.
--help display this list of options.
And this:
% dotnet fsharplint --hlep
ERROR: unrecognized argument: '--hlep'.
USAGE: fsharplint [--help] [--format <standard|msbuild>] [--version] [<subcommand> [<options>]]
SUBCOMMANDS:
lint <options> Runs FSharpLint against a file or a collection of files.
Use 'fsharplint <subcommand> --help' for additional information.
OPTIONS:
--format, -f <standard|msbuild>
Output format of the linter.
--version Prints current version.
--help display this list of options.
And this:
% dotnet fsharplint lint --help
USAGE: fsharplint lint [--help] [--lint-config <lintConfig>] [--file-type <project|solution|file|source>] <target>
TARGET:
<target> Input to lint.
OPTIONS:
--lint-config, -l <lintConfig>
Path to the config for the lint.
--file-type <project|solution|file|source>
Input type the linter will run against. If this is not set, the file type will be inferred from the file extension.
--help display this list of options.
Then, it's only logical to assume that, executing command dotnet fsharplint lint --hlep (current results: ========== Linting <inline source> ==========\n========== Finished: 0 warnings ==========\n========== Summary: 0 warnings ==========) should return something like:
ERROR: unrecognized argument: '--hlep'.
USAGE: fsharplint lint [--help] [--lint-config <lintConfig>] [--file-type <project|solution|file|source>] <target>
TARGET:
<target> Input to lint.
OPTIONS:
--lint-config, -l <lintConfig>
Path to the config for the lint.
--file-type <project|solution|file|source>
Input type the linter will run against. If this is not set, the file type will be inferred from the file extension.
--help display this list of options.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with dotnet fsharplint lint --hlep, then locate the lint subcommand entry point and its argument parsing. Check how an unrecognized option falls through to inline-source linting. Done means invalid options produce the documented error and usage output instead of linting empty inline source.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100