-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[lint] Merge impeller .clang-tidy into main config #33692
Conversation
This change is organised into a stack of commits, one per option, for ease of review. |
174fb78
to
c03b557
Compare
@chinmaygarde added three more commits to fix up the last of the issues raised in the presubmit. The first two are non-controversial. I've added some notes to the last commit description; whether we delete the dead store or ignore it is really up to the author's intent with leaving it there. |
It's interesting that it seems to be upset about the local I could tack in a The stack of calls looks something like:
|
Hrm. Can't find an easy way to work around the clang-analyzer-core.StackAddressEscape issue since it's in a header library. I did try jamming a NOLINTBEGIN/NOLINTEND pair around the #include as a desperate measure, but didn't work :/ Any thoughts? |
@chinmaygarde wants to take a look at the underlying issue in inja. |
SGTM! On the surface it looks sane but there's also enough parameters passed to locals, then returned that, as I say, I haven't yet completely convinced myself there's no issue there. |
I haven't had the chance to take a look at the Inja issue. Frankly, this escaped my attention. Filed flutter/flutter#105732 and assigned to myself. Marking this WIP in the meantime. Will continue with this after the linked issue is fixed. |
@cbracken I won't be able to get to this before the end of the month realistically. Are you blocked on this? Since there is an issue filed for it already, maybe you can proceed with the NOLINT? |
Not blocked on this; but I'll add the nolint to land it before I forget. Thanks. |
c03b557
to
dc13b76
Compare
Gold has detected about 2 new digest(s) on patchset 14. |
Broke out into #34197 |
043095e
to
8bda18b
Compare
pipeline_desc is a std::optional<PipelineDescriptor>. It's used in test expectations after (lines 320-321) the move. This passes by value like in other tests.
Merges most (but not all) of the impeller .clang-tidy rules into the main .clang-tidy config. Merges: * readability-identifier-naming.PrivateMemberSuffix (_) * readability-identifier-naming.EnumConstantPrefix (k) * modernize-use-default-member-init.UseAssignment Does not merge: * readability-identifier-naming.PublicMethodCase (CamelCase) * readability-identifier-naming.PrivateMethodCase (CamelCase) These last two are not merged due to the non-trivial number of existing field accessors that use `field_name()` methods to directly return `field_name_`. While these are permitted by the C++ style guide, we may want to move to a single, simple rule and name everything in CamelCase. These can be enabled in a followup patch.
8bda18b
to
4793925
Compare
Adds NOLINT annotation to a couple of dead stores used to verify locking.
This is a dead store which we may want to eliminate. We do read from this field earlier in the constructor, and the offset should conceptually be incremented here, but it's never (currently) read after the conditional + memcpy earlier in the method. I'm assuming it may have been kept intentionally as potential future-proofing in case of future use of offset later in the method. This write can safely be removed with the current code though.
4793925
to
726ab40
Compare
Merges most (but not all) of the impeller .clang-tidy rules into the
main .clang-tidy config. Merges:
Does not merge:
These last two are not merged due to the non-trivial number of existing
field accessors that use
field_name()
methods to directly returnfield_name_
. While these are permitted by the C++ style guide, we maywant to move to a single, simple rule and name everything in CamelCase.
These can be enabled in a followup patch.
No new tests added, since this change is style-only.
Pre-launch Checklist
writing and running engine tests.
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.