priv-kweihmann / oelint-adv

Advanced oelint
BSD 2-Clause "Simplified" License
53 stars 27 forks source link

False positive with inline functions #597

Open UVV-gh opened 2 weeks ago

UVV-gh commented 2 weeks ago

Seems like this case: SRC_URI:append = "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'my-feature', '', ' file://0001-my-patch.patch', d)}" is reported as an append without space. Any ideas how to fix it properly?

priv-kweihmann commented 2 weeks ago

The inline functions are evaluated always by their true branch statement - if you would negated the condition and switch true and false branch statement it should be fine. It admit it's a limitation of the parser used

priv-kweihmann commented 2 weeks ago

The other option is ofc to inject a pseudo space into the true branch statement

UVV-gh commented 2 weeks ago

Any way to disable a warning/error when inline function is used?

priv-kweihmann commented 2 weeks ago

Inline suppression should work (https://github.com/priv-kweihmann/oelint-adv#inline-suppression).