Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document AnalyzeAngledIncludes, update info about standard library includes #100

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion config.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ Describes the style of the codebase, beyond formatting.
### FullyQualifiedNamespaces

Namespaces that should always be fully qualified, meaning no "using"
declarations, always spell out the whole name (with or without leading::).
declarations, always spell out the whole name (with or without leading::).
All nested namespaces are affected as well.
Affects availability of the AddUsing tweak.

Expand Down Expand Up @@ -314,6 +314,12 @@ Diagnostics:
A list of regexes. Include Cleaner will not produce diagnostics for headers
whose path is a suffix match for any of these.

#### AnalyzeAngledIncludes
{:.v19}

A boolean that enables/disables detection of unused angled includes that are not from the Standard Library.
Disabled by default to avoid false-positives caused by umbrella headers.

### MissingIncludes
{:.v17}

Expand Down
4 changes: 3 additions & 1 deletion design/include-cleaner.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,16 @@ recommended to users. The users should always write `#include
using `// IWYU pragma: private, include "public.h"` in your `private.h` header
that is being exported.

### Standard library
### Standard library (before clangd-17)

By default, Include Cleaner will not diagnose headers from the Standard
Library. Standard Library headers support is not complete yet (due to the
macros and the fact that a symbol is allowed to come from multiple headers) but
you can enable this unstable feature through passing `--include-cleaner-stdlib`
flag to clangd invocation.

Since clangd-17, Standard Library headers are always diagnosed and the flag is ignored.

### Inserting Includes

The complete version of Include Cleaner will not only warn about unused
Expand Down
4 changes: 3 additions & 1 deletion styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ a[href^="https://code.woboq.org/"] {
}

/* Version marker ornaments */
.v6::before, .v7::before, .v8::before, .v9::before, .v10::before, .v11::before, .v12::before, .v13::before, .v14::before, .v15::before, .v16::before, .v17::before, .v18::before {
.v6::before, .v7::before, .v8::before, .v9::before, .v10::before, .v11::before, .v12::before,
.v13::before, .v14::before, .v15::before, .v16::before, .v17::before, .v18::before, .v19::before {
color: #008;
border-radius: 3px;
padding: 0.2em 0.6em;
Expand All @@ -193,6 +194,7 @@ a[href^="https://code.woboq.org/"] {
.v16::before { content: "clangd-16"; }
.v17::before { content: "clangd-17"; }
.v18::before { content: "clangd-18"; }
.v19::before { content: "clangd-19"; }
#edit {
text-decoration: none;
position: absolute;
Expand Down