chappertron / lammps-analyser

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

Warn against & in comments. Causes multiline comments... #14

Open chappertron opened 1 month ago

chappertron commented 1 month ago

Either this needs to be supported in the grammar and identified as such, or needs to be explicitly warned against in the lsp.

The problem is the following

# my comment &
some_command

is interpreted by LAMMPS as a multiline comment with the following literal contents,

my comment 
some_command

Either the grammar needs to highlight as some_command as a comment or the lsp should warn that this may not be intended It can then suggest either removing the & or adding a newline between commands. I don't know how well used or known this is, so it might be better to do the latter and suggest explicitly leading with #