Repository navigation
Replies: 4 comments 3 replies
|
I think if clang-tidy can detect when they're wrong and update them, I do like that style (that can make it easier to realize that an argument that wasn't being used can actually be helpful). That said, I'd worry about those comments getting out of date, though maybe that's less likely since folks would be in the habit of updating the declaration and definition together. |
|
I'm fan of |
|
I am not enthusiastic about [[maybe_unused]] - it is a lot of typing. In the case of Geeqie, it would be used when code is revised and a parameter that was once used is no longer used. In that case the commented out parameter makes more sense. Finding such places can be done via e.g. '(./*[[:alpha:]].[[:alpha:]].**/' - which is a bit of a headache. But GTK4 migration is an even bigger headache... |
|
I locally changed .clang-tidy to include This complies with Geeqie's CODING.md: I have used Codex quite a lot recently and because of the omission of the above, it has created a number of variables with the wrong case - that will be fixed. But there is also e.g. which is from @qarkai - and probably more places clang-tidy logs that as an error. In some of the test files created by @xsdg , variables such as Are there any comments? I see no alternative to using AI code to complete the GTK3/GTK4 migration, and in some other cases it has reduced hours of work to minutes - it has also created a pain in the neck at times. Therefore the more extensive code checks are necessary. |
Uh oh!
There was an error while loading. Please reload this page.
The migration to GTK4 resulted in a lot of unused parameter errors.
I used clang-tidy --fix to remove them
clang-tidy does not remove unused parameters, but encloses them in comments - apparently for documentation reasons.
I can leave them as is, or delete them - whatever the consensus is.
All reactions