You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Suggestion: Have the CI warn about or remove unused includes. #3474
Inspired by my recent PR #3470 which does a sweeping cleanup of redundant includes.
I think the CI in theory should be able to handle this automatically and either straight up remove the redundant includes at least give the submitter some sort of warning. Clang has some of this functionality and is already in use.
This may be tricky in some cases however, for example there are files where the only thing the include is necessary for is a namespace and of course there are the bulk include header files whose sole purpose is to have redundant includes. So this may need some more nuance configuration which I'm not sure how to do exactly. See #3470 for some more details.
Another idea: It would be nice to have the includes sorted alphabetically, but there are some cases where it's actually order dependent, especially when including libraries outside math, so again this can't be done in the most straightforward way and perhaps needs some grouping of includes.
Activity