Skip to content

Option to treat 'Invalid file link' as error instead of warning #7433

@melanchall

Description

@melanchall

Operating System: Windows

DocFX Version Used: 2.58

Sometimes I forget to precede a link to an API entity with xref: which leads to warnings like these:

[21-06-19 09:42:16.151]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.ConceptualDocumentProcessor.Save](articles/playback/Data-tracking.md#L100)Invalid file link:(~/articles/playback/Melanchall.DryWetMidi.Devices.Playback.TrackControlValue).
[21-06-19 09:42:16.151]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.ConceptualDocumentProcessor.Save](articles/playback/Custom-playback.md#L16)Invalid file link:(~/articles/playback/Melanchall.DryWetMidi.Devices.Playback.OutputDevice).

And the message from docfx says all is fine (almost):

Build succeeded with warning.

I build my docs within CI, so I want a build failed when Invalid file link error occured, because from my point of view it's absolutely an error, not a just warning. I must fix it before publishing the docs.

So my question: is it possible to tell docfx to treat such situations as errors and thus fail the build (I suppose docfx should return non-zero exit code)?

Thanks,
Max

Metadata

Metadata

Assignees

No one assigned

    Labels

    fundamentalEngineering system and core components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions