diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-04-02 11:26:29 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-04-02 11:26:29 +0000 |
commit | 9f85d1a79fc1c8bd1542194d4730a3ff2e90e991 (patch) | |
tree | d80c1a591d5b6e774355d7c9b310a2959c816c8c /perl_checker.src/parser_helper.ml | |
parent | 68850ba7153887d3b69eaaa574990b0e54851179 (diff) | |
download | perl_checker-9f85d1a79fc1c8bd1542194d4730a3ff2e90e991.tar perl_checker-9f85d1a79fc1c8bd1542194d4730a3ff2e90e991.tar.gz perl_checker-9f85d1a79fc1c8bd1542194d4730a3ff2e90e991.tar.bz2 perl_checker-9f85d1a79fc1c8bd1542194d4730a3ff2e90e991.tar.xz perl_checker-9f85d1a79fc1c8bd1542194d4730a3ff2e90e991.zip |
enhance warning "... =~ /^foo$/" is better written "... eq 'foo'"
Diffstat (limited to 'perl_checker.src/parser_helper.ml')
-rw-r--r-- | perl_checker.src/parser_helper.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml index 21f91d8..d5869ec 100644 --- a/perl_checker.src/parser_helper.ml +++ b/perl_checker.src/parser_helper.ml @@ -428,7 +428,7 @@ let check_simple_pattern = function st.[0] = '^' && st.[String.length st - 1] = '$' then let st = skip_n_char_ 1 1 st in if string_forall_with char_is_alphanumerical_ 0 st then - warn_rule (sprintf "\"... =~ /^%s$/\" is better written \"... eq %s\"" st st) + warn_rule (sprintf "\"... =~ /^%s$/\" is better written \"... eq '%s'\"" st st) | _ -> () let rec only_one (l, (spaces, pos)) = |