Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server is sending diagnostics without a character field #1393

Closed
ram02z opened this issue Dec 18, 2021 · 6 comments
Closed

Server is sending diagnostics without a character field #1393

ram02z opened this issue Dec 18, 2021 · 6 comments
Labels
bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@ram02z
Copy link

ram02z commented Dec 18, 2021

I'd like to preface that I am using the server packaged in https://github.com/hrsh7th/vscode-langservers-extracted. However, I thought this might still be an issue since the Neovim development team has said that LSPs should specify a column in their diagnostics.

Reference:
neovim/neovim#16673 (comment)
neovim/neovim#16675

@dbaeumer
Copy link
Member

dbaeumer commented Jan 3, 2022

@ram02z can you please provide me with the example code where this is happending since the npm ESLint module should have never generated this and I would like to forward the issue to the ESLint team.

@dbaeumer
Copy link
Member

dbaeumer commented Jan 3, 2022

And I actually sanitize missing values to zero here:

const startLine = Is.nullOrUndefined(problem.line) ? 0 : Math.max(0, problem.line - 1);

So I would really like to understand why this is happening.

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label Jan 3, 2022
@ram02z
Copy link
Author

ram02z commented Jan 3, 2022

@dbaeumer sure.

Here is the file: https://gist.github.com/ram02z/e85910e6b8aa1044637607c5c950f595

Here are the neovim lsp logs that have a missing column: https://gist.github.com/ram02z/b11a3bbd53211d0199a13b32ad1e7a81

@dbaeumer
Copy link
Member

dbaeumer commented Jan 3, 2022

@ram02z thanks for the file. But it is not enough to reproduce this. It looks like it depends on some configuration files / plugins / eslint version. Can you provide me with a GitHub repository I can clone that demos this?

@ram02z
Copy link
Author

ram02z commented Jan 3, 2022

@dbaeumer You were right about the error depending on configuration/plugins.

Seems like the eslint-plugin-jsdoc plugin was causing the issue when the file was opened with the following eslintrc.json file.

{
  "parserOptions": {
    "ecmaVersion": 12,
    "sourceType": "module"
  },
  "plugins": ["jsdoc"],
  "rules": {
    "jsdoc/valid-types": 1
  }
}

The ESLint version is 8.6.0

@dbaeumer
Copy link
Member

dbaeumer commented Jan 4, 2022

Thanks, was able to reproduce. The problem is that the jsdoc extension sets the values to NaN which is of type number in JS.

@dbaeumer dbaeumer added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Jan 4, 2022
@dbaeumer dbaeumer added this to the 2.2.3 milestone Jan 4, 2022
@dbaeumer dbaeumer modified the milestones: 2.2.next, 2.2.6 Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants