Skip to content

oelint.vars.overrideappend: Extend check#857

Merged
priv-kweihmann merged 3 commits intopriv-kweihmann:masterfrom
michalsieron:extend-override-append-check
Mar 17, 2026
Merged

oelint.vars.overrideappend: Extend check#857
priv-kweihmann merged 3 commits intopriv-kweihmann:masterfrom
michalsieron:extend-override-append-check

Conversation

@michalsieron
Copy link
Contributor

Using A:class-target += " b" actually appends to A:class-target, which will later override A. Most likely what was originally intended is conditional append to A.

This PR extends oelint.vars.overrideappend rule to also check scenarios described above. Additionally I added a fixer for both old and new scenarios.

This PR supersedes #856.

Pull request checklist

Bugfix

  • A testcase was added to test the behavior

New feature

  • A testcase was added to test the behavior
  • wiki-creator.py was run and a new wiki document was filled with information
  • New functions are documented with docstrings
  • No debug code is left
  • README.md was updated to reflect the changes (check even if n.a.)

@michalsieron michalsieron force-pushed the extend-override-append-check branch 2 times, most recently from 5a3b565 to f01a7b8 Compare March 15, 2026 00:11
Using `A:class-target += " b"` actually appends to `A:class-target`,
which will later override `A`. Most likely what was originally intended
is conditional append to `A`.

This commit extends oelint.vars.overrideappend rule to also check
scenarios described above. Additionally I added a fixer for both old and
new scenarios.

Signed-off-by: Michal Sieron <michalwsieron@gmail.com>
@michalsieron michalsieron force-pushed the extend-override-append-check branch from f01a7b8 to 24debf2 Compare March 15, 2026 10:40
From the docs:
> DEPENDS is a list of recipe names. Or, to be more precise, it is a
> list of PROVIDES names, which usually match recipe names.

As agreed in discussion priv-kweihmann#858, it must have been added by mistake.
Removing it from the pkgspecific list and adding a test case for it.

Signed-off-by: Michal Sieron <michalwsieron@gmail.com>
It must have ended up here by mistake when grepping for <word>:${PN}.

Signed-off-by: Michal Sieron <michalwsieron@gmail.com>
@priv-kweihmann priv-kweihmann merged commit d34ed1b into priv-kweihmann:master Mar 17, 2026
5 checks passed
@michalsieron michalsieron deleted the extend-override-append-check branch March 17, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants