Skip to content

Conversation

@Mersho
Copy link
Contributor

@Mersho Mersho commented Jan 16, 2024

Improved warning reporting to display line number and column
in the format: fileName.fs(lineNumber, column).

This feature is particularly useful in environments like
VSCode, which highlights these locations and makes them
clickable. When clicked, VSCode will open the corresponding
file at the exact line and position of the cursor.
This functionality allows developers to quickly navigate to the
source of the issue, significantly speeding up the
debugging process.

@Mersho
Copy link
Contributor Author

Mersho commented Jan 16, 2024

Also we could use workflow annotations, but it would cause extra warnings. This is because the "SelfCheck" step runs three times, once for each operating system and we may encounter additional and repetitive warnings.

@Mersho Mersho force-pushed the UpdateWarnings branch 4 times, most recently from f8e42d8 to 0004f69 Compare January 16, 2024 10:05
@knocte
Copy link
Collaborator

knocte commented Jan 16, 2024

This is because the "SelfCheck" step runs three times, once for each operating system and we may encounter additional and repetitive warnings.

I don't understand this claim.

Copy link
Collaborator

@xperiandri xperiandri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase, please

Improved warning reporting to display line number and column
in the format: `fileName.fs(lineNumber, column)`.

This feature is particularly useful in environments like
VSCode, which highlights these locations and makes them
clickable. When clicked, VSCode will open the corresponding
file at the exact line and position of the cursor.
This functionality allows developers to quickly navigate to the
source of the issue, significantly speeding up the
debugging process.
@Mersho
Copy link
Contributor Author

Mersho commented Jul 18, 2025

I rebased, and here is what the new warning message looks like:

$ dotnet run --project .\src\FSharpLint.Console\ --framework net9.0 lint C:\Users\PC\source\repos\FSharpLint\tests\FSharpLint.Benchmarks\Benchmark.fs
========== Linting C:\Users\PC\source\repos\FSharpLint\tests\FSharpLint.Benchmarks\Benchmark.fs ==========
`x = true` might be able to be refactored into `x`.
Error on line 14 starting at column 43: C:\Users\PC\source\repos\FSharpLint\tests\FSharpLint.Benchmarks\Benchmark.fs(14,43)
        let checker = FSharpChecker.Create(keepAssemblyContents=true)
                                           ^
See https://fsprojects.github.io/FSharpLint/how-tos/rules/FL0065.html
--------------------------------------------------------------------------------
========== Finished: 1 warnings ==========
========== Summary: 1 warnings ==========

@xperiandri
Copy link
Collaborator

But at the beginning of the output, there is a line ========== Linting C:\Users\PC\source\repos\FSharpLint\tests\FSharpLint.Benchmarks\Benchmark.fs ==========
And MSBuild output format switch already defines a very similar format.
I don't think that this change makes sense

Could you compare your new output to the output with -f msbuild switch and check if it meets your needs?

@knocte
Copy link
Collaborator

knocte commented Nov 17, 2025

I don't think that this change makes sense

Agreed, sorry.

@knocte knocte closed this Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants