Skip to content

Commit 6c8e093

Browse files
committed
positional_parameters.lkql: Reformat the file
1 parent ee6b318 commit 6c8e093

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

lkql_checker/share/lkql/positional_parameters.lkql

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
fun check_actual_param(spec, node, check_dot) =
22
match spec
3-
| SubpSpec =>
4-
{
5-
val num_params=(from spec.f_subp_params?.f_params
6-
select DefiningName).length;
7-
num_params > 2 or (num_params > 1 and not check_dot)
8-
}
3+
| SubpSpec => {
4+
val num_params = (
5+
from spec.f_subp_params?.f_params select DefiningName
6+
).length;
7+
num_params > 2 or (num_params > 1 and not check_dot)
8+
}
99
| EntrySpec => spec.f_entry_params.f_params[2] != null
10-
| * => false
10+
| * => false
1111

1212
fun add_param_name(param, ctx) =
1313
ctx.set_child(
1414
param,
1515
ParamAssoc.f_designator,
16-
new Identifier (param.p_get_params()[1].text)
16+
new Identifier(param.p_get_params()[1].text)
1717
)
1818

1919
@check(message="positional parameter association", remediation="EASY",
@@ -73,7 +73,12 @@ fun positional_parameters(node, all=false) =
7373
when l.parent is c@CallExpr(
7474
p_is_call(): true,
7575
f_name: not AttributeRef,
76-
f_name: id@*(p_is_operator_name(): false)
77-
when (all or check_actual_param(c.p_called_subp_spec(), node,
78-
id.p_is_dot_call()))
76+
f_name: id@*(p_is_operator_name(): false) when (
77+
all
78+
or check_actual_param(
79+
c.p_called_subp_spec(),
80+
node,
81+
id.p_is_dot_call()
82+
)
83+
)
7984
)

0 commit comments

Comments
 (0)