You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to add this lovely plugin to my setup on Windows today but have been having trouble that seems weird...
So I'm interested in the cmakelint linter but can't get nvim-lint to publish any diagnostics due to the file paths getting mangled.
I am able to verify that cmakelint is being run, and I am getting results back, for me they look like this:
F:\dev\cpp\project\CMakeLists.txt:8: Line ends in whitespace [whitespace/eol]
F:\dev\cpp\project\CMakeLists.txt:10: Line ends in whitespace [whitespace/eol]
F:\dev\cpp\project\CMakeLists.txt:36: Do not mix upper and lower case commands [readability/mixedcase]
...
captures.file begins with \ not / so the cwd gets prepended to it, creating an obviously wrong path (F:/dev/cpp/project/dev/cpp/project/CMakeLists.txt)
Even if that wasn't triggered, the later comparison to buffer_path would still fail due to the missing drive letter.
So perhaps it's just a regex issue slicing off the drive letter, but how did #435 not immediately uncover this, and mypy has the same regex problem, so how did #513 fix the authors problem!?
Is this my machine/config being weird, a skill issue, or is it genuinely just broken?
I've managed to hack the things around to fix my problems 😄. Will wait for a response here before opening a PR though.
The text was updated successfully, but these errors were encountered:
I've been trying to add this lovely plugin to my setup on Windows today but have been having trouble that seems weird...
So I'm interested in the
cmakelint
linter but can't get nvim-lint to publish any diagnostics due to the file paths getting mangled.I am able to verify that
cmakelint
is being run, and I am getting results back, for me they look like this:After the parser I get results of the form:
Notice that the file path has no drive letter.
Later on, this path gets compared to
buffer_path
, which is set here:nvim-lint/lua/lint/parser.lua
Line 114 in e824adb
For myself that evaluates to
F:\dev\cpp\project\CMakeLists.txt
Now we come to that part that causes nothing to be returned
nvim-lint/lua/lint/parser.lua
Lines 69 to 79 in e824adb
captures.file
begins with\
not/
so the cwd gets prepended to it, creating an obviously wrong path (F:/dev/cpp/project/dev/cpp/project/CMakeLists.txt
)Even if that wasn't triggered, the later comparison to
buffer_path
would still fail due to the missing drive letter.So perhaps it's just a regex issue slicing off the drive letter, but how did #435 not immediately uncover this, and mypy has the same regex problem, so how did #513 fix the authors problem!?
Is this my machine/config being weird, a skill issue, or is it genuinely just broken?
I've managed to hack the things around to fix my problems 😄. Will wait for a response here before opening a PR though.
The text was updated successfully, but these errors were encountered: