File tree Expand file tree Collapse file tree 1 file changed +17
-13
lines changed
lkql_checker/share/lkql/kp Expand file tree Collapse file tree 1 file changed +17
-13
lines changed Original file line number Diff line number Diff line change 44@check(help="possible occurrence of KP VA18-003",
55 message="possible occurrence of KP VA18-003 if No_Tag is passed")
66fun kp_va18_003(node) =
7- node is CallExpr(f_suffix: l@AssocList,
8- p_referenced_decl(): decl@SubpDecl)
9- when (match decl.p_canonical_fully_qualified_name()
10- | "^ada\.tags\.descendant_tag$" => true
11- | "^ada\.tags\.interface_ancestor_tags$" => true
12- | "^ada\.tags\.is_descendant_at_same_level$" => true
13- | * => false)
14- # check all parameters of type Tag
15- and [a for a in l.children
16- if a.f_r_expr is not
17- AttributeRef(f_attribute:
18- Identifier(p_name_is("Tag"): true) and
19- a.f_r_expr.p_expression_type().p_relative_name().p_name_is("Tag")]
7+ node is CallExpr(
8+ f_suffix: l@AssocList,
9+ p_referenced_decl(): decl@SubpDecl
10+ ) when (
11+ match decl.p_canonical_fully_qualified_name()
12+ | "^ada\.tags\.descendant_tag$" => true
13+ | "^ada\.tags\.interface_ancestor_tags$" => true
14+ | "^ada\.tags\.is_descendant_at_same_level$" => true
15+ | * => false
16+ ) and [
17+ # check all parameters of type Tag
18+ a
19+ for a in l.children
20+ if a.f_r_expr is not AttributeRef(
21+ f_attribute: Identifier(p_name_is("Tag"): true)
22+ and a.f_r_expr.p_expression_type().p_relative_name().p_name_is("Tag")
23+ ]
You can’t perform that action at this time.
0 commit comments