Add an option to edoc
to return the list of errors and warnings
#5056
Labels
enhancement
help wanted
Issue not worked on by OTP; help wanted from the community
team:VM
Assigned to OTP team VM
Is your feature request related to a problem? Please describe.
As part of the Erlang LS project, we would like to add an
edoc
diagnostics backend that can display documentation warnings and errors to the user directly in the IDE. That would drastically reduce the feedback loop to write Erlang documentation.Describe the solution you'd like
For that to be possible without duplicating some of the
edoc
code, it would be great if theedoc
high-level API could return the list of warnings and errors. This behaviour could be triggered via a dedicated option, to keep the API backward compatible. The options could be similar to thereturn_errors
andreturn_warnings
ofcompile:file/2
.Describe alternatives you've considered
Erlang LS could implement a wrapper around the low-level
edoc
API, intercepting errors and warnings and returning them to the user. This would most likely result in duplicated code and un-necessary maintenance burden.Additional context
See the original discussion here.
The text was updated successfully, but these errors were encountered: