pantajoe / vscode-elixir-credo

VSCode support for Elixir Linter 'Credo'.

Home Page:https://marketplace.visualstudio.com/items?itemName=pantajoe.vscode-elixir-credo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong errors reported in VSCode

lobo-tuerto opened this issue · comments

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

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. 🤔

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

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

rrrene/credo#1115

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.