Option to treat 'Invalid file link' as error instead of warning
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 890
- Avg merge
- 2h 11m
- Merged PRs (30d)
- 10
Description
**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
Contributor guide
Assessment
This issue has not been assessed yet.