summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/parser_helper.ml
diff options
context:
space:
mode:
Diffstat (limited to 'perl_checker.src/parser_helper.ml')
-rw-r--r--perl_checker.src/parser_helper.ml8
1 files changed, 8 insertions, 0 deletions
diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml
index 1ebaa13..ca28aa8 100644
--- a/perl_checker.src/parser_helper.ml
+++ b/perl_checker.src/parser_helper.ml
@@ -864,6 +864,14 @@ let call_raw force_non_builtin_func (e, para) =
| [ List [ Deref(I_array, _) ] ] -> ()
| _ -> warn_rule (f ^ " is expecting an array and nothing else"))
+ | "system" ->
+ (match un_parenthesize_full_l para with
+ | [ String(l, _) ] ->
+ if List.exists (fun (s, _) -> String.contains s '\'' || String.contains s '"') l &&
+ not (List.exists (fun (s, _) -> List.exists (String.contains s) [ '<' ; '>' ; '&' ; ';']) l) then
+ warn_rule "instead of quoting parameters you should give a list of arguments"
+ | _ -> ())
+
| _ -> ()
);