Update oelint pattern (#5016)

* Update oelint pattern
* Handle optional branch output
This commit is contained in:
offa
2025-08-14 19:18:00 +00:00
committed by GitHub
parent a083d58c7f
commit ce1ee7c598
2 changed files with 28 additions and 2 deletions

View File

@@ -7,6 +7,27 @@ After:
call ale#linter#Reset()
Execute(The oelint_adv handler should handle warnings):
AssertEqual
\ [
\ {
\ 'lnum': 1234,
\ 'type': 'I',
\ 'code': 'oelint.var.suggestedvar.BUGTRACKER',
\ 'text': 'Variable ''BUGTRACKER'' should be set',
\ },
\ {
\ 'lnum': 17,
\ 'type': 'E',
\ 'code': 'oelint.var.mandatoryvar.DESCRIPTION',
\ 'text': 'Variable ''DESCRIPTION'' should be set',
\ },
\ ],
\ ale_linters#bitbake#oelint_adv#Handle(1, [
\ '/meta-x/recipes-y/example/example_1.0.bb:1234:info:oelint.var.suggestedvar.BUGTRACKER:Variable ''BUGTRACKER'' should be set [branch:true]',
\ 'example2_1.1.bb:17:error:oelint.var.mandatoryvar.DESCRIPTION:Variable ''DESCRIPTION'' should be set [branch:true]',
\ ])
Execute(The oelint_adv handler should handle warnings without branch message):
AssertEqual
\ [
\ {
@@ -26,3 +47,4 @@ Execute(The oelint_adv handler should handle warnings):
\ '/meta-x/recipes-y/example/example_1.0.bb:1234:info:oelint.var.suggestedvar.BUGTRACKER:Variable ''BUGTRACKER'' should be set',
\ 'example2_1.1.bb:17:error:oelint.var.mandatoryvar.DESCRIPTION:Variable ''DESCRIPTION'' should be set',
\ ])