4040match_types = {
4141 "matchlines" : "line" ,
4242 "match" : "line" , # called by matchlines
43- "matchtasks " : "task" ,
44- "matchtask " : "task" , # called by matchtasks
45- "matchyaml " : "yaml" ,
46- "matchplay" : "play" , # called by matchyaml
47- "matchdir " : "dir" ,
43+ "match_tasks " : "task" ,
44+ "match_task " : "task" , # called by match_tasks
45+ "match_file " : "yaml" ,
46+ "matchplay" : "play" , # called by match_file
47+ "match_dir " : "dir" ,
4848}
4949RE_JINJA_EXPRESSION = re .compile (r"{{.+?}}" )
5050RE_JINJA_STATEMENT = re .compile (r"{%.+?%}" )
@@ -72,7 +72,7 @@ def unjinja(text: str) -> str:
7272 return text
7373
7474 # pylint: disable=too-many-arguments,too-many-positional-arguments
75- def create_matcherror (
75+ def create_match_error (
7676 self ,
7777 message : str = "" ,
7878 lineno : int = 1 ,
@@ -143,20 +143,20 @@ def matchlines(self, file: Lintable) -> list[MatchError]:
143143 message = ""
144144 if isinstance (result , str ):
145145 message = result
146- matcherror = self .create_matcherror (
146+ match_error = self .create_match_error (
147147 message = message ,
148148 lineno = prev_line_no + 1 ,
149149 details = line ,
150150 filename = file ,
151151 )
152- matches .append (matcherror )
152+ matches .append (match_error )
153153 return matches
154154
155- def matchtasks (self , file : Lintable ) -> list [MatchError ]:
156- """Call matchtask for each task inside file and return aggregate results.
155+ def match_tasks (self , file : Lintable ) -> list [MatchError ]:
156+ """Call match_task for each task inside file and return aggregate results.
157157
158- Most rules will never need to override matchtasks because its main
159- purpose is to call matchtask for each task/handlers in the same file,
158+ Most rules will never need to override match_tasks because its main
159+ purpose is to call match_task for each task/handlers in the same file,
160160 and to aggregate the results.
161161 """
162162 matches : list [MatchError ] = []
@@ -185,7 +185,7 @@ def matchtasks(self, file: Lintable) -> list[MatchError]:
185185 if self .needs_raw_task :
186186 task .normalized_task ["__raw_task__" ] = task .raw_task
187187
188- result = self .matchtask (task , file = file )
188+ result = self .match_task (task , file = file )
189189 if not result :
190190 continue
191191
@@ -212,7 +212,7 @@ def matchtasks(self, file: Lintable) -> list[MatchError]:
212212 message = ""
213213 if isinstance (result , str ):
214214 message = result
215- match = self .create_matcherror (
215+ match = self .create_match_error (
216216 message = message ,
217217 lineno = task .line ,
218218 filename = file ,
@@ -222,7 +222,7 @@ def matchtasks(self, file: Lintable) -> list[MatchError]:
222222 matches .append (match )
223223 return matches
224224
225- def matchyaml (self , file : Lintable ) -> list [MatchError ]:
225+ def match_file (self , file : Lintable ) -> list [MatchError ]:
226226 matches : list [MatchError ] = []
227227 if str (file .base_kind ) != "text/yaml" :
228228 return matches
0 commit comments