File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change 11fun 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
1212fun 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 )
You can’t perform that action at this time.
0 commit comments