pantajoe / vscode-elixir-credo

VSCode support for Elixir Linter 'Credo'.
https://marketplace.visualstudio.com/items?itemName=pantajoe.vscode-elixir-credo
MIT License
29 stars 8 forks source link

Wrong errors reported in VSCode #465

Closed lobo-tuerto closed 4 months ago

lobo-tuerto commented 7 months ago

I have set up a new Phoenix project, added credo as a dependency, then installed this VSCode extension to get info/hints on code style violations.

But, inside VSCode I get a squiggly line on every defmodule with a false positive, for example:

Test files should end with .exs (warning:Credo.Check.Warning.WrongTestFileExtension)
Simulation.Core.Vector2D

Which in itself is wrong, since that's not a test file (lib/simulation/core/vector_2d.ex). I've tried restarting the extension host, and the Elixir language server but the spurious report persist.

Running mix credo --strict from the CLI does not yield those errors, so I think it's related to the extension or configuration maybe?

Any recommendations or pointers on what could be wrong, or how to debug what's going on?

Cheers, VA

lobo-tuerto commented 7 months ago

Additionally, in test files I get these:

Test files should end with .exs (warning:Credo.Check.Warning.WrongTestFileExtension)
Modules should have a @moduledoc tag. (readability:Credo.Check.Readability.ModuleDoc)
Simulation.Core.Vector2DTest

Those are for: test/simulation/core/vector_2d_test.exs.

Which both seem wrong. :thinking:

reid-rigo commented 7 months ago

I'm seeing this as well. It appears to be caused by #464

Morgahl commented 5 months ago

This has been addressed in the credo source repo as of 1.7.5 if you want to step your version min.

https://github.com/rrrene/credo/issues/1115

pantajoe commented 4 months ago

Since there's no further activity since, I'll assume that 1.7.5 solved this issue and after addressing #464 this issue would be a duplicate, therefore, I'll close this one.