Skip to content

Commit

Permalink
srcurifile: skip inline blocks
Browse files Browse the repository at this point in the history
Closes #465

Signed-off-by: Konrad Weihmann <[email protected]>
  • Loading branch information
priv-kweihmann committed Jan 4, 2024
1 parent 478c200 commit eb99acc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion oelint_adv/rule_base/rule_var_src_uri_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ def check(self, _file, stash):
if _url['scheme']:
_fetcher.append((_url['scheme'], item.InFileLine))
if _fetcher:
if any(x[0] != 'file' for x in _fetcher) and _fetcher[0][0] == 'file':
if any(x[0] not in ['file', 'inline'] for x in _fetcher) and _fetcher[0][0] == 'file':
res += self.finding(item.Origin, _fetcher[0][1])
return res
6 changes: 5 additions & 1 deletion tests/test_class_oelint_vars_srcurifile.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ def test_bad(self, input_, id_, occurrence):
},
{
'oelint_adv_test.bb':
'SRC_URI[md5sum] = "file://abc"',
'SRC_URI += "file://abc"',
},
{
'oelint_adv_test.bb':
'SRC_URI = "file://foo ${@bb.utils.contains(\'FOO\', \'bar\', \'file://bar\', \'\', d)}"',
},
{
'oelint_adv_test.bb':
Expand Down

0 comments on commit eb99acc

Please sign in to comment.