File: ProhibitEscapedMetacharacters.run

package info (click to toggle)
libperl-critic-perl 1.148-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,532 kB
  • sloc: perl: 24,116; lisp: 341; makefile: 7
file content (62 lines) | stat: -rw-r--r-- 1,263 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
## name basic passes
## failures 0
## cut

m/ [{] . [.] \d{2} [}] /xms;
$name =~ m{ harry [ ] s [ ] truman
          | harry [ ] j [ ] potter
          }ixms;

## name basic failures
## failures 2
## cut

m/ \{ . \. \d{2} \} /xms;
$name =~ m{ harry \ s \ truman
          | harry \ j \ potter
          }ixms;

## name allow comment character in //x mode -- http://rt.perl.org/rt3/Public/Bug/Display.html?id=45667
## failures 0
## cut

m/\#/x;
m/\#/;

## name allowed escapes
## failures 0
## cut

# omit \N{}, \p{}, \P{}, \xfe \cx
m/\Q\E \L\U \l\u /;  # matched pairs of specials
m/\A\B\C\D  \F\G\H\I\J\K \M  \O   \R\S\T \V\W\X\Y\Z /;
m/\a\b  \d\e\f\g\h\i\j\k \m\n\o \q\r\s\t \v\w  \y\z /;
m/(.)(.)(.)(.)(.)(.)(.)(.)(.)
  \1\2\3\4\5\6\7\8\9 /;
m/\!\@\%\&\-\_\= /;
m/\\ \'\"\` \~\,\<\> \/ /;
m/ \[\] /x;

## name unexpected failures
## failures 0
## cut

s{\%[fF]}{STDIN}mx;

## name escaped characters in character classes
## failures 2
## cut

m/ ([\)]) /xms;
m/ [\.] /xms;


#-----------------------------------------------------------------------------
# Local Variables:
#   mode: cperl
#   cperl-indent-level: 4
#   fill-column: 78
#   indent-tabs-mode: nil
#   c-indentation-style: bsd
# End:
# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :