This is an archive of the discontinued LLVM Phabricator instance.

[clangd] downgrade missing-includes diagnostic to Information level
ClosedPublic

Authored by sammccall on May 4 2023, 3:19 PM.

Details

Summary

In practice, a Warning on every occurrence is very unpopular, even on a codebase
with clear rules about direct inclusion & moderately good compliance.

This change has various practical effects (in vscode for concreteness):

  • makes the diagnostic decoration less striking (blue vs yellow)
  • makes these diagnostics visually distinct from others when reading
  • causes these diagnostics to sort last in the "problems" view
  • allows these diagnostics to be easily filtered from the "problems" view

Diff Detail

Event Timeline

sammccall created this revision.May 4 2023, 3:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2023, 3:19 PM
Herald added a subscriber: arphaman. · View Herald Transcript
sammccall requested review of this revision.May 4 2023, 3:19 PM

This change is just one option to be evaluated for making these diagnostics more user-friendly.

Mostly sending the patch now to attach some screenshots...
Effect in VSCode (blue underline, visible in problems view, filterable)

"Hint" severity in VSCode (ellipsis, not visible in problems view)


(This seems worse: the three-dots rendering does suggest "action here" rather than "issue here", and not being *able* to show these in the problems view seems unfortunate too)

nridge added a subscriber: nridge.May 6 2023, 4:56 PM
kadircet accepted this revision.May 12 2023, 12:25 AM

thanks, lgtm!

This revision is now accepted and ready to land.May 12 2023, 12:25 AM