You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
search_for_token searches through the file, stopping if it encounters the target token or a --- comment.
if it advances the position, finds a comment, but then find_module doesn't return the t,v that SFT returns, then parse_file never actually processes the comment that was found.
a slight modification of the example from #396 that shows the issue; DoNothing is entirely absent from the generated docs:
--- my modulelocalv=42--- my function-- takes nothing and returns nothing-- @return nothingfunctionDoNothing()
end--- my thingThing= {
}
the "contains no items" warning only triggers if there is no module() call and no --- comments other than the module comment in the entire file, which is potentially a reasonable case to warn about - the reason it triggered on the example in #396 is that the doc on DoNothing() was actually parsed as the module comment, and then there were no documented items beyond that (i.e. there actually were no items, as the warning said!). Adding an actual module comment to it (as in my example above) makes the warning go away even with the pre-#396 code.
I would still like a way to turn the warning off or ignore it - maybe a pragma? The reason I'm even looking at this code in the first place is that I have modules that actually don't have any items, because they just register themselves with other modules and don't expose any functions/etc themselves, and I'd like to use --fatalwarnings but can't because of the "no items" warning 🙂
The text was updated successfully, but these errors were encountered:
bisected, caused by #396.
search_for_token
searches through the file, stopping if it encounters the target token or a---
comment.if it advances the position, finds a comment, but then
find_module
doesn't return thet,v
that SFT returns, thenparse_file
never actually processes the comment that was found.a slight modification of the example from #396 that shows the issue;
DoNothing
is entirely absent from the generated docs:the "contains no items" warning only triggers if there is no module() call and no
---
comments other than the module comment in the entire file, which is potentially a reasonable case to warn about - the reason it triggered on the example in #396 is that the doc onDoNothing()
was actually parsed as the module comment, and then there were no documented items beyond that (i.e. there actually were no items, as the warning said!). Adding an actual module comment to it (as in my example above) makes the warning go away even with the pre-#396 code.I would still like a way to turn the warning off or ignore it - maybe a pragma? The reason I'm even looking at this code in the first place is that I have modules that actually don't have any items, because they just register themselves with other modules and don't expose any functions/etc themselves, and I'd like to use
--fatalwarnings
but can't because of the "no items" warning 🙂The text was updated successfully, but these errors were encountered: