Closed Bug 1836676 Opened 2 years ago Closed 2 years ago

Re-enable include cleaner as clang-tidy checker

Categories

(Developer Infrastructure :: Source Code Analysis, task)

Tracking

(firefox116 fixed)

RESOLVED FIXED
Tracking Status
firefox116 --- fixed

People

(Reporter: andi, Assigned: andi)

References

Details

Attachments

(2 files)

As we moved to newer versions of clang we had to disable the implementation of include-cleaner since it was no longer compatible with clang-16 [1]
Now, there is a new version in clang-trunk that is officially accepted [2].

The goal of these patches is to backport the official include cleaner from clang-trunk to our own version of clang, 16.0.X and to have it activated in our config files to run during review phase using code-review bot.

1 - https://phabricator.services.mozilla.com/D173106
2 - https://github.com/llvm/llvm-project/commit/c28506ba4b6961950849f8fdecd0cf7e503a14f9

Depends on D179889

Assignee: nobody → bpostelnicu
Status: NEW → ASSIGNED
Pushed by bpostelnicu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1bc48e13c29d Backport misc-include-cleaner from clang-trunk to clang-16. r=sergesanspaille https://hg.mozilla.org/integration/autoland/rev/1318d220baed for clang-tidy activate mis-include-cleaner. r=sergesanspaille
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

This lint is very noisy in phabricator, and interferes with reviewing code, and adding includes such as RefPtr everywhere doesn't seem like what we want.

In this patch, there are three warnings on just this one line, and two of them are for RefPtr: https://phabricator.services.mozilla.com/D180456#C6543866NL358

Flags: needinfo?(bpostelnicu)
See Also: → 1837557

Similarly, I rebased my patches in Bug 1529131 today and I was surprised by the amount of clang-tidy warnings I got. I agree that it makes it harder to see what's happening.

Flags: needinfo?(bpostelnicu)
See Also: → 1838396
Regressions: 1838452
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: