language-tools
language-tools copied to clipboard
Warn about floating comments
Floating comments are removed when you introspect:
model User {
// I float!
}
Would be good to have a warning in VS Code so that users aren't confused when certain comments disappear.
This feels like a bandaid to me. My preference would be to fix the AST with a specific Comment node for floating comments.
Free-floating comments are useful for documenting what the datamodel does or who's the primary owner of the datamodel.
// This datamodel powers our recommendation engine.
//
// Owners:
// Mark <[email protected]>
// Alice <[email protected]>
// Nicole <[email protected]>
model User {
}
Since our Schema language is rather simple, we'd need Comment nodes in only two places: outside the blocks and inside.