chappertron / lammps-analyser

A linter for the LAMMPS scripting language
GNU General Public License v2.0
0 stars 0 forks source link

Odd behaviour with fix argument verification. #5

Closed chappertron closed 2 months ago

chappertron commented 9 months ago

The issue

Running the lsp isn't properly showing issues in an invalid NH fix.

In LSP mode, they show up with a delay after resetting the file type. They then persist and don't disappear.

It could be related to panics that occur when unwrapping the ident of a fix command that is partially written. See here

chappertron commented 2 months ago

This was fixed a while ago. The issue was there were unwraps in the conversion between the tree-sitter tree and the AST that caused the server to crash when partial/incorrect input was provided. This will be prevented in the future by enforcing #![deny(clippy::unwrap_used)] and #![deny(clippy::expect_used)] in the AST module .