1515if TYPE_CHECKING :
1616 from ruamel .yaml .comments import CommentedMap , CommentedSeq
1717
18+ from ansiblelint .app import App
1819 from ansiblelint .config import Options
1920 from ansiblelint .errors import MatchError
2021 from ansiblelint .utils import Task
@@ -324,10 +325,10 @@ def test_file_negative(empty_rule_collection: RulesCollection) -> None:
324325 errs = bad_runner .run ()
325326 assert len (errs ) == 5
326327
327- def test_name_prefix_positive (config_options : Options ) -> None :
328+ def test_name_prefix_positive (config_options : Options , app : App ) -> None :
328329 """Positive test for name[prefix]."""
329330 config_options .enable_list = ["name[prefix]" ]
330- collection = RulesCollection (options = config_options )
331+ collection = RulesCollection (app = app , options = config_options )
331332 collection .register (NameRule ())
332333 success = Lintable (
333334 "examples/playbooks/tasks/main.yml" ,
@@ -337,10 +338,10 @@ def test_name_prefix_positive(config_options: Options) -> None:
337338 results = good_runner .run ()
338339 assert len (results ) == 0
339340
340- def test_name_prefix_negative (config_options : Options ) -> None :
341+ def test_name_prefix_negative (config_options : Options , app : App ) -> None :
341342 """Negative test for name[missing]."""
342343 config_options .enable_list = ["name[prefix]" ]
343- collection = RulesCollection (options = config_options )
344+ collection = RulesCollection (app = app , options = config_options )
344345 collection .register (NameRule ())
345346 failure = Lintable (
346347 "examples/playbooks/tasks/rule-name-prefix-fail.yml" ,
@@ -354,10 +355,10 @@ def test_name_prefix_negative(config_options: Options) -> None:
354355 assert results [1 ].tag == "name[prefix]"
355356 assert results [2 ].tag == "name[prefix]"
356357
357- def test_name_prefix_negative_2 (config_options : Options ) -> None :
358+ def test_name_prefix_negative_2 (config_options : Options , app : App ) -> None :
358359 """Negative test for name[prefix]."""
359360 config_options .enable_list = ["name[prefix]" ]
360- collection = RulesCollection (options = config_options )
361+ collection = RulesCollection (app = app , options = config_options )
361362 collection .register (NameRule ())
362363 failure = Lintable (
363364 "examples/playbooks/tasks/partial_prefix/foo.yml" ,
@@ -369,10 +370,10 @@ def test_name_prefix_negative_2(config_options: Options) -> None:
369370 assert results [0 ].tag == "name[prefix]"
370371 assert results [1 ].tag == "name[prefix]"
371372
372- def test_name_prefix_negative_3 (config_options : Options ) -> None :
373+ def test_name_prefix_negative_3 (config_options : Options , app : App ) -> None :
373374 """Negative test for name[prefix]."""
374375 config_options .enable_list = ["name[prefix]" ]
375- collection = RulesCollection (options = config_options )
376+ collection = RulesCollection (app = app , options = config_options )
376377 collection .register (NameRule ())
377378 failure = Lintable (
378379 "examples/playbooks/tasks/partial_prefix/main.yml" ,
0 commit comments