scalameta / mdoc

Typechecked markdown documentation for Scala

Home Page:https://scalameta.org/mdoc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add an option to fail mdoc when link hygiene reports issues

daddykotex opened this issue · comments

Currently, there is --no-link-hygiene which disable link hygiene, but no equivalent to ensure mdoc fails when link hygiene show issues.

It would be helpful in a CI environment where we could have for example: sbt docs/mdoc --no-dead-links or somewhat similar. I'm happy to implement if that sounds useful to you & and anybody else.

Thanks for rainsing this @daddykotex ! I think this would good feature to add, let me know if you need any help with it!

I'll do it. Currently, there is:

--no-link-hygiene
    Disable link hygiene analysis so that no warnings are reported for dead links.

What would you like the option to be --error-on-link-hygiene? With that, I'll be ready to give it a shot.

Maybe --fail-on-link-hygiene, what do you think?

--check-dead-links? --check-link-hygiene?

With all the suggestions, my preferred one is --check-link-hygiene. It matches the semantic of --check which reports an error when the site is not up-to-date.

Bumping just to make sure its was not just forgotten, but the PR is up for review. Get to it when you can, no rush, really.