priv-kweihmann / oelint-adv

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

Non-deterministic oelint output when parsing bbappend files with `require` lines #467

Closed MQueiros closed 10 months ago

MQueiros commented 10 months ago

Consider the case when a path/to/somefile_%.bbappend file roughly looks like:

require path/to/somerequire.inc
require path/to/somerequire2.inc

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += "\
    file://something.patch \
"

And also that path/to/somerequire.inc causes an oelint error.

If I run the rule multiple times, sometimes I get:

path/to/somerequire.inc:2:error:

Other times I get:

path/to/somefile_%.bbappend:5:error:

If the onlyappend option is used, only the second case will throw errors. Also, a more deterministic output would be preferable for making it possible to have post-processing tooling catching the errors.

MQueiros commented 10 months ago

Related discussion in oelint-parser: https://github.com/priv-kweihmann/oelint-parser/issues/150

priv-kweihmann commented 10 months ago

I tried it now for almost a 100 times with different settings, every time I get the very same results. Judging from the related discussion you are using custom rule classes, maybe it might be worth sharing a redacted version of that one. Or post an updated example of what's wrong

MQueiros commented 10 months ago

Ah, that's true. My bad. I was calling self.finding with the wrong filename in some cases. Thanks! :)