How come static analysis seems to be disabled for rich comment blocks?
I'd love a global config option!
if the content of the comment block is bitrotted, then i don't see a problem with the complaints... if they are annoying, then just delete the rotten code or line-comment it. we are using rich-comments as admin interface too, so we definitely want it to be inspected, so it can be involved in code navigation, definition lookup and help.
Where is bar def'd?
(I mean, I've definitely felt frustration with comment block handling in cursive before [https://clojurians.slack.com/archives/C0744GXCJ/p1747824307274639], but I'm not sure what you're expecting to happen in your example.)
@peterwestmacott That's the deal, there's no bar - a regular form shows the right error message ("cannot be resolved"), but the rich comment seems to disable it
I use rich comment for snippets and docs, but that breaks if I refactor the code
Oic
Have you tried 'resolve as...' > 'do' on the comment block?
(I'm afk atm)
Just tried, didn't seem to have any effect.
So, this is something that I go back and forward on enough that I might end up having a switch for it. It definitely needs to be improved from how it works now. The theory was that comment blocks may contain code which is either just invalid, or may depend on transient testing REPL state, or have once been valid but has bit-rotted, or something like that. So I turned off the inspections in the blocks so at least you wouldn't get nagged. But, subsequently I moved some functionality from annotators (which always run) to inspections (which don't run in the comment blocks), primarily so their behaviour could be configured using a consistent UI using the standard inspection config instead of having some weird Cursive-specific thing. But then some things just don't work properly in comment blocks now, in particular a lot of the auto-require/import stuff is now triggered by inspections and doesn't work in comments. So I'm tossing up between a couple of options: 1. have a global config ("Allow inspections in comment blocks") 2. have that config be per-inspection 3. run all inspections in comment blocks, and finally get around to adding disabling specific inspections, and allow that to be put on comment blocks where you don't want them. 4. something else???