Open rafaeltab opened 4 months ago
I've moved away from regex-based comment extraction in favor of using Tree-sitter. You can see examples in the internal/lint/code
package.
Dart actually uses markdown inside their comments, I was not sure how to make it recognize it as such. Comments are only interpreted as normal text.
Vale can handle this for all supporting languages.
Oh awesome! I actually looked at adding dart support before, and found a branch with treesitter, but then I couldn't find it this time. I'll get right on implementing this.
Hey, I wanted to have support for the dart language, so I added it. Please let me know if I missed something.
I added
inBlock
to thecomments.go
file because when using a/**
comment people often add a*
prefix as such:This is removed by the
inBlock
regex.In the
format.go
file I did not add this, as it seems that each regex includes the comment in the selection here, so there is no need to remove anything, if I am mistaken please let me know.