@@ -68,14 +68,15 @@ class BadCommandsCheck(Check):
6868 known_results = frozenset ([DeprecatedEapiCommand , BannedEapiCommand ])
6969
7070 def feed (self , pkg ):
71- for node , _ in bash .cmd_query .captures (pkg .tree .root_node ):
72- call = pkg .node_str (node )
73- name = pkg .node_str (node .child_by_field_name ('name' ))
74- lineno , colno = node .start_point
75- if name in pkg .eapi .bash_cmds_banned :
76- yield BannedEapiCommand (name , line = call , lineno = lineno + 1 , eapi = pkg .eapi , pkg = pkg )
77- elif name in pkg .eapi .bash_cmds_deprecated :
78- yield DeprecatedEapiCommand (name , line = call , lineno = lineno + 1 , eapi = pkg .eapi , pkg = pkg )
71+ for func_node , _ in bash .func_query .captures (pkg .tree .root_node ):
72+ for node , _ in bash .cmd_query .captures (func_node ):
73+ call = pkg .node_str (node )
74+ name = pkg .node_str (node .child_by_field_name ('name' ))
75+ lineno , colno = node .start_point
76+ if name in pkg .eapi .bash_cmds_banned :
77+ yield BannedEapiCommand (name , line = call , lineno = lineno + 1 , eapi = pkg .eapi , pkg = pkg )
78+ elif name in pkg .eapi .bash_cmds_deprecated :
79+ yield DeprecatedEapiCommand (name , line = call , lineno = lineno + 1 , eapi = pkg .eapi , pkg = pkg )
7980
8081
8182class MissingSlash (results .VersionResult , results .Error ):
0 commit comments