Bug 431870

Summary: Proposal: Split range-loop check
Product: [Developer tools] clazy Reporter: Christian Schärf <c.schaerf>
Component: generalAssignee: Christian Schärf <c.schaerf>
Status: RESOLVED FIXED    
Severity: wishlist CC: smartins
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Christian Schärf 2021-01-21 12:31:12 UTC
As of now, the range-loop checks warns about range-based for loops

* over non-const Qt containers that may detach, such as:
* where non-trivial types are accessed by value instead of const reference

I propose to split the check in two so these cases can be selected individually.

Thoughts?
Comment 1 Sergio Martins 2021-02-07 13:02:04 UTC
sounds good
Comment 2 Sergio Martins 2021-02-07 13:02:51 UTC
can you provide a patch ?
Comment 3 Christian Schärf 2021-02-21 21:05:36 UTC
(In reply to Sergio Martins from comment #2)
> can you provide a patch ?

I have opened a MR: https://invent.kde.org/sdk/clazy/-/merge_requests/35
Comment 4 Sergio Martins 2021-02-22 10:50:19 UTC
thanks, will check it soon!
Comment 5 Sergio Martins 2021-02-22 19:57:23 UTC
Git commit 83425dc3aada18a2046b5f33469d41a3a25838cb by Sergio Martins.
Committed on 22/02/2021 at 19:56.
Pushed by smartins into branch 'master'.

README: Add Christian Schärf to list of contributors

M  +1    -0    README.md

https://invent.kde.org/sdk/clazy/commit/83425dc3aada18a2046b5f33469d41a3a25838cb