FSharpLint
FSharpLint copied to clipboard
CLI tool: add flag to print ONLY warnings
Description
The current output of the CLI tool includes the lint progress and result for every file. It would be nice to have a way to filter out successful results and only print the warnings.
Repro steps
- dotnet fsharplint -f "foo.fsproj"
Expected behavior
========== Linting File2.fs ==========
blah
========== Finished: 1 warnings ==========
========== Summary: 1 warnings ==========
Actual behavior
========== Linting File1.fs ==========
========== Finished: 0 warnings ==========
========== Linting File2.fs ==========
blah
========== Finished: 1 warnings ==========
========== Linting File3.fs ==========
========== Finished: 0 warnings ==========
========== Summary: 1 warnings ==========
Known workarounds
Piping the output into another tool, i.e. grep:
dotnet fsharplint -f "foo.fsproj" | grep -Pzo '(?s)=+ Linting (\N*) =+\n(?!=+ Finished: 0 warnings =+\n).*?=+ Finished: [^0] warnings =+\n'
Related information
- Operating system: Windows 10 Pro
- dotnet-fsharplint version: 0.11.1
- .NET Core version: 2.1.505
Curious, was there any change here?
Meantime kudos @Kelvin4702 for a workaround!