Skip to content

Commit

Permalink
Document AnalyzeAngledIncludes, update info about standard library in…
Browse files Browse the repository at this point in the history
…cludes (#100)
  • Loading branch information
vvd170501 committed May 30, 2024
1 parent e271d54 commit 1eefa45
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
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

0 comments on commit 1eefa45

Please sign in to comment.