Thanks to @deadalnix for pointing out the issue.
The check-doc linter will scan for all the errors for each file, thus
duplicating the error messages is multiple files are being modified.
This diff ensures that the messages are generated once. This is a
temporary fix, waiting for a solution to make the linter run once.