fsprojects / FSharpLint

Lint tool for F#
https://fsprojects.github.io/FSharpLint/
MIT License
303 stars 73 forks source link

Trying to lint non-existing file or file with wrong extension results in exitCode=0 and no error (and dubious warning summary) #674

Closed knocte closed 8 months ago

knocte commented 8 months ago

Repro steps

Please provide the steps required to reproduce the problem

  1. dotnet fsharplint lint nonExistantProjectFile.fsproj Result: Could not find the file: nonExistantProjectFile.fsproj on disk (exitCode != 0)
  2. dotnet fsharplint lint nonExistantFSharpFile.fs Result: Could not find the file: nonExistantFSharpFile.fs on disk (exitCode != 0)
  3. dotnet fsharplint lint nonExistantFileWithNoExtension
  4. dotnet fsharplint lint existingFileButNonFSharpFile.zip

Expected behavior

After step 3: it should print Could not find the file: nonExistantFileWithNoExtension on disk and (exitCode != 0) After step 4: it should print File extension not recognised. Valid extensions: .fs, .fsx, .fsproj, .sln and (exitCode != 0)

Actual behavior (after step 3, and after step 4)

========== Linting /home/user/Dog.Test.fsx ==========
========== Finished: 0 warnings ==========
========== Summary: 0 warnings ==========

Known workarounds

Please provide a description of any known workarounds.

Related information