docs: clear all ex_doc warnings - #70
Merged
Merged
Conversation
`rebar3 ex_doc` emitted 123 warnings. 122 of them were "spec references type rebar_state:t/0 but it is undefined or private", one per reference across all 16 modules. Every provider spec names rebar_state:t(), but rebar3 is the host application rather than a dependency, so its modules are absent from the doc build and ex_doc cannot resolve the type. It never will - rebar3 ships as an escript with no ebin directory to point at - so the specs are correct and the warning is noise. Suppressed with skip_undefined_reference_warnings_on. Two things worth knowing about that option: it matches on module or file rather than on the referenced type, so it cannot be narrowed to rebar_state:t() alone, and listing all 16 modules is in practice the whole warning class for module docs. Extras are unaffected - verified by pointing README.md at a non-existent file, which still warned - so broken links in README.md and LICENSE continue to surface, which is where the docs for a plugin actually live. The remaining warning was a stray setext underline left under an ATX heading on README.md:2. `rebar3 ex_doc` is now clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rebar3 ex_docemitted 123 warnings. Now it emits none.122 of them:
rebar_state:t/0One per reference, across all 16 modules. Every provider spec names
rebar_state:t():rebar3 is the host application, not a dependency, so its modules are absent from the doc build and ex_doc cannot resolve the type. That will not change - rebar3 ships as an escript with no ebin directory to point
depsat. The specs are correct; the warning is unresolvable noise.What I tried first
skip_code_autolink_tolooked like the precise fix - suppress by type name. It does nothing here: the spec-autolink path never consults it, andrebar3_ex_docreports it asunknown ex_doc option. Warnings stayed at 122.The option that works is
skip_undefined_reference_warnings_on, and two things about it are worth stating plainly:ExDoc.Autolink.maybe_warn/4testsconfig.id,config.module_idand the file path). So it cannot be narrowed torebar_state:t/0- the granularity does not exist.What redeems it: extras are not covered. I verified that by pointing
README.mdat a non-existent file and confirming it still warned:So broken links in
README.mdandLICENSEkeep surfacing - which for a plugin is where the docs actually live,mainbeingreadme.The known wart: a newly added module will not be in the list and will start warning again. It is self-announcing, and the comment in
rebar.configexplains why the list exists.The 123rd
README.md:2had a stray=====setext underline sitting under an ATX#heading. Removed.Checks
ex_doc0 warnings,fmt --check,xref,ct28/28 all clean.