Skip to content
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

Suggest usage of += over :append #566

Open
jo-so-nx opened this issue Apr 25, 2024 · 1 comment
Open

Suggest usage of += over :append #566

jo-so-nx opened this issue Apr 25, 2024 · 1 comment
Labels
community Patches should be provided by the community New rule New rule to be implemented

Comments

@jo-so-nx
Copy link

The bug report Review and remove unnecessary uses of _prepend/_append says

These postponed/lazy operations should only used when necessary, so +=/=+/.=/=. should be preferred for non-conditional operations.

Maybe this could become a info message.

This somewhat contradicts oelint.vars.appendop, but maybe it's possible to distinguish these cases.

There's currently a patch in discussion: https://lists.openembedded.org/g/openembedded-core/message/198154

@priv-kweihmann
Copy link
Owner

The question is what is necessary? ;-)
If you know all of the stack, including locally injected classes and bbappends then that might be something to pull off.

But from this tool's perspective not everything is known, so I'd rather prefer not to do anything about it.
Esp when even upstream is not keeping that up.

In the end this would have a lot of potential for false negatives, if the patched recipe is used in a wider context.

So I'm not really fond of implementing it, but I'll keep the ticket open, maybe with the 20th anniversary of the original bug report (2012-08-16 01:37 UTC) there's finally something to properly check for

@priv-kweihmann priv-kweihmann added the New rule New rule to be implemented label Apr 25, 2024
@priv-kweihmann priv-kweihmann added the community Patches should be provided by the community label Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Patches should be provided by the community New rule New rule to be implemented
Projects
None yet
Development

No branches or pull requests

2 participants