Login
RT #21070: Add an exception to
[gknop/Perl-Critic.git] / Changes
CommitLineData
02b7b45d
JRT
1#######################################################################
2# $URL$
3# $Date$
4# $Author$
5# $Revision$
491e8b78 6#######################################################################
02b7b45d 7
f7231315
JRT
8[0.18_02] Released on ????????
9
10 New Policies:
90f4300b 11 * BuiltinFunctions::ProhibitStringySplit
ea5ee301 12 * ControlStructures::ProhibitDeepNests
876c81c6 13 * RegularExpressions::ProhibitCaptureWithoutTest
f7231315 14 * Variables::RequireLexicalLoopIterator
b22c8627 15
8b5892fc
AL
16 New Features:
17 * perlcritic -q|-quiet doesn't print the OK messages for the
18 source files that passed.
19
c4a2374c
JRT
20 Bug Fixes:
21 * 20965: "Hard tabs used at" shouldn't check __DATA__
22
876c81c6
CD
23 Other Stuff:
24 * Test coverage is now over 95%
25
0108f1ea 26[0.18_01] Released on 20060806
b22c8627 27
1bd11ec1
CD
28 New Policies:
29 * Variables::RequireNegativeIndices
446dddf9 30 * InputOutput::ProhibitInteractiveTest
af3b9793 31 * ErrorHandling::RequireCarping
1bd11ec1 32
b22c8627
JRT
33 Bug Fixes:
34 * RequireTidyCode tests fail if user has custom .perltidyrc file
f4aad68e 35 * 20612: RequirePerlTidy was ignoring HEREDOCs
5e5a36a8 36 * 20659: __END__ statement considered "unreachable"
f4aad68e
CD
37 * Fix for PPI::XS (no C<use overload '""'> support)
38 * Support for 'goto' in ProhibitAmpersandSigils and
39 Subroutines::RequireFinalReturn
b22c8627
JRT
40
41 Performance Enhancements:
42 * Introduced Perl::Critic::Document class. This is a facade for
43 PPI::Document which internally caches search results. This
44 reduces the running time by about 35%. The facade should be
45 invisible, unless you are doing something really sneaky.
46 * Extraction of the 'diagnostics' information is postponed
47 until it is really needed. Speedup has not been measured.
48 * Calls to helper-subs have been reordered for maximum efficiency.
49
50 Other Cool Stuff:
51 * Includes updated version of perlcritic mode for emacs. See
52 "extras/perlcritic.el" for details.
53
6a1cac48 54[0.18] Released on 20060716
0c43b2ce
JRT
55
56 Bug Fixes:
57 * 14855: Home discovery is dangerously naive.
58 * 20060: Incorrect page numbers in ProhibitLeadingZeros
59 and RequireNumberSeparator policies.
60 * 20068: .perlrc file - inconsistent documentation
61 * 20254: "use vars qw(@EXPORT_OK)" not recognized
02b99701
JRT
62 * 20463: No-case heredoc terminator incorrectly detected as lower case.
63 * ProhibitOneArgBless doesn't understand "bless {} => $class;"
64 * ProhibitExcessComplexity doesn't count 'while' and 'until' stmnts
65 * ProhibitLeadingZeros was falsely hits '.0456'
0c43b2ce
JRT
66
67 Enhancements:
68 * If File::HomeDir is available, we use it to locate the
69 .perlcriticrc file. This should help make Perl::Critic
70 more portable to Win32 platforms. If File::HomeDir is
71 not installed, we resort to looking at the usual
72 environment variables.
73
6a1cac48
JRT
74 Other Stuff:
75 * Added "perlcritic.el", which is a super-cool emacs minor-mode
76 that runs perl-critic on the current buffer and returns the
77 results in a sexy hot-linked "compiler" window. You can run
78 it on demand, or have it run automatically every time you
79 save the buffer. You can find this in the extras/ directory.
80 Thanks to Josh ben Jore for contributing this.
81
82 * Moved "Perl::Critic::TestUtils" into the installed build. This
83 module is only used for unit-testing Perl::Critic, but we
84 are putting it in the installation so folks who want to
85 extend Perl::Critic can make use of it.
86
491e8b78 87[0.17] Released on 20060613
08624963
JRT
88
89 Bug Fixes:
491e8b78
JRT
90 * 19836: Perl-Critic0.16 fails tests during install. This was
91 caused by a bug in version 3.01 of Module::Pluggable. See
92 http://rt.cpan.org/Ticket/Display.html?id=19857 for details.
93 * Fixed bug in no-critic pragma parser.
08624963 94
9c9fbe13
CD
95 New Policies:
96 * ValuesAndExpressions::ProhibitEscapedCharacters
ba619093 97 * BuiltinFunctions::RequireSimpleSortBlock
9c9fbe13 98
491e8b78
JRT
99 Enhancements:
100 * Perl::Critic can export critique() as a static function. This
101 may appeal to folks who dislike the object-oriented interface.
102
c46b6238 103[0.16] Released on 20060514
15bfb880 104
c46b6238 105 Production release.
15bfb880 106
c46b6238
JRT
107 Enhancements:
108 * Perl::Critic->critique() now accepts a PPI::Document as the
109 argument. This feature creates an additional dependency on
110 Scalar::Util, but that shouldn't be a problem because it is
111 included with List::Util, which we already use.
15bfb880 112
c46b6238
JRT
113 Miscellanea:
114 * Increased PPI dependency from v1.110 to v1.112
15bfb880 115
977dbe11 116[0.15_03] Released on 20060507
4f7da5f8
JRT
117
118 Bug Fixes:
119 * The "## no critic" feature is now implemented without eval-ing
120 the code. This keeps Perl::Critic pure and safe :)
15bfb880 121 * 19082: Page number for AUTOLOAD is incorrect
4f7da5f8
JRT
122
123 New Policies:
15bfb880 124 * ControlStructures::ProhibitUnreachableCode (by Peter Guzis)
977dbe11 125 * Modules::ProhibitAutomaticExportation
c5e3466b 126 * ValuesAndExpressions::ProhibitVersionStrings
4f7da5f8
JRT
127
128[0.15_02] Released on 20060426
1bef6e21
JRT
129
130 Bug Fixes:
131 * Reimplemented the '##no critic' pragmas to have effect on the
132 line where the violation is reported, not on the line where
133 the candidate element lives. This is because some policies
134 may report violations that are nowhere near the element that
135 is being evaluated.
136 * RequireUseStrict, RequireUseWarnings, and RequireExplcitPackage
137 all emit violations for _every_ statement that violates the
138 Policy. This closes a loophole that allowed you to circumvent
139 the Policy by using '## no critic' on just the first statement
140 that violated the policy.
141 * Fixed the workaround for the magic shebang that is inserted
142 by EU::MM and M::B. This had stopped working around version 13.
143 * Fixed -noprofile option on 'perlcritic'. This also had stopped
144 working at some point.
350f4137 145
55ae7242 146[0.15_01] Released on 20060416
520d94ce
JRT
147
148 Enhancements:
149 * Added diagnostic messages if the .perlcriticrc contains entries
f3ce038e 150 for Policy modules that don't seem to exist.
9b32fc61
JRT
151 * Now you can specify which policies to disable with the
152 "## no critic" pseudo-pragmas. This feature is still
153 experimental. See docs for details.
55ae7242
JRT
154 * perlcritic's directory searching now skips backup files, such
155 as *.swp, *.bak and *~. It also ignores version control system
156 directories, and the blib directory in module build directories.
9b32fc61 157
520d94ce
JRT
158 Bug Fixes:
159 * 18386: Bad example in POD for Documentation::RequirePodSections
9b32fc61 160 * 18670: Test failure if Perl::Tidy is not installed
f3ce038e 161 * 18698: Policy idea ProhibitUniversalFunctions (see New Policies)
520d94ce
JRT
162 * RequireInterpolationOfMetachars falsely hit strings like 'foo=s@'
163 which are commonly used with Getopt::Long.
164
7d2c51b1 165 New Policies:
15bfb880
JRT
166 * BuiltinFunctions::ProhibitUniversalCan (by Chris Dolan)
167 * BuiltinFunctions::ProhibitUniversalIsa (by Chris Dolan)
520d94ce 168
55ae7242
JRT
169 Miscellanea:
170 * All spurrious options for `perlcritic` are now fatal.
a5eaeaa4 171 * Changed several of the -verbose formats to be more readable.
55ae7242
JRT
172 * Explicit -severity option now overrides -[12345] shortcuts instead
173 of being the other way around.
174
175
a5eaeaa4 176
df092b01
JRT
177[0.15] Released on 20060326
178
179 Production release.
871ec032
JRT
180
181 Bug Fixes:
182 * 17964: Insists my code is not tidy (may not be fixed for all cases)
df092b01 183
e2ec15ae 184[0.14_02] Released on 20060319
302ea648 185
b87b00dd
JRT
186 Bug Fixes:
187 * 15653: False positive in OneArgSelect (fixed for real this time)
188
5457cbc2 189 New Policies:
e2ec15ae 190 * ClassHierarchies::ProhibitAutoloading
c169e1bd 191 * Documentation::RequirePodSections
15bfb880 192 * InputOutput::RequireBracedFileHandleWithPrint
5457cbc2 193 * ValuesAndExpressions::ProhibitMixedBooleanOperators
2ec37fe2 194 * Variables::RequireInitializationForLocalVars
5457cbc2 195
e2ec15ae 196[0.14_01] Released on 20060305
fc1186f9 197
20ceb4a0 198 Bug Fixes:
a7753069 199 * 14731: False positive: Builtin function called with parens
20ceb4a0
JRT
200 * 17554: False positive in CodeLayout::RequireTrailingCommas
201
fc1186f9
CD
202 New Policies:
203 * ClassHierarchies::ProhibitExplicitISA
013195d6 204 * InputOutput::ProhibitReadlineInForLoop
f8966b15
JRT
205 * Miscellanea::ProhibitFormats
206 * Miscellanea::ProhibitTies
5cb27b1a 207 * Variables::ProhibitConditionalDeclarations
fc1186f9 208
e2ec15ae 209[0.14] Released on 20060129
f4814c30 210
06d28f35
JRT
211 More documentation edits.
212
b672fd9e 213 New Policies:
8de08c2e 214 * Documentation::RequirePodAtEnd
38ce10c1 215 * Subroutines::ProtectPrivateSubs
b672fd9e 216 * Variables::ProhibitMatchVars
38ce10c1 217 * Variables::ProtectPrivateVars
b672fd9e 218
06d28f35
JRT
219 Bug Fixes:
220 * 15295: "## no critic" pragmas too aggresive on compound statements.
8de08c2e 221 * t/01_config.t failed in the presence of third-party policies
9ad4bbe8
JRT
222
223[0.13_05] Not released
224
225 More documentation edits.
226
2e3c7424
JRT
227 Implemented workaround for failing pod_coverage tests.
228
9ad4bbe8
JRT
229 Bug Fixes:
230 * 16906: tr/// created false-postives with RegularExpression polices.
f4814c30 231
e2ec15ae 232[0.13_04] Released on 20051231
a2969b87
JRT
233
234 Moved DEVELOPER.pod file into the Perl/Critic dir.
235
f4814c30
JRT
236 More documentation edits.
237
e2ec15ae 238[0.13_03] Released on 20051230
70d719da 239
2d119dc9
JRT
240 perlcritic now prints 'source OK' if it doesn't find any
241 violations. This gives folks a warm fuzzy feeling.
242
243 Tweaked some test cases that were failing on my Solaris
244 environment at work.
245
e2ec15ae 246[0.13_02] Released on 20051229
2d119dc9
JRT
247
248 Fixed Config to recognize fully-qualified module names in the
249 .perlcriticrc file.
250
251 Various documentation edits.
70d719da 252
e2ec15ae 253[0.13_01] Released on 20051228
5635926d
JRT
254
255 Replaced 'priority' concept with 'severity'. Now each Policy module
256 has a predefined severity level ranging from 1 to 5. By default,
257 perlcritic only reports the most severe violations. You can adjust
258 the severity threshold at the command line, and you can change
259 the severity for any Policy using the config file.
260
c5a01eb8
JRT
261 Chris implemented the applies_to() mechanism, which allows each Policy
262 class to declare the types of PPI elements that it wants to examine.
5635926d
JRT
263 When traversing the document, Perl::Critic invokes the Policy only
264 for elements that are of the correct type. This improves performance
265 by about 33%.
266
267 Perl::Critic now uses a Plugin architecture to automatically
268 discover Policy modules. So if you have custom Policies, all you
269 have to do is install them in the Perl::Critic::Policy namespace --
270 no need to add anything to your .perlcriticrc file. If you write
271 policies in a different namespace, you can configure that too. See
272 the Perl::Critic::Config docs for details.
273
274 New Policies:
275 * Modules::RequireEndWithOne
276 * NamingConventions::ProhibitAmbiguousNames
c5a01eb8 277 * References::ProhibitDoubleSigils
5635926d 278 * Subroutines::RequireFinalReturn
c2f9579b
JRT
279 * Subroutines::ProhibitAmpersandSigils
280 * Subroutines::ProhibitExcessComplexity
917d9f11
JRT
281 * TestingAndDebugging::ProhibitNoStrict
282 * TestingAndDebugging::ProhibitNoWarnings
5635926d
JRT
283
284 Bug Fixes:
285 * 15101: Plugin architecture improves support for 3rd-party code
286 * 16319: Fixed incorrect PBP page number in ProhibitBarwordFilehandle
287 * 16321: Lists of empty quotes are now allowed by ProhibitQuotedWordLists
288 * 16288: Empty lists caused a fatal error RequireTrailingCommas
289 * 15653: Fixed false positive in OneArgSelect.
290
e2ec15ae 291[0.13] Released on 20051031
59b05e08
JRT
292
293 Production release of 0.12_03. No code major changes.
294
295[0.12_03] Not released
296
297 Renamed -Policy option to -include. Added -exclude to give the
298 opposite effect.
299
300 Refactored constructor of Perl::Critic. Now, most of the work
301 is delegated to Perl::Critic::Config. I'm not sure I like how
302 this turned out, but we'll see how it goes.
303
304 Renamed some Policy modules to be a bit more comprehensible. Note
305 that you may need to change your .perlcriticrc file accordingly.
306 I also suggest removing your current Perl::Critic installation
307 before installing this one.
308
309 Name Changes:
310 * ProhibitUnpackagedCode => RequireExplicitPackage
311 * RequireQuotedWords => ProhibitQuotedWordLists
312
313 Improved error message when Perl::Critic dies because PPI can't
314 parsee the input code.
315
316 Changed output of -help to be more terse.
317
318 Edited POD.
319
320[0.12_02] Not released
321
322 Added -Policy option to perlcritic. The idea is to provide a
323 compact interface for selecting Policy modules at the command-line.
324 This feature is experimental and subject to change.
325
326 Added a warning message if -verbose value looks strange. In most
327 applications, the -verbose option does not require a value, so people
328 might be puzzled when they write 'perlcritic -verbose my_file.pm' and
329 nothing seems to happen.
330
331 Command-line options to perlcritic are now case-sensitive. This
332 makes it easier to abbreviate options that start with the same letters
333 (e.g. 'Version' and 'verbose')
334
335 Fixed the new Policy modules that were misnamed and misplaced in the
336 previous distribution.
337
338[0.12_01] Not released
339
340 Rewrote some of the ControlStructures and BuiltinFunction
341 policies to be simpler (and probably a little faster).
342
343 Edited POD. Fixed some typos. Added PREREQUISITES section
344 to Perl::Critic documentation.
345
346 Fixed the -verbose FORMAT option so that you can put metachars
347 in the FORMAT specification. If using perlcritic, be careful to
348 protect them from getting munged by the shell first.
349
350 Replaced ProhibitRequireStatements with RequireBarewordIncludes
351 module. Courtesy of Chris Dolan <cdolan@cpan.org>
352
353 Added configuration to ProhibitInterpolationOfLiterals so that
354 certain flavors of quotes can be exempt. This is for folks who
355 have configured their editor to use special syntax highlighting
356 for certain kinds of strings (SQL, for example).
357
358 perlcritic now accepts multiple file arguments, so now you can
359 critique your entire distribution in one shot. As a result, the
360 output-formats have changed slightly.
361
362 New Policy modules:
363 * BuiltinFunctions::ProhibitLvalueSubstr
364 * BuiltinFunctions::ProhibitSleepViaSelect
365 * ClassHierarchies::ProhibitOneArgBless
366 * CodeLayout::RequireTrailingCommas
367 * CodeLayout::RequireQuotedWordLists
368 * InputOutput::ProhibitTwoArgOpen
369 * InputOutput::ProhibitOneArgSelect
370 * InputOutput::ProhibitBarewordFileHandles
371 * Miscellanea::RequireRcsKeywords
372 * Modules::RequireVersionVar
373 * RegularExpressions::RequireExtendedFormatting
374 * RegularExpressions::RequireLineBoundaryMatching
375
376
377 Bug fixes:
378 14923: 'require' is now permitted. See RequireBarewordIncludes.
379 15022: Fixed false-positives when keywords are used as hash keys.
380 15023: Fixed spurious Violations by removing magic shebang.
381 15031: Fixed spelling mistakes (and probably added some new ones).
382 15233: Postfix 'if' is now allowed with 'die', 'croak', etc.
383
e2ec15ae 384[0.12] Released 20051010
59b05e08
JRT
385
386 Redesigned the 'verbose' feature. Now the output format
387 can be user-defined using a sprintf-like specification.
388 perlciritc also has a predefined output format that is
389 compatible with grep mode in editors like vim and emacs.
390
391 'return' is now exempt from ProhibitParensWithBuiltins. I may
392 extend this exemption to all unary functions.
393
394 Edited POD. Added a super brief description of each policy
395 in the main Perl::Critic documentation. Added details about
396 editor integration.
397
398 Additional Prerequisites:
399 * String::Format
400
401[0.11] Not released
402
403 The internal dynamics and API of Perl::Critic have changed
404 considerably. The result is a 300% increase in performance.
405 See the POD in Perl::Critic::Policy for details.
406
407 New Features:
408 * Added -verbose option to put more stuff in the output. In the
409 extreme, you can get the POD from Policy attached to each
410 and every violation.
411
412 Additional Prerequisites:
413 * IO::String
414 * Pod::PlainText
415
e2ec15ae 416[0.10] Released 20051005
59b05e08
JRT
417
418 Fixed stupid bug in newest Policy modules. They were returning
419 PPI objects instead of Perl::Critic::Violation objects. Doh!
420
421 Fixed test scripts to prevent failures if the user already has a
422 .perlcriticrc file.
423
424 'ProhibitHardTabs' now allows leading tabs by default.
425
426 Put the Changes file in reverse-chronological order, so the most
427 recent stuff is easy to find at the top of the file
428
e2ec15ae 429[0.09] Released 20051004
59b05e08
JRT
430
431 Fixed several bugs:
432 * 14810: Now you are allowed to create your own 'import' function,
433 since this is frequently done with fancy modules.
434 * 14817: Parens, brackets, and braces are now excluded from
435 'ProhibitNoisyQuotes' since they look better in quotes anyway.
436 * 14787: $1..$9 and '_' are exempt from ProhibitPunctuationVars
437 * 14899: Object methods with the same name as a built-in can
438 be called with parens (ProhibitParensWithBuiltins).
439 * 14901: Normalized the exit status of perlcritic to 0, 1, or 2.
440 See documentation for explanation.
441 * 14855: Partially fixed home directory discovery. Still not
442 completely portable, but at least doesn't create warnings.
443
444 New features:
445 * 14734: Limit for number separators is now configurable
446
447 New Policy modules:
448 * CodeLayout::ProhibitHardTabs
449 * ControlStructures::ProhibitUnlessBlocks
450 * ControlStructures::ProhibitUntilBlocks
451 * ControlStructures::ProhibitCStyleForLoops
452
453 Changed the syntax for the magic comments. Adam had the
454 idea of using a pragma-like notation. I liked it.
455
e2ec15ae 456[0.08_2] Released 20050927
59b05e08
JRT
457
458 Fixed problems with Perl::Critic::Config that caused File::Spec
459 to emit 'uninitialized value' warnings during the build.
460
461 Added 1 Policy module contributed by Graham TerMarsch
462
463 Switched from File::Spec::Functions to plain File::Spec because
464 I think its usage is more common.
465
466 Removed 'FindBin' from the test files so I can be sure that the
467 right libraries are getting loaded. This means I'll have to
468 use the -l option with C<prove>.
469
470 Edited more POD.
471
472[0.08_01] Not released
473
474 Fixed "ProhibitParensWithBuiltins" to allow parens to be used with
475 object method calls that have the same name as a builtin functions.
476
477 Introduced magical comments that allow developers to configure
478 Perl::Critic on-the-fly from within their code.
479
480 Added META.yml files and POD tests to the build. I did this
481 mostly just to boost the Kwalitee score on CPANTS.
482
483 Switched from "Config::Std" to "Config::Tiny" because it doesn't
484 require those fancy Damian modules that don't seem to work on
485 some older versions of Perl.
486
e2ec15ae 487[0.07] Released on 20050921
59b05e08
JRT
488
489 Fixed bugs in the ProhibitCascadingIfElse policy.
490
491 Added ProhibitExplicitReturnUndef policy
492
493 Made ProhibitUnpackagedCode configurable so you can exempt scripts,
494 which typically don't have an explicit 'package' statement.
495
496 ProhibitPackageVars policy now exempts vars in ALL_CAPS. This
497 is to permit common package variables like @EXPORT and $VERSION.
498
499 Renamed "ProhibitStringyGrep and "ProhibitStringyMap" because
500 the so-called string form doesn't really exist. Now called
501 "RequireBlockGrep" and "RequireBlockMap"
502
503 Corrected documentation on defining Policy names within the
504 configuration file. This still isn't very clear and needs
505 to be rewritten.
506
507 Perl::Critic now requires PPI version 1.003, which has a few bug
508 fixes of its own.
509
510 Rewrite some code just to make Perl::Critic more self-compliant.
511
512 Added test cases to verify the configuration functionality. These
513 are not completely thorough and need more work.
514
e2ec15ae 515[0.06] Released on 20050917
59b05e08
JRT
516
517 Now called 'Perl::Critic'.
518
519 Added 4 new policy modules.
520
521 Fixed bugs in build process.
522
523 Added support for Module::Build.
524
e2ec15ae 525[0.05] Released on 20050917
59b05e08
JRT
526
527 End of 'Perl::Review' releases. I have changed the name to
528 'Perl::Critic' to avoid possible confusion with "The Perl Review"
529 magazine.
530
e2ec15ae 531[0.04] Released on 20050914
59b05e08
JRT
532
533 Version 0.03 was a bust because I uploaded the wrong tarball to PAUSE.
534
e2ec15ae 535[0.03] Released on 20050913.
59b05e08
JRT
536
537 Fixed some POD links.
538
539 Removed test cases for missing policy module.
540
e2ec15ae 541[0.02] Released on 20050913.
59b05e08
JRT
542
543 Major overhaul based on feedback from Perl community.
544
545 Factored coding standards into separate modules (known as
546 Policies). The idea here is to allow other developers to easily
547 contribute additional coding standards.
548
549 Reworked Perl::Review into a simple engine for loading and running
550 Policy modules.
551
552 Gave perlreview a command-line interface and configuration file
553 for selecting which Policy modules to use.
554
e2ec15ae 555[0.01] Released on 20050816.
59b05e08
JRT
556
557 Initial version.
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577