As noted in the subject line: malformed declarations are noted by ‘check-declare-scan’ which logs a message in the ‘check-declare-warning-buffer’. However that malformed declaration is not passed back to 'check-declare-files’, and therefore its not part of the error list returned from that function.
Software that uses 'check-declare-files' as a lint check would have to parse the warning buffer (an additional step) in order to catch these malformed declarations.