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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578
|
Revision history for Perl module Perl::Critic
1.156 Tue Oct 22 23:42:06 CDT 2024
[Fixes]
Subroutines::ProhibitManyArgs no longer gets confused by underscores in
variable names. Thanks, Paul Johnson. (GH #1027)
1.154 Sun Oct 20 22:41:15 CDT 2024
[Enhancements]
ProhibitedUnusedCapture now recognizes %+, %-, %{^CAPTURE} and
%LAST_PAREN_MATCH. Thanks, Dagfinn Ilmari Mannsåker. (GH #1065)
Fixed a deprecation warning in the extras/perlcritic.el Emacs script.
Thanks, Rolf Stöckli. (GH #1067)
RequireExplicitPackage now accepts a use VERSION as the first line.
Thanks, Philippe Bruhat. (GH #1070)
[Fixes]
Fix some false positives for function calls as a hash index. Thanks,
Jaap Eldering. (GH #1071)
[Documentation]
Clarify C<package_exemptions> rules. Thanks, Felix Ostmann. (GH #1043)
1.152 Mon Oct 16 10:32:04 PM CDT 2023
Now requires PPI 1.277.
[Fixes]
Fix a test failure for Subroutines::RequireArgUnpacking. Thanks, Christian
Walde. (GH #1048)
Fixed a test failure in t/06_violation.t on Perl 5.39.1 or above. Thanks,
Yves Orton. (GH #1037)
1.150 Sat Mar 4 21:17:45 CST 2023
[Enhancements]
Added Test::Builder and Text::Wrap to the list of default exceptions in
Variables::ProhibitPackageVars. Thanks, Graham Knop. (GH #1025)
[Internals]
We now use PPIx::Utils instead of PPIx::Utilities, which is more recently
maintained.
1.148 Sat Jan 7 15:20:07 CST 2023
[Possible breakage]
Removed Perl::Critic::Utils::DataConversion. Any add-on policies that used
it will need to copy the functions from there into their own code.
[Documentation]
ProhibitCascadingIfElse no longer suggests using given/when.
[Internals]
We no longer require Test::Deep for testing.
Test::Kwalitee is now only recommended, not required.
Random microoptimizations, like using hashes for array contents checking,
and using any() instead of calling grep as a boolean.
1.146 Wed Dec 21 21:05:20 CST 2022
[New features]
ProhibitBarewordDirHandles now checks for sysopen as well as open. Thanks,
Tadeusz Sośnierz. (GH #732)
Added a Dockerfile in the extras/ directory for those who want to run P::C
in a container. Thanks, Isaac Gittins. (GH #832)
Subroutines::ProhibitBuiltinHomonyms now can take an "allows" parameter to
specify subroutines that won't violate the policy. Thanks, UTAGAWA Kiki.
(GH #14, #932)
ProhibitStringyEval now allows package declarations in evals when
allow_includes = true. This is a common way packages are declared.
Thanks, Chris Novakovic. (GH #908)
[Bug Fixes]
Fixed some problems with how Perl::Critic determined scope. Thanks, Tom
Wyant. (GH #793)
Fixed improper violation for lexical subroutines in
Subroutines::ProhibitBuiltinHomonyms. Thanks, TOYAMA Nao. (GH #973, #955,
#546)
ValuesAndExpressions::RequireNumberSeparators no longer complains if your
version numbers do not have number separators in them. Thanks, Tom Wyant.
(GH #856, #904)
Fixed a false positive with split() in ProhibitUnusedCapture. Thanks, Tom
Wyant. (GH #888)
[Internals]
We no longer use or need IO::String. Thanks, Graham Knop. (GH #997)
Removed requirements and mentions of modules no longer used:
* Fatal
* IO::String
* IPC::Open2
* Pod::Parser
* Task::Weaken
1.144 Mon Dec 5 09:44:04 PM CST 2022
Perl::Critic now requires Perl 5.10.1.
[New features]
The ProhibitAugmentedAssignmentInDeclaration policy now allows augmented
assignments to "our" variables, if the allow_our option is enabled.
Thanks, Graham Knop. (GH #993)
ProhibitExplicitISA now recommends "use parent" instead of "use base".
(GH #987)
RequireUseWarnings now recognizes that "use v5.36" implies warnings.
Thanks, Andrew Grechkin. (GH #984)
Subroutines::ProhibitNestedSubs now allows lexical subroutines can
now be inside of other subroutines. Thanks, TOYAMA Nao. (GH #946,
#971, #972)
RequireUseStrict now knows that Test::Spec enables it. (GH #906)
ProhibitUnusedCapture now understands @{^CAPTURE} and %{^CAPTURE_ALL} that
were added in Perl 5.26.0. Thanks, Tom Wyant. (GH #778)
Allow numeric operators on special number strings 'NaN' and 'inf'. Thanks,
Omer Gazit. (GH #803)
[Fixes]
Miscellanea::ProhibitUselessNoCritic no longer filters out errors about
itself, just as Miscellanea::ProhibitUnrestrictedNoCritic cannot. Thanks,
Bernhard Schmalhofer. (GH #939)
Fixed GH #878: bareword filehandle dies on `open(CHECK, '/foo');`. Thanks,
Tom Wyant.
[Internals]
Updated to using Perl 5.10.1. Starting migrating to Perl 5.10-isms like
defined-or. Thanks, James Raspass.
[Documentation]
Updated some outdated docs in Perl::Critic::Utils. Thanks, Slaven Rezić.
(GH #951)
1.142 Mon Nov 28 08:12:14 PM CST 2022
This is the last version of Perl::Critic that will run on Perl 5.6.1. The
next release will require Perl 5.10.1.
[New Features]
Add new policy InputOutput::ProhibitBarewordDirHandles, comparable to
ProhibitBarewordFilehanles. Thanks, raf. (GH #912)
References::ProhibitDoubleSigils policy now allows for Perl's
postfix dereference syntax and does not report a policy violation.
Thanks to Ilya Rassadin (GH #578)
Added Test::Class::Moose and MooseX::MethodAttributes::Role to the
list of modules that are equivalent to "use strict". (GH #808, GH #886)
Subroutines::RequireArgUnpacking now detects anonymous subroutines with
attributes, prototypes or signatures. Thanks, Tom Wyant. (GH #684)
ProhibitVoidMap and ProhibitVoidGrep now detect void context inside subs,
such as:
sub { map { foo($_) } @list; return }
Thanks, James Raspass. (GH #905)
RequireArgUnpacking now allows a closure to be recognized as a way that
subroutine arguments can be unpacked. This is specified with an optional
allow_closures configuration option. Thanks, Tom Wyant. (GH #737)
ProhibitTwoArgOpen now disallows one-arg opens as well. Also, it
no longer allows two-arg opening of STDIN/STDOUT/STDERR. Thanks,
Dan Book. (GH #652, #653)
[Fixes]
ProhibitLeadingZeros would not handle sysopen and lexical variables
correctly. This has been fixed. Thanks, Tom Wyant. (GH #789)
[Documentation]
We note that the any() function is available in both List::MoreUtils and
List::SomeUtils.
Added instructions to perlcritic on how to integrate with Visual Studio
Code. Thanks, sigzero.
[Internals]
Switch to using List::SomeUtils instead of List::MoreUtils.
1.140 Tue Mar 23 21:42:19 CDT 2021
[New Features]
Subroutines::RequireFinalReturn now lets you specify a
terminal_methods parameter to specify methods that should been as
terminal. This is like the terminal_funcs parameter, but for methods.
Thanks, Robin Smidsrød and Mike Bruins. (GH #920)
1.139_01 Tue Sep 1 23:52:18 CDT 2020
[Fixes]
Removed an extra /x in RequireInterpolationOfMetachars.pm that caused
deprecation warnings in Perl 5.22 and higher. (GH #822)
Documentation::RequirePackageMatchesPodName now recognizes the package
name if it's in C<< I<> >> or C<< B<> >> markup. Thanks, Renée Bäcker.
(GH #913)
1.138 Fri Jan 24 15:50:34 CST 2020
Stable release. No changes since 1.137_01.
1.137_01 Thu Jan 23 16:44:57 CST 2020
[Fixes]
RequireCheckingReturnValueOfEval didn't count returning the result of an
eval as checking it. Now it does. However, it's only if you "return eval
{ ... }". It still doesn't handle the case of "return ( eval {} )".
Thanks, Tom Wyant. (GH #324)
ProhibitPunctuationVars would get confused and think that the expression
qr/SOME$/ was using the $/ special variable. Thanks, Tom Wyan. (GH #843)
1.136 Wed Nov 27 09:51:09 CST 2019
Stable release. No changes since 1.135_01.
1.135_01 Tue Nov 26 14:50:11 CST 2019
[New Features]
The ProhibitNoWarnings pollicy now handles warnings in the experimental::
group. Thanks, Renée Bäcker. (GH #892)
[Documentation]
Prevented some example code from showing up in `perldoc`. Thanks, Tom
Hukins. (GH #799)
1.134 Wed May 22 21:17:21 CDT 2019
Stable release. No changes since 1.133_02.
1.133_02 Mon May 20 10:48:16 CDT 2019
[New Features]
* Support indented heredocs. Thanks, Gregory Oschwald. (GH#861)
* In Subroutines::ProhibitManyArgs, you can now omit the object
variable (C<$self> or C<$class>) from the argument count. Thanks,
Szymon Nieznański. (GH#815)
[Dependencies]
* Removed use of File::HomeDir. Thanks, Karen Etheridge.
* Upgrade to PPI 1.265. By Will Braswell. (GH#860)
* Fix failed tests caused by new PPI. Thanks, Szymon Nieznański.
(GH #858)
[Internals]
* Updated the Appveyor config. Thanks, Roy Ivy III. (GH#851)
1.133_01 Thu Oct 25 23:21:31 CDT 2018
[New Features]
* Added new policy BuiltinFunctions::ProhibitShiftRef. It disallows
this construct that causes a memory leak in Perl 5.21.4 and above:
my $ref = \shift;
The documentation for the policy contains details on when this can
happen. Thanks, Todd Rinaldo. (GH#837)
[Policy Changes]
* The policy Documentation::RequirePodLinksIncludeText is obsolete and
has been removed. Thanks, Salvatore Bonaccorso. (GH#494)
1.132 Thu May 31 21:48:48 CDT 2018
[New Features]
* Added the ability to specify a regex to tell what unused private
subroutines are OK in Subroutines::ProhibitUnusedPrivateSubroutines.
This is handy for Moose classes where there could be many false
positives on _build_xxxx() subroutines.
Thanks, Dave Cross. (GH #811, #812)
[Dependencies]
* Perl::Critic now no longer relies on the deprecated Email::Address.
Thanks, Giovanni Mariani. (GH #816)
1.131_02 Tue Feb 20 17:18:03 CST 2018
[New Features]
* Perl::Critic now assumes that .psgi files are Perl, too. Thanks, Tom
Hukins. (GH#805)
* Variables::ProhibitUnusedVariables no longer gives a false positive for
variables used in interpolation. Thanks, Omer Gazit. (GH#801)
[Bug Fixes]
* Added missing requirement for Fatal.pm.
1.131_01 Tue Nov 21 17:28:06 CST 2017
[New Features]
* In the ProhibitLeadingZeros policy, added an exception for mkfifo.
Thanks, Evan Zacks. (GH#786)
* Add color support for Windows platforms. Thanks, Roy Ivy III. (GH#700)
[Bug Fixes]
* Recode Perl::Critic::Utils::all_perl_files() to use File::Find instead
of opendir/readdir. This solves endless directory traversals if
the directories contain circular symbolic references. Thanks, Tom Wyant.
[Documentation]
* Added CONTRIBUTING.md. Thanks, Jonas B. Nielsen.
1.130 Thu Jul 20 23:16:34 CDT 2017
[New Features]
* Policies which ensure that system calls are checked such as
RequireCheckedSystemCalls now have an "autodie_modules" setting which
allows you to tell the policy about other modules which export
autodie. Fixes #699. PR #747. Thanks to Dave Rolsky.
1.128 Sat Jun 10 22:31:28 CDT 2017
Stable release. No changes since 1.127_02.
1.127_02 Tue May 23 18:31:59 CDT 2017
Developer release leading up to 1.128.
[Bug Fixes]
* PPI misparsing a module caused an incorrect "Must end with a
recognizable true value." This is fixed by upgrading to PPI
1.224. (GH #696, GH #607)
* A test would fail under the upcoming Perl 5.26 that omits the current
directory from @INC. Thanks, Kent Fredric.
* Fixed an invalid test in the RequireBarewordsIncludes test. Thanks,
Christian Walde. (GH #751)
* If an element contained blank lines then the source "%r" displayed
for a violation was wrong. Thanks, Sawyer X. (GH #702, #734)
[Dependencies]
Perl::Critic now requires PPI 1.224. PPI is the underlying Perl parser
on which Perl::Critic is built, and 1.224 introduces many parsing fixes
such as:
* Fixes for dot-in-@INC.
* Parse left side of => as bareword even if it looks like a keyword or op.
* $::x now works.
* Higher accuracy when deciding whether certain characters are operators or
variable type casts (*&% etc.).
* Subroutine attributes parsed correctly.
[Performance Enhancements]
* Sped up BuiltinFunctions::ProhibitUselessTopic ~7%. Thanks, James
Raspass. (GH #656)
[Documentation]
* Fixed incorrect explanation of capture variables in
ProhibitCaptureWithoutTest. Thanks, Felipe Gasper.
* Fixed incorrect links. Thanks, Glenn Fowler.
* Fixed incorrect example for returning a sorted list. Thanks, @daviding58.
* Fixed invalid POD. Thanks, Jakub Wilk. (GH #735)
* Updated docs on ProhibitYadaOperator. Thanks, Stuart A Johnston. (GH #662)
* Removed all the references to the old mailing list and code repository
at tigris.org. (GH #757)
1.127_01 Sun May 21 21:57:16 CDT 2017
Removed from CPAN because it did not get indexed correctly.
1.126 2015-08-10
[New Policies]
* Added a policy: ControlStructures::ProhibitYadaOperator - Never use ...
in production code.
[Bug Fixes]
* Fixed problems arising from having -b in your .perltidyrc file. Thanks
@hjkatz.
* Removed extra newline from policy names returned by P::C::Config->policies.
Thanks @ratsbane.
* `fc` and `say` are now covered by ProhibitUselessTopic. Thanks @JRaspass.
[Miscellanea]
* Add more strict/warnings importer modules. Thanks @oalders.
* Path::Tiny is now recommended over File::Slurp
* Micro-optimize by calling ->content() directly instead of going
through the overloads. Thanks @JRaspass.
* Square brackets are now allowed around your `## no critic` policy
list. Thanks @zdm.
1.125 2015-03-02
[Bug Fixes]
* Corrected dependency on List::Util::any() to List::MoreUtils::any()
[Miscellanea]
* Revised and updated documentation.
1.124 2015-02-27
[Policy Changes]
* The ProhibitUnusedPrivateSubroutines policy can now ignore files that
use particular modules with 'skip_when_using' option allows of, for
example, skipping the policy for roles. Thanks to Mark Fowler.
* The RequireUseStrict and RequireUseWarnings policies now regard Moose,
Moo, Mouse, Dancer, Mojolicious, and several other modules as equivalent
to the strict and warnings pragma.
[Bug Fixes]
* The RequireChecked* family of policies has been fixed to accommodate
version numbers when use-ing the autodie pragma. GH #612. Thanks citrin.
1.123 2014-11-11
[Dependencies]
* Now requires PPI-1.220 which has numerous bug fixes. This may
eliminate the need for some "## no critic" markers you inserted to
work around those bugs. The "ProhibitUselessNoCritic" policy should
help you find them.
[Miscellanea]
* Fixed a typo in the Variables::ProhibitPerl4PackageNames message.
1.122 2014-08-25
[Dependencies]
* Now requires PPI-1.218 which has numerous enahncements and bug fixes.
Also now requires Readonly-2.00, which obviates the need for Readonly::XS
to get fast constants.
* File::HomeDir, File::Which, and Term::ANSIColor are all required now
instead of being optional or recommended. This simplifies our test code
and ensures consistent optimal behavior for all users.
[New Policies]
* Added two new policies: BuiltinFunctions::ProhibitUselessTopic and
RegularExpressions::ProhibitUselessTopic.
[Miscellanea]
* Updated the perlcritic.el script to use modern Emacs hooks.
Thanks to @intrigeri and the Debian team for the patch. Fixes GH #556.
* Removed all the internal RCS keyword boilerplate blocks that were never
getting expanded.
1.121_01 2013-11-17
* Changes summarized above under 1.122
1.121 2013-11-02
[New Features]
* Added new themes based on CERT guidelines. Thanks Kirk Kimmel.
[Administrative Changes]
* The source code repository for Perl-Critic has been moved to GitHub
at http://github.com/Perl-Critic/Perl-Critic. All tickets from the
RT queue have also been moved there. Please use GitHub for submitting
any new bugs or corresponding about existing ones. Huge thanks to
Tim Bunce, Andreas Marienborg, fREW Schmidt, and Graham Knop for
making this happen.
[Miscellanea]
* This change log was reformatted to comply with CPAN::Changes::Spec,
courtesy of Neil Bowers as part of a quest on http://questhub.io.
Does your change log comply?
1.120_01 2013-10-29 *DEVELOPER RELEASE*
* Changes summarized above
1.120 2013-10-25
[Bug Fixes]
* Corrected "Possible precedence issue with control flow operator"
warning. This fixes RT #88866
1.119 2013-09-25
[Bug Fixes]
* Tests were failing with Config::Tiny 2.17 or later, due to a
change in the error messages produced by that module.
This fixes #16 on Github, #88679 & #88889 on RT.
[Policy Changes]
* BuiltinFunctions::ProhibitVoidGrep and ::ProhibitVoidMap: grep
and map called as functions are now allowed in slice operations.
RT #79289. Thanks to Wade at Anomaly dot org for the patch.
* Subroutines::RequireArgUnpacking: Most tests of the size of @_
are now allowed. RT #79138
[Other Changes]
* Modernized our usage of Exporter. See RT #75300. Thanks
to Olivier Mengué for the patch.
1.118 2012-07-10
[Policy Changes]
* CodeLayout::RequireTidyCode: Revise to work with incompatible
changes in Perl::Tidy 20120619. RT #77977.
* TestingAndDebugging::ProhibitNoWarnings: Correct the parse of the
'no warnings' statement, so that 'no warnings "qw"' is recognized
as suppressing just 'qw' warnings. RT #74647.
* Miscellanea::RequireRcsKeywords has been moved to the Perl-Critic-More
distribution, RT #69546
[Other Changes]
* Make all unescaped literal "{" characters in regexps into
character classes. These are deprecated, and became noisy with
Perl 5.17.0. RT #77510.
1.117 2011-12-21 HAPPY HOLIDAYS!
[New Policies]
* Variables::ProhibitAugmentedAssignmentInDeclaration reports
constructs like 'my $x += 1'. Contributed by Mike O'Regan.
[Policy Changes]
* BuiltinFunctions::ProhibitLvalueSubstr: Add explicit 'use version'.
RT #68498.
* CodeLayout::ProhibitHardTabs: Add 'pbp' to the default_themes list.
RT #71093.
* ControlStructures::ProhibitMutatingListFunctions now understands that
tr///r (introduced in 5.13.7) does not change its operand.
* ControlStructures::ProhibitMutatingListFunctions now understands that
'//=', '<<=', and '>>=' are assignment operators. RT #70901.
* ErrorHandling::RequireCheckingReturnValueOfEval now allows things
like grep { eval $_ }. RT #69489.
* Modules::RequireExplicitPackage now has configuration option
allow_import_of, to allow the import of specified modules before
the package statement. RT #72660.
* RegularExpressions::ProhibitEnumeratedClasses no longer thinks
that [A-Za-z_] matches \w. RT #69322.
* RegularExpressions::ProhibitUnusedCaptures now skips the first
block of an 'if' or 'elsif' if the regular expression is bound to
its operand with the '!~' operator. RT #69867.
* RegularExpressions::ProhibitUnusedCaptures now looks into lists
and blocks in the replacement portion of the regular expression if
/e is asserted. RT #72086.
* RegularExpressions::RequireDotMatchAnything,
RegularExpressions::RequireExtendedFormatting and
RegularExpressions::RequireLineBoundaryMatching now honor defaults
set with 'use re "/modifiers"'. RT #72151.
* Subroutines::ProhibitManyArgs now recognizes '+' as a prototype
character.
* Variables::ProhibitPunctuationVars now recognizes bracketed
variables embedded in interpolated strings (e.g. "${$}"). For the
purpose of the 'allow' configuration, these are considered
equivalent to the unbracketed form. RT #72910.
[Other Changes]
* Corrected POD in Perl::Critic::PPI::Utils. RT #68898.
* Perl::Critic::Violation source() method now returns the line
containing the violation (not the first line) when the statement
containing the violation spans multiple lines.
1.116 2011-05-15
[Policy Changes]
* BuiltInFunctions::ProhibitLvalueSubstr does not report violations
if the document contains an explicit 'use n.nnn;' where the
version is before 5.005. RT #59112
* Documentation::RequirePodSections no longer blows up on code
having POD but no =head1. This problem was introduced with RT
#59268. RT #67231
* RegularExpressions::ProhibitUnusedCapture should more reliably
find things like s/(a)/${1}2/. RT #67273.
* ValuesAndExpressions::ProhibitMagicNumbers and
Module::RequireVersionVar now treat versions passed as the second
argument of a 'package' statement the same as versions declared as
'our $VERSION ...'. RT #67159
* Variables::RequireLexicalLoopIterators does not report violations
if the document contains an explicit 'use n.nnn;' where the
version is before 5.004. RT #67760
1.115 2011-03-31
[Minor Changes]
* Fatal error in RegularExpressions::ProhibitUnusedCapture here
document check. RT #67116.
* Internal POD error in Documentation::RequirePodLinksIncludeText. Patch
by Salvatore Bonaccorso. RT #67012
1.114 2011-03-26
[Policy Changes]
* Documentation::RequirePodLinksIncludeText now handles nested POD
formatting. RT #65569
* Clarified relation of severity numbers to names in Perl::Critic
POD. RT #66017
* Removed caveats from Variables::RequireLocalizedPunctuationVars,
no longer necessary with PPI 1.208. RT #65514
* Have InputOutput::RequireBriefOpen attempt to expand scope as
necessary to deal with the case where the open() and the
corresponding close() are not in the same scope. RT #64437
* RegularExpressions::ProhibitUnusedCapture now looks inside
double-quotish things. RT #38942.
* RegularExpressions::ProhibitUnusedCapture now takes logical
alternation into account, so that (e.g.)
if ( /(a)/ || /(b)/ ) {
say $1;
}
is not a violation. RT #38942.
* ValuesAndExpressions::ProhibitCommaSeparatedStatements now
recognizes 'return { foo => 1, bar => 2 }' as containing a hash
constructor, not a block. This was fixed by PPI 1.215. RT #61301.
* ValuesAndExpressions::ProhibitCommaSeparatedStatements now
recognizes 'bless { foo => 1, bar => 2 }' as containing a hash
constructor, not a block. This was fixed by PPI 1.215. RT #64132.
1.113 2011-02-14
[New Policies]
* InputOutput::RequireEncodingWithUTF8Layer recommends
':encoding(utf8)' over ':utf8' in open() and binmode(). It is severity 5
because of the bad things that can happen if invalid UTF8 gets loose in
your code.
* Modules::ProhibitConditionalUseStatements prohibits
'use module' inside a conditional, since the statement is executed
unconditionally at compile time. Thanks to Peter Guzis for submitting
the policy and tests in RT #59065.
[Policy Changes]
* CodeLayout::RequireConsistentNewlines produces multiple undefined
value errors when a violation is found. RT #65663
* ControlStructures::ProhibitMutatingListFunctions allows s///r,
which was introduced in 5.13.2.
* ControlStructures::ProhibitPostfixControls now looks for "when". It is
treated in the same way as "if".
* Documentation::RequirePodSections now honors '## no critic'
annotation anywhere before the '__END__', '__DATA__', or first
'=head1', whichever comes first. The line number of the offending
'=head1 NAME' was added to the violation description. RT #59268.
* RegularExpressions::ProhibitUnusedCapture now takes account of the
use of $- and $+ (and their English equivalents under 'use
English') provided the subscripts are literal integers.
* RegularExpressions::ProhibitUnusedCapture now takes account of the
use of capture variables in the replacement portion of
s/.../.../e.
* Subroutines::ProhibitUnusedPrivateSubroutines now looks inside
regular expressions.
* ValuesAndExpressions::ProhibitMagicNumbers now supports Const::Fast.
* ValuesAndExpressions::ProhibitMagicNumbers now has a
constant_creator_subroutines parameter to allow the user to
configure the names of subroutines that create constants. RT #62562.
* ValuesAndExpressions::ProhibitMismatchedOperators didn't handle file
test operators properly. Patch by H.Merijn Brand. RT #58751
* Variables::ProhibitUnusedVariables now looks inside regular
expressions.
* ValuesAndExpressions::RequireInterpolationOfMetachars now detects
and complains about "\b" and "\l" as documented in perlop, and
"\1" through "\7", which are not documented there, but were found
in toke.c.
[New Developer Features]
* uses_module(), namespaces(), and subdocuments_for_namespace() methods on
Perl::Critic::Document.
* Perl::Critic::Document->new() now accepts a -filename-override argument
for setting the filename when the source code comes from something
other than an actual file.
[Other Changes]
* Test::Perl::Critic::Policy no longer exports by default.
* Build phase now requires Test::Deep.
* Added example using Try::Tiny to documentation of
ErrorHandling::RequireCheckingReturnValueOfEval. Suggested by Andy
Lester on the developers mailing list.
* In order to get more consistent behavior across all installations of
Perl::Critic, IPC::Open2 (which actually is part of core), PPIx::Regexp,
Perl::Tidy, Pod::Spell, and Text::ParseWords are no longer optional
prerequisites.
* Now depends upon PPIx::Utilities v1.1.0.
[Bug Fixes]
* Build.PL/Makefile.PL didn't specify a minimum version of version.pm, but
TestingAndDebugging::RequireUseStrict did. RT #58952
* Perl::Critic::Annotation needs to look inside the __END__ statement to
find the true end of the document, otherwise POD policies may give false
positives. RT #59176
* BuiltinFunctions::ProhibitStringyEval no longer dies on eval
"#...". RT #60179
* RegularExpressions::ProhibitUnusedCapture now takes account of the
%LAST_PAREN_MATCH as well as %+ if English has been loaded. RT #60002
* Subroutines::ProhibitManyArgs now interprets prototype groups (e.g.
\[$@%]) as representing a single argument.
* Require Exporter version 5.63 (versus version 0) to get sane handling of
export tags. RT# 61071
* Prevent Subroutines::ProhibitUnusedPrivateSubroutines from failing
on &_subroutine(). RT #61311
* Subroutines::ProhibitAmpersandSigils now allows references of the
form \( &sub1, &sub2 ). RT #49609
1.112_002 2011-02-09
1.112_001 2010-12-14
* Changes summarized into 1.113 above.
For exact details, see Changes on BackPAN.
1.111 2010-12-14
[Bug Fixes]
* TestingAndDebugging::ProhibitNoStrict and ProhibitNoWarnings no longer
rely on the behavior of all() when the list is empty due to change in
List::MoreUtils 0.28. RT #63816
1.110_001 2010-11-30
* Changes summarized into 1.113 above.
For exact details, see Changes on BackPAN.
(Yes, all of this stuff was not in 1.111.)
1.109 2010-08-29
[Bug Fixes]
* ValuesAndExpressions::RequireInterpolationOfMetachars fix due to changes
in Email::Address 1.890. Note that this may find problems in code that
it didn't before, e.g. q<'@foo'>.
1.108 2010-06-22
[Dedication]
* This is the "Give Shawn Moore what we promised him a year ago and hurry
up and get this out before Brad Oaks gives his YAPC::NA talk" release.
[New Policies]
* Documentation::RequirePodLinksIncludeText
* Subroutines::ProhibitUnusedPrivateSubroutines
[New Features]
* There is a new global configuration item, 'program-extensions', which
configures Perl::Critic's idea of which file name extensions represent
programs. The desired extensions are specified as a space-separated list,
with leading '.' on each if that is desired. Files whose names end in
'.PL' will always be considered programs. This can be overridden by
command option --programs-extensions, which can be specified multiple
times.
* There is now a perlcritic --allow-unsafe switch. Without this switch,
Perl::Critic will silently refuse to load any Policy that is marked
unsafe. Unsafe Policies are usually ones that may compile or execute
untrusted code (see Perl::Critic::DynamicPolicy for an example); Policy
authors can mark their policies as unsafe by overriding the is_safe()
method.
* The framework that we use to test Perl::Critic Policies has been
packaged into a convenient module that you can use to test your own
Policies. See Test::Perl::Critic::Policy and Perl::Critic::TestUtils
for details.
[Policy Changes]
* BuiltInFunctions::ProhibitLvalueSubstr no longer complains when there
is a low-precedence operator between the substr() and the assignment
operator.
* CodeLayout::ProhibitParensWithBuiltins now allows 'state ($foo)'. RT
#52029
* ErrorHandling::RequireCarping now has an
allow_in_main_if_not_in_subroutine option to allow "die" directly in
the default namespace.
* InputOutput::RequireBriefOpen now recognizes CORE::open(),
CORE::close(), CORE::GLOBAL::open(), and CORE::GLOBAL::close(). RT
#52391
* Modules::ProhibitEvilModules now complains by default about the modules
deprecated by the Perl 5 Porters in 5.12.
* Modules::RequireVersionVar documentation updated to make clear that "my
$VERSION" does not work as a module version declaration. RT #56667
* The RegularExpressions::* policies have been converted from using
Regexp::Parser to using PPIx::Regexp for their heavy lifting.
* RegularExpressions::ProhibitCaptureWithoutTest now allows capture
variables inside when() {}. RT #36081.
* RegularExpressions::ProhibitUnusedCapture now checks for unused named
captures.
* Subroutines::ProhibitManyArgs revised to count only characters in the
prototype that represent arguments. RT #56627
* Subroutines::ProhibitNestedSubs no longer complains about scheduled
blocks (BEGIN, etc.) inside subroutines and vice versa.
* Subroutines::RequireFinalReturn should now understand a final given/when
statement, and declare an error if there is no 'default' block or if any
branch does not return.
* TestingAndDebugging::RequireUseStrict now accepts 'use 5.011' or greater
as equivalent to 'use strict'.
* ValuesAndExpressions::ProhibitMismatchedOperators false positive with
"'foo' x 15 . 'bar'". RT #54524
* Variables::ProhibitPunctuationVars gave false positives on qr// regexp's
ending in '$'. RT #55604
[Bug Fixes]
* The "## no critic" annotations now respect #line directives.
* Annotations on statements spanning more than one line (e.g.
my $foo =
'$bar'; ## no critic (RequireInterpolationOfMetachars)
) are now handled as single-line annotations, not block annotations.
* All instances of L<Foo> in the POD have been changed to L<Foo|Foo>.
L</bar> and L<Foo/bar> were allowed to stand. RT #37485
* Spaces are now allowed immediately inside the enclosing parentheses in
"## no critic ( Foo )". RT #52038
* With the introduction of PPIx::Regexp, Perl::Critic no longer dies
when it encounters a Perl 5.010 regexp. RT #49442.
* DEVELOPER.pod typo in link to
ValuesAndExpressions::ProhibitConstantPragma policy. RT #57818
* Spelling errors in documentation. RT #57375
* "die" used instead of "croak". RT #56619
* Fixed regex test that caused test failures on every Perl 5.11
(credit Tom Wyant).
* t/20_policy_pod_spelling.t now works (or at least no longer fails)
in non-English locales (again). RT #43291 and RT #48986.
* Perldoc has broken link for McCabe score definition. RT #53219
* RT #33935 and #49679 were fixed by upgrading to PPI 1.208
[Other Changes]
* Perl::Critic::Utils::is_unchecked_call() updated to include chmod in the
set of things covered by autodie (this happened in autodie v2.08). The
primary effect of this is on InputOutput::RequireCheckedSyscalls.
* Now depends upon Task::Weaken to ensure that we only install with perls
where Scalar::Util::weaken() works.
* Email::Address was optional, but is now required. So everyone
gets the optimal behavior from RequireInterpolationOfMetachars.
* Some infrastructure has been extracted to the new PPIx-Utilities
distro. It is also a required dependency here. Over time a good
portion of Perl::Critic::Utils* will be migrated to this distribution.
* Perl::Critic::Utils::PPI::get_constant_name_element_from_declaring_statement()
is deprecated because it doesn't handle multiple constants being
declared within a single "use constant" statement. Use
PPIx::Utilities::Statement::get_constant_name_elements_from_declaring_statement()
instead.
* Removed all uses of Perl::Critic::Utils::PPIRegep. Since the
PPIx::Regexp update, Perl::Critic only used get_match_string() and
friends, which were superseded by the corresponding PPI methods.
Perl::Critic now depends on PPI-1.208 or newer.
* Moved Perl::Critic::Utils::PPIRegexp to the Perl-Critic-Deprecated.
* The PolicySummary.pod file is now generated when the distribution
is created, rather than when you install it. This ensures the file
will be available on http://search.cpan.org. Thanks to Bear Longyear
for bringing this to our attention.
1.107_001 2010-06-20
* Changes summarized into 1.108 above.
For exact details, see Changes on BackPAN.
1.106 2010-05-10
[Bug Fixes]
* NamingConventions::Capitalization fix for PPI 1.212. RT #57348
1.105_03 2010-03-21
1.105_02 2010-01-23
1.105_01 2010-01-16
* Changes summarized into 1.108 above.
For exact details, see Changes on BackPAN.
1.105 2009-09-07
[Bug Fixes]
* Variables::ProhibitPunctuationVars would complain about "%-" appearing
anywhere in a string. RT #49016
[Policy Changes]
* InputOutput::RequireCheckedSyscalls now complains about unchecked "say"
by default. RT #37487
1.104 2009-08-23
[Dedication]
* This release is dedicated to Tom Wyant in appreciation of the amount of
effort he put into the enhancements and bug fixes in this release, for
having the patience to wait for the amount of time that it took to get
them out, and for overall awesomeness. Thank you, Tom.
[New Policies]
* Objects::ProhibitIndirectSyntax
* ValuesAndExpressions::ProhibitComplexVersion
* ValuesAndExpressions::RequireConstantVersion
[New Optional Requirement]
* Email::Address, if you want
ValuesAndExpressions::ProhibitInterpolationOfLiterals to properly ignore
email addresses.
[New Features]
* Perlcritic will list the names of files with violations if given the
--files-with-violations option, or the names of files without
violations if given the --files-without-violations options. These
have synonyms -l and -L respectively.
* Perlcritic has a new --list-enabled option, which lists the Policies
that will be enforced, given the current configuration. This is
useful if you've written a complex command-line or modified your
.perlcriticrc file and you want to see which Policies *would*
be used with the current configuration, if you were actually going
to critique a file with it.
* Perl::Critic::Violation now takes #line directives into account in the
%F, %f, and %l formats. You can get the old values via the new %G, %g,
and %L formats.
[Policy Changes]
* CodeLayout::ProhibitParensWithBuiltins was complaining in certain cases
where parentheses are required due to operator precedence. RT #46862.
* ControlStructures::ProhibitMutatingListFunctions no longer complains
about uses of tr/// that don't modify the operand. Reported by EDAVIS,
RT #44515.
* Miscellanea::RequireRcsKeywords now accepts "qw$Keyword: ...$". RT
#45196.
* Modules::RequireFilenameMatchesPackage now respects logical filenames
defined by the "#line" directives. This allows the Policy to work
properly with IDEs and code generators.
* NamingConventions::Capitalization now allows fully qualified subroutine
declarations ( e.g. "sub Foo::Bar::baz {...}" ). However, the
non-package part of the subroutine name must still conform to whatever
capitalization rule you have chosen.
* RegularExpressions::ProhibitCaptureWithoutTest no longer complains if
the regex is followed by an "or die" or similar. Reported by EDAVIS,
RT #36081.
* RegularExpressions::ProhibitComplexRegexes no longer counts variable
substitutions in the length. Reported by EDAVIS, RT #36098.
* RegularExpressions::ProhibitUnusedCapture now considers the body of
while loops and not just their condition. Reported by EDAVIS, RT
#38942.
* ValuesAndExpressions::ProhibitVersionStrings was getting confused by
comments. Reported by Kevin Ryde, RT #44986.
* ValuesAndExpressions::RequireInterpolationOfMetachars now allows sigils
in the arguments to "use vars". Contributed by Kevin Ryde, RT #47318.
* ValuesAndExpressions::RequireInterpolationOfMetachars now properly
ignores email addresses, if you have Email::Address installed. Inspired
by the Kevin Ryde contribution in RT #47318.
* Variables::ProhibitPunctuationVars gained the ability to look inside
interpolated strings. Doing this correctly is challenging and things
may not work out right; how the policy does this can be controlled via
the new "string_mode" option. Contributed by Edgar Whipple
<perlmonk at misterwhipple dot com>.
* Variables::ProhibitPunctuationVars now ignores $] by default since there
is no English.pm equivalent.
[Other Bug Fixes]
* Perl::Critic::Utils::parse_arg_list() was slurping up the "or die ..."
portion of "open my $foo, 'somefile' or die ...", causing
InputOutput::ProhibitTwoArgOpen to not complain about this example.
Reported by Alexandr Ciornii, RT #44554.
[Minor Changes]
* The line count emitted by the --statistics option is further broken down
by line content.
[Minor Documentation Fixes]
* ValuesAndExpressions::ProhibitInterpolationOfLiterals. Reported by
Debian in http://bugs.debian.org/542814, RT #48936
[Build Fixes]
* There wasn't a specific version given for the List::MoreUtils dependency
and we're using features that weren't available until 0.19. So, we now
require version 0.19. Noticed by John J. Trammell, RT #48917.
* Some tests were tied to the specific "true" and "false" values that some
functions were returning. Reported by Michael Schwern, RT #43910.
[Other News]
* Komodo version 5.1.1 now has built-in support for Perl-Critic,
if you have the Perl::Critic and criticism modules installed.
Both should be available through the ActiveState Perl Package
Manager ppm(1).
1.103 2009-08-03
* Fix configure_requires prerequisite on Module::Build 0.34_02.
1.102 2009-08-03
[Bug Fixes]
* Works with PPI 1.205. Yay for 5.10 support!
* Variables::RequireLexicalLoopIterators didn't work correctly on foreach
loops with labels.
1.101_003 2009-07-22
1.101_002 2009-07-21
1.101_001 2009-07-21
* Changes summarized into 1.102 above.
For exact details, see Changes on BackPAN.
1.100 2009-07-17
* This is a POD fix release to deal with issues identified by Test::POD
1.40. There is no functional difference between this release and 1.098.
This is the last release of Perl::Critic that will be compatible with PPI
1.203. PPI's parsing of for(each)? loops is changing in its next release
in an incompatible manner and there will be a release in the near future
to make Perl::Critic compatible with that change.
1.099_002 2009-06-27
1.099_001 2009-06-25
* Experimental releases. For exact details, see Changes on BackPAN.
1.098 2009-03-07
[Some Exciting News]
* The Perl Development Kit (PDK 8.0) from ActiveState now includes a
very slick graphical interface to Perl-Critic. I highly recommend
that you check it out. Here's a link to screenshots and docs:
http://docs.activestate.com/pdk/8.0/PerlCritic_gui.html
[New Features]
* Violation coloring is now configurable via command line or profile. The
profile entries are color-severity-highest, -high, -medium, -low, or
-lowest. Numbers are accepted in lieu of named severities (e.g.
'color-severity-5' for 'color-severity-highest'), and 'colour' is
accepted in lieu of 'color'.
* Handling of unrecognized policy configuration items is now controlled by
the profile_strictness. The default is to warn about them. The previous
default was that they were fatal.
* -p is now a synonym for --profile.
* The --verbose option for perlcritic now supports a %C format that will
displays the class of PPI::Element that caused the violation.
[Policy Changes]
* ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions
didn't include "pbp" in its default themes even though it is derived
from the book. Now it does. :]
* ErrorHandling::RequireCarping now allows a here document as the last
element if the "allow_messages_ending_with_newlines" option is true.
* Fix Subroutines::ProhibitAmpersandSigils so it allows "defined(&x)" as
well as "defined &x". Patch from Kevin Ryde, RT #38855.
* Subroutines::ProtectPrivateSubs now has an "allow" option to specify
subroutines which are exempt from this policy. RT #38678.
Additionally, a "private_name_regex" option has been added that allows
you to specify what a private subrouting name looks like.
* Subroutines::RequireArgUnpacking now has an "allow_subscripts" option
to allow array slices and elements. RT #34009.
* Subroutines::RequireArgUnpacking now has an "allow_delegation_to" option
to allow the usual delegation idiom. Delegation to 'SUPER::' and
'NEXT::' are allowed by default. RT #33839.
* Subroutines::RequireArgUnpacking no longer generates a false positive
for '$$_[]', which is an obfuscated way of saying '$_->[]'. RT #37713.
* ValuesAndExpressions::ProhibitMagicNumbers now has an
allow_to_the_right_of_a_fat_comma option, which defaults to true. Note
that it currently only works /directly/ to the right of a fat comma.
* Variables::ProhibitMatchVars had its default themes changed to "core
performance pbp", instead of "core bugs pbp" because, while the match
variables make regular expressions slow, it doesn't cause them to not
work correctly.
* Variables::ProhibitPackageVars has had FindBin and Log::Log4perl added
to the default exemptions.
* Variables::ProhibitReusedNames now has an "allow" option to specify
names that can be reused. It defaults to enabling $self and $class. RT
#42767.
* Variables::RequireLocalizedPunctuationVars has a customizable set of
exemptions via the "allow" option.
[New Developer Features]
* The guts of perlcritic have been moved to Perl::Critic::Command. You
can invoke Perl::Critic::Command::run() to get the equivalent of running
the command. (Note, however, this interface WILL change, so don't count
on the current one.)
* Modules have had an "INTERFACE SUPPORT" section added which states
whether the Perl::Critic developers consider the particular module is
public or not. Any removal of functionality from a public module will
go through a deprecation cycle. Non-public modules may have their
interfaces changed without notice.
* P::C::Policy now has an is_enabled() method.
* P::C::Violation now has an element_class() method.
[Bug Fixes]
* CodeLayout::ProhibitTrailingWhitespace didn't notice cases where PPI
would produce instances of PPI::Token::Whitespace that contained
multiple lines.
* Subroutines::ProtectPrivateSubs no longer regards the exportable POSIX
subroutines whose names begin with underscore as private. RT #38678.
* Subroutines::RequireArgUnpacking mishandled a complicated situation with
$_ being an array reference. RT #39601.
* Variables::RequireLocalizedPunctuationVars now applies to subscripted
names. RT #29384.
[Internals]
* The guts of Build.PL and Makefile.PL have been rearranged.
1.097_002 2009-03-01
1.097_001 2009-03-01
* Changes summarized into 1.098 above.
For exact details, see Changes on BackPAN.
1.096 2009-02-01
[New Policies]
* ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator
[Policy Changes]
* Documentation::PodSpelling now has a stop_words_file option.
* Modules::ProhibitEvilModules now has a modules_file option.
[Bug Fixes]
* ErrorHandling::RequireCarping will now allow a literal newline
as well as "\n". Fixed by Kyle Hasselbacher, RT #25046
* Fix InputOutput::ProhibitTwoArgOpen so it allows '-|' or '|-' as the
second of two arguments. Patches from Kyle Hasselbacher and Leland
Johnson, RT #42384.
* InputOutput::RequireBracedFileHandleWithPrint applies to printf as well
as print. Fixed by Kyle Hasselbacher, RT #42537.
* TestingAndDebugging::RequireUseStrict and
TestingAndDebugging::RequireUseWarnings are no longer fooled by a
block-scoped pragma. RT #42310.
* ValuesAndExpressions::RequireInterpolationOfMetachars allows for escaped
backslashes. Fixed by Tom Wyant, RT #38530.
* Fix for problem in P::C::Document in dealing with underscores in
expressions like "use 5.009_001". Patch by Kevin Ryde, RT #36570 and
#42089.
* Fix in extras/perlcritic.el for a radio button. Patch by Kevin Ryde, RT
#42190.
* Fix distclean target in Makefile.PL. Patch by Richard Soderberg,
RT #42088.
* Fix temporary files not being cleaned up after tests. Patch by Kyle
Hasselbacher, RT #41443.
* Deal with changes in Pod::Parser v1.36 in test in t/05_utils_pod.t.
[Minor Changes]
* Documentation improvements contributed by Mark Grimes in response to RT
#41942.
1.095_001 2009-01-18
* Changes summarized into 1.096 above.
For exact details, see Changes on BackPAN.
1.094001 2009-01-01
[Bug Fixes]
* Tests would fail on systems without Regexp::Parser installed.
1.094 2009-01-01
[Incompatible Changes]
* The way that "## no critic" markers was refactored. As
a result, we discovered that the syntax for the markers was pretty
vague. If you didn't do it just right, it would disable all policies,
and not just the specific ones that you wanted. So we've tightened this
up a bit. If you followed the examples that have been in the docs for
the last couple years, then you should be fine. But if you've been
using certain other variations in your "## no critic" markers, then you
might suddenly find yourself violating the new
ProhibitUnrestrictedNoCritic policy. To fix this, just make sure your
Policy names appear in parentheses:
## no critic Foo, Bar, Baz # wrong!
## no critic Foo Bar Baz # wrong!
## no critic (Foo, Bar, Baz) # ok!
## no critic qw(Foo Bar Baz) # also ok!
* The deprecated $FORMAT variables for Perl::Critic::Policy and
Perl::Critic::Violation no longer exist. Use the corresponding
get_format() and set_format() functions instead.
[New Policies]
* Miscellanea::ProhibitUnrestrictedNoCritic
* Miscellanea::ProhibitUselessNoCritic
* NamingConventions::Capitalization
* Subroutines::ProhibitReturnSort
* Variables::ProhibitReusedNames
[Removed Policies]
* NamingConventions::ProhibitMixedCaseSubs and
NamingConventions::ProhibitMixedCaseVars have been moved to a separate
Perl-Critic-Deprecated distribution. The
NamingConventions::Capitalization policy does everything they do, plus
more.
[Policy Changes]
* BuiltinFunctions::ProhibitStringyEval now has an allow_includes option
that makes it behave (mostly) like Ricardo SIGNES'
Perl::Critic::Policy::Lax::ProhibitStringyEval::ExceptForRequire.
* InputOutput::RequireCheckedClose, InputOutput::RequireCheckedOpen, and
InputOutput::RequireCheckedSyscalls now all support autodie.
Unfortunately, autodie is currently treated like a module and not a
pragma, which means that the lexical scoping is not taken into account.
* InputOutput::RequireCheckedSyscalls now has an exclude_functions
parameter.
* Modules::ProhibitEvilModules now allows you to specify what the
description of a use of a bad module should be, to, say, suggest that
people use autodie instead of Fatal.
* Subroutine::ProhibitExcessComplexity violation descriptions now include
the name of the subroutine, thanks to Andreas Koenig, RT #40070.
* TestingAndDebugging::RequireUseStrict and
TestingAndDebugging::RequireUseWarnings now have equivalent_modules
parameters that allow you to designate other modules as being equivalent
to the strict and warnings pragmata. This one is for all you Moose fans
out there. :]
[Bug Fixes]
* ControlStructures::ProhibitUnreachableCode would treat package
statements as unreachable. Fixed by Kevin Ryde. RT #41734
* Fix warning from InputOutput::ProhibitOneArgSelect when select was
called with no arguments. RT #41926
* Miscellanea::RequireRcsKeywords couldn't find keywords after __END__
that didn't look like part of POD.
* Modules::RequireFilenameMatchesPackage would incorrectly complain about
programs. Yet more greatness contributed by Schwern. RT #39024.
* If a perlcriticrc file referred to a policy that wasn't installed and
the profile-strictness option was set to "fatal",
Perl::Critic::PolicyFactory fell over instead of reporting the
problematic policy name.
[Miscellanea]
* Perl::Critic::Violation will automatically strip trailing periods
from your Policy description and explanation strings. This ensures that
the punctuation is consistent with the format specified by the user via
the -verbose formatting options.
[New Developer Features]
* Perl::Critic::Policy::prepare_to_scan_document() is now checked and a
Policy can disable itself for just a single document, which can speed
things up.
1.093_03 2008-12-11
1.093_02 2008-10-30
1.093_01 2008-09-07
* Changes summarized into 1.094 above.
For exact details, see Changes in 1.093_003 on BackPAN.
1.092 2008-09-02
[Bug Fixes]
* Fixed POD errors that were causing build failures. Sorry
about that.
1.091 2008-09-01
[New Policies]
* RegularExpressions::RequireDotMatchAnything
[New Features]
* perlcritic now supports a -pager option, so you can more easily
send the output to your favorite pager. You can set this option
on the command-line or in your .perlcriticrc file. See the
perlcritic perldoc for more details. Credit to Michael Schwern.
* The output from "perlcritic -doc PATTERN" will be automatically
sent to your pager if you have set the -pager option.
[Policy Changes]
* CodeLayout::ProhibitQuotedWordLists no longer applies if the list
contains any non-words, by default. A non-word is anything that does
not match /[\w-]+/. You can restore the former behavior by setting the
"strict" option. RT #37886.
* CodeLayout::ProhibitQuotedWordLists also now applies to the import
arguments of a C<use> statement. RT #24467.
* ErrorHandling::RequireCheckingReturnValueOfEval now recognizes ternary
left-sides as valid checks.
* RegularExpressions::RequireExtendedFormatting gains a
minimum_regex_length_to_complain_about option. Also, regexes that
contain only word and whitespace characters are now exempt from this
policy, by default; you can make it complain about them by turning on
the new strict option. Contributed by Michael Schwern. RT #38531.
* TestingAndDebugging::ProhibitNoWarnings now supports a
allow_with_category_restriction option, thanks to Michael Schwern.
RT #38514.
* CodeLayout::ProhibitHardTabs now allows leading tabs in qw() word lists
and regexes with the /x modifier. You can still configure this
policy to forbid all hard tabs, if you like. RT #32440
[Bug Fixes]
* perlcritic should now work under PAR. RT #38380.
* URL for our repository in META.yml now works for anonymous
checkout. The password is "" (empty). RT #38628.
* color for high-severity violations is now magenta because
it is more readable than yellow on white backgrounds. RT #38511.
1.090 2008-07-22
[Bug Fixes]
* Test was incorrectly failing when Regexp::Parser wasn't installed.
1.089 2008-07-21
[Minor Enhancements]
* -s is now a synonym for --single-policy.
[Policy Changes]
* Subroutines::ProhibitBuiltinHomonyms now also prohibits subroutines
with the same name as a Perl keyword (e.g. if, foreach, while).
Inspired by RT #37632.
* Subroutines::ProtectPrivateSubs now allows expressions like
"shift->_some_private_method();". Note that this *only* applies
to the "shift" function -- a private method call on the right of any
other bareword still causes a violation. RT #34713.
* Subroutines::RequireFinalReturn now includes exec in the set of things
that mark a successful return. RT #37672
* ValuesAndExpressions::ProhibitInterpolationOfLiterals now takes a
allow_if_string_contains_single_quote option. Contributed by Ed
Avis <ed@membled.com>. RT #36125.
* ValuesAndExpressions::RequireInterpolationOfMetachars now supports a
rcs_keywords option to allow for the common case where those require
dollar signs.
[Bug Fixes]
* BuiltinFunctions::ProhibitSleepViaSelect would complain if there were
three undefs as arguments to select(), but one of them was the timeout.
RT #37416.
* Reduced false positives in
RegularExpressions::ProhibitSingleCharAlternation. Thanks to
Andy Lester and Elliot Shank test cases.
* RegularExpressions::ProhibitUnusedCapture would complain if there were
multiple captures used in a substitution, e.g. s/(.)(.)/$2$1/.
* Subroutines::ProhibitAmpersandSigils no longer complains about
"sort &foo(...)".
* Makefile.PL, Build.PL and other ".PL" scripts which typically do not
have a shebang are no longer mistaken as modules. This prevents
spurious warnings from Modules::RequireEndWithOne. RT #20481.
[Internals]
* Tests are now self compliant.
1.088 2008-07-04
[New Policies]
* ErrorHandling::RequireCheckingReturnValueOfEval
[Policy Changes]
* ValuesAndExpressions::ProhibitLeadingZeros now accepts octal numbers
for the Unix permissions argument to chmod, dbmopen, mkdir, sysopen, or
umask, by default. Use the "strict" option to get the old behavior.
RT #31977.
* Due to the consensus at YAPC::NA 2008,
Variables::ProhibitUnusedVariables default severity has been raised to
medium/3.
[Minor Changes]
* The perlcritic "--Version" option is now "--version" in order to act
like the rest of the world.
1.087 2008-06-21
[Policy Changes]
* CodeLayout::ProhibitParensWithBuiltins no longer complains about
sort(foo(@x)).
* TestingAndDebugging::RequireUseWarnings will not complain about files
that contain a "use 5.005" statement or similar for perls prior to 5.6.
Lesson of the day: computer conferences where you can meet in the real
world can clarify conversations greatly. Good to finally meet you Adam.
* InputOutput::ProhibitTwoArgOpen similarly will not complain if there's
a "use/require 5.005" statement in the file. RT #34385.
[Bug Fixes]
* Perl::Critic can now critique a file named "0". However, PPI will give
a parse error until the next version comes out. Fixes RT #36127.
* Moved detection of the lack of any enabled Policies from P::C::Config
to Perl::Critic. This was causing the perlcritic.t in Parrot to fail.
Note, however, there are plans afoot to change how Perl::Critic is
configured and things that depend upon that may break. Please contact
users@perlcritic.tigris.org and tell us how you're using P::C::Config
directly so that we can take your needs into account.
1.086 2008-06-12
[Policy Changes]
* NamingConventions::ProhibitAmbiguousNames now specifies the name that
it had problems with in its violation descriptions.
[Bug Fixes]
* The color option wasn't being correctly set from a .perlcriticrc.
RT #36569.
[Minor Changes]
* --colour is now a synonym for --color.
1.085 2008-06-07
[New Policies]
* Documentation::RequirePackageMatchesPodName
[Policy Changes]
* Variables::ProhibitUnusedVariables detects a few more cases. It's
still very limited, though.
[Bug Fixes]
* ControlStructures::ProhibitUnreachableCode didn't notice "until" was an
conditional expression.
[Minor Changes]
* Documentation updates.
1.084 2008-05-24
[New Features]
* perlcritic now supports a --list-themes option.
* You can specify the maximum number of violations you want per Policy
per document. Developers can give a default value for this for a
Policy by overriding default_maximum_violations_per_document().
See RequireUseStrict and ProhibitMagicNumbers for examples.
[Policy Moved]
* The ValuesAndExpressions::ProhibitMagicNumbers policy has been moved
from Perl::Critic::More into the primary Perl::Critic distribution.
[New Policies]
* Variables::ProhibitUnusedVariables (very dumb, limited initial
implementation.)
* ControlStructures::ProhibitLabelsWithSpecialBlockNames
Contributed by Mike O'Regan. Kickin' ass, Mike.
[Policy Changes]
* ControlStructures::ProhibitUnreachableCode now handles the perl 5.10
"//" and "err" operators. RT #36080
* InputOutput::RequireBriefOpen now ignores opens of STDIN, STDOUT,
and STDERR. You're generally trying to make long-lasting global
effects when manipulating these. (RT #35774)
* RegularExpressions::ProhibitUnusualDelimiters now supports an
"allow_all_brackets" option.
* RegularExpressions::RequireBracesForMultiline now supports an
"allow_all_brackets" option.
* TestingAndDebugging::RequireUseStrict now accepts "use Moose::Role"
as equivalent to "use strict". (RT #34838)
* TestingAndDebugging::RequireUseWarnings now accepts "use Moose::Role"
as equivalent to "use warnings". (RT #34838)
* ValuesAndExpressions::ProhibitMagicNumbers now accepts constant
subroutines.
* Variables::ProhibitMatchVars no longer detects "use English;".
This problem is detected in a more clear way by
Modules::RequireNoMatchVarsWithUseEnglish.
* Variables::ProhibitPerl4PackageNames no longer complains about
$'/$POSTMATCH. RT #36059
* Variables::RequireLocalizedPunctuationVars now allows the use of "my".
RT #33937
[Bug Fixes]
* No longer falls over if a single file has a parse error.
[New Developer Features]
* If a document specifies a minimum perl version, e.g. "use 5.008003",
P::C::Document::highest_explicit_perl_version() will tell you what it
is.
* The parameter to P::C::Policy::initialize_if_enabled is now a
P::C::PolicyConfig object instead of a hash reference.
[Minor Changes]
* LOTS of documentation updates.
* A few more statistics are emitted by perlcritic with the --statistics
option.
* perlcritic --profile-proto now includes policy abstracts in its
output.
[Prerequisites]
* Now depends upon PPI 1.203.
* New dependency upon version.
1.083_006 2008-05-20
1.083_005 2008-05-19
1.083_004 2008-05-18
1.083_003 2008-05-17
1.083_002 2008-05-17
1.083_001 2008-04-13
* Changes summarized into 1.084 above.
For exact details, see Changes in 1.083_006 on BackPAN.
1.082 2008-03-08
[New Features]
* A new metadata system for defining policy parameters/options has been
added. This makes the life of policy authors easier because
configuration validation and parsing can be taken care of
automatically, in most cases. This allows greater integration with
IDEs and allows the perlcritic "--profile-proto" option to produce
better output.
Note: This change does NOT REQUIRE ANY CHANGES to policies outside of
this distribution; they should continue to work as is. However, use
of this facility can reduce the size of your code and provide the
means for tools to discover more about your policy. If this change
does break any of your policies, please let us know.
To learn how to take advantage of this facility, read
Perl::Critic::DEVELOPER and look at the source of any of the
configurable policies included in this distribution.
There is a discussion of the design considerations for this facility in
the source repository under doc/PolicyParameter_Notes.pod.
* Added support for "criticism-fatal" option in your perlcriticrc
file. This will be used by the criticism pragma to cause execution
to abort if the file contains any violations.
[New Policy]
* Module::RequireNoMatchVarsWithUseEnglish
[Policy Changes]
* Added an allow_last_statement_to_be_comma_separated_in_map_and_grep
option to ValuesAndExpressions::ProhibitCommaSeparatedStatements.
Partial response to http://rt.cpan.org/Public/Bug/Display.html?id=27654.
* ControlStructures::ProhibitPostfixControls gains the ability to have
the flow control statements allowed to be modified. This in response
to RT #29540.
* TestingAndDebugging::RequireUseStrict now accepts "use Moose" as
equivalent to "use strict".
* TestingAndDebugging::RequireUseWarnings now accepts "use Moose" as
equivalent to "use warnings".
[Bug Fixes]
* RT #31281 perlcritic doesn't recognize "#!/bin/env perl" shebang
* Replace usage of Unicode property escapes with POSIX character classes
order to restore 5.6 compatibility.
* RT #30388 ValuesAndExpressions::ProhibitVersionStrings complained
about numbered directories in "use lib".
* Fixed handling of badly behaved spelling programs in PodSpelling.
1.081_006 2008-03-02
1.081_005 2007-12-29
1.081_004 2007-12-20
1.081_003 2007-12-16
1.081_002 2007-12-16
1.081_001 2007-12-15
* Changes summarized into 1.082 above.
For exact details, see Changes in 1.081_006 on BackPAN.
1.080 2007-11-11
[New Features]
* Allow a "## no critic" statement after a shebang on line 1 of a
file. This allows users to block violations that apply to
whole files and still allow shebangs.
[New Policies - funded by a Perl Foundation grant]
* InputOutput::ProhibitExplicitStdin
* RegularExpressions::ProhibitFixedStringMatches
* RegularExpressions::RequireBracesForMultiline
* RegularExpressions::ProhibitUnusualDelimiters
* RegularExpressions::ProhibitUnusedCapture
* RegularExpressions::ProhibitComplexRegexes
* RegularExpressions::ProhibitSingleCharAlternation
* RegularExpressions::ProhibitEscapedMetacharacters
* RegularExpressions::ProhibitEnumeratedClasses
* InputOutput::RequireBriefOpen
* InputOutput::RequireCheckedSyscalls
[Other New Policies]
* ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions
[Policy Changes]
* Variables::ProhibitConditionalDeclarations now permits you to local-ize
variables in conditional declarations. This makes sense, since
C<local> is actually a variable modifier, rather than a declaration.
Thanks to David Golden for reporting this.
[New Developer Features]
* Perl::Critic::Utils::PPIRegexp encapsulates interaction with
the PPI Regexp token classes. Those classes have very sparse
APIs, so this package hides away the ugly fiddling with PPI
internals.
* Added a new optional_modules parameter for the .run syntax.
[Bug Fixes]
* PPI::Structure::List can now contain multiple children,
so P::C::Utils::parse_arg_list() needs to handle it.
This was done in the process of fixing
http://rt.cpan.org/Ticket/Display.html?id=24924, which was a problem
with TestingAndDebugging::RequireTestLabels.
* ValuesAndExpressions::ProhibitLongChainsOfMethodCalls wasn't resetting
chain length when it ran into the end of a sub-expression.
http://rt.cpan.org/Public/Bug/Display.html?id=30040
* ValuesAndExpressions::ProhibitCommaSeparatedStatements was reporting
false positives when builtins which accept both no and multiple
arguments were involved.
http://rt.cpan.org/Public/Bug/Display.html?id=27654
[Internals]
* Removed all use of Carp in favor of exceptions.
[Prerequisites]
* Now requires PPI 1.201. A number of workarounds for PPI bugs have been
removed.
* New dependency upon Exception::Class.
[Installation]
* Use Devel::CheckOS to see whether Perl::Critic is being installed on
a Solaris system and warn about tar(1) chopping file names off if it
is.
1.079_003 2007-10-22
1.079_002 2007-10-21
1.079_001 2007-10-09
* Changes summarized into 1.080 above. For exact details, see Changes in
1.079_003 on BackPAN.
1.078 2007-09-19
* Restore Perl::Critic::TestUtils::should_skip_author_tests() and
get_author_test_skip_message(). Some Perl::Critic add-on distributions
are using them.
1.077 2007-09-15
* Note: if you don't have any problems installing Perl::Critic 1.076, there
is no need to upgrade to this version. There are no functionality
changes. This release only contains changes related to installation that
a few people were experiencing.
[Minor Changes]
* Removed build-time use of Readonly, again, due to problems some people
were having when trying to compile the code by hand, rather than using
CPAN(PLUS)?.
* Don't run author tests if there's a .svn directory present because
users who grabbed the code from the source repository were executing
them and getting failures.
* Don't generate optional, module-hiding test wrappers if author tests
are not enabled.
1.076 2007-09-07
* It appears from reports on the 1.075_001 release that the subroutine
sigils were indeed the problem. Release to the general populace.
1.075_001 2007-09-06
[Bug Fixes]
* Undo the changes in 1.073 and 1.074. Instead, stop using the subroutine
sigil in import and export lists. It is suspected that the problem lies
with Exporter stripping off ampersands.
1.074 2007-09-04
[Bug Fixes]
* Repeat the Makefile.PL change on
t/generate_without_optional_dependencies_wrappers.PL.
I love CPAN Testers.
1.073 2007-09-04
[Bug Fixes]
* Work around problems with the combination of Exporter & Readonly in
Makefile.PL on some machines.
1.072 2007-09-03
[Bug Fixes]
* The Makefile generated by Makefile.PL was not syntactically correct
according to some versions of Solaris. Thanks to Diab Jerius
(DJERIUS) for discovery and testing.
* Fixed mis-definition of "quiet" value for the "--profile-strictness"
option.
* Enhanced testing with the absence of optional modules.
1.071 2007-08-24
* The "Brown Paper Bag" Release
[Bug Fixes]
* Tests would not pass in environments that did not have all optional
dependencies installed.
1.07 2007-08-21
[New Policies - funded by a Perl Foundation grant]
* BuiltinFunctions::ProhibitBooleanGrep
* BuiltinFunctions::ProhibitComplexMappings
* Documentation::PodSpelling
* InputOutput::ProhibitJoinedReadline
* Subroutines::ProhibitManyArgs
* Subroutines::RequireArgUnpacking
* ValuesAndExpressions::ProhibitImplicitNewlines
* Variables::RequireLocalizedPunctuationVars
[Other New Policies]
* Subroutines::ProhibitNestedSubs
[New Features]
* The "perlcritic --profile-proto" output now includes the "add_themes"
parameter for each policy.
* The perlcritic "--strict-profile" option has been replaced with a
"--profile-strictness" option. This new option takes values of "warn"
(the default), "fatal", and "quiet", which controls what happens with
ignorable problems in a .perlcriticrc file.
[New Developer Features]
* Perl::Critic::Policy now has an overridable initialize_if_enabled()
method which allows a Policy to perform expensive initialization after
it has been determined whether the user has it enabled or not. Also,
this method allows a Policy to say that it should be disabled
regardless of what the user says.
Actually, use of this method is now encouraged over using a
constructor.
[Other Stuff]
* Now requires the Readonly module in order to be more self-compliant.
1.061 2007-07-24
[Bug Fixes]
* Fix P::C::Theme-- Exporter in Perl 5.6 does not export import(), so you
must subclass it. *sigh*
* Fix P::C::Config::_validate_and_save_theme()-- eval of an empty string
does not reset $@/$EVAL_ERROR in Perl 5.6.
* Big thanks to Anirvan Chatterjee for identifying and helping debug these
issues.
1.06 2007-06-27
[New Features]
* perlcritic now emits errors for all the problems it can find for the
global options in the command-line parameters and .perlcriticrc file,
rather than bailing on the first one it encounters.
* perlcritic now has a "--strict-profile" option which will make warnings
about problems in a profile fatal.
* perlcritic now has a "--statistics-only" option which suppresses the
display of individual violations and only shows the additional output
produced by the "--statistics" option.
[Feature requests]
* A value for "color" can now be specified in a .perlcriticrc.
http://rt.cpan.org/Ticket/Display.html?id=24877
[New Policies]
* ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters
As suggested in http://rt.cpan.org/Ticket/Display.html?id=23290.
* ValuesAndExpressions::ProhibitLongChainsOfMethodCalls
* Modules::ProhibitExcessMainComplexity
As suggested in http://rt.cpan.org/Ticket/Display.html?id=24699
[Minor Changes]
* The perlcritic "--profile-proto" option now emits the short names for
policies, rather than the full ones.
* The "-profileproto" and "-singlepolicy" options have been renamed to
"-profile-proto" and "-single-policy" in order to make the growing
number of command-line options comprehensible. The change of
"singlepolicy" also affects your F<.perlcriticrc> file.
1.053 2007-06-02 *DEVELOPMENT RELEASE*
[Bug Fixes]
* Fixed bug in 15_statistics.t test script, which caused the build
to fail on machines that don't have Perl::Tidy installed.
1.052 2007-06-01 *DEVELOPMENT RELEASE*
[New Features]
* perlcritic now emits a summary about the scanned code when enabled by
the "-statistics" option.
[Policy Enhancements]
* InputOutput::ProhibitBacktickOperators can now be configured to only
check in void contexts.
[Bug Fixes]
* 27073: False positive in RequireUpperCaseHeredocTerminator
* 27065: CodeLayout::ProhibitTrailingWhitespace breaks under Perl 5.6.1
* 26462: ControlStructures::ProhibitCascadingIfElse pod typo
* ValuesAndExpressions::ProhibitCommaSeparatedStatements was complaining
about multiple values in the list to be iterated over by a foreach loop.
* Corrected PBP page numbers for some policies (Quinn Weaver).
1.051 2007-04-12 *DEVELOPMENT RELEASE*
* No new policies.
* No particular bug fixes.
[Internals]
* Added several new utility functions to support the StricterSubs distro.
Also, some of the existing functions in Perl-Critic-Utils have
changed in ways that might break your custom policies.
[Miscellanea]
* Updated Emacs plugin (Courtesy Josh ben Jore).
See extras/perlcritic.el for details.
* Added copy of BBEdit plugin (Courtesy of Josh Clark).
See extras/perl_critic_for_bbedit-1_0.zip for details
1.05 2007-03-19
[Bug Fixes]
* 25557: t/20_policy_prohibittrailingwhitespace.t fails on Perl 5.8.0
1.04 2007-03-18
[Bug Fixes]
* 25008: Subroutines::RequireFinalReturn should allow "throw"
* 25085: False Positive - Heredoc terminator must be quoted
* 18423: VERSION check does not notice Readonly::Scalar version
* 25449: Proposal of $VERSION declaration (DUPLICATE)
[New Policies]
* CodeLayout::ProhibitTrailingWhitespace
* ValuesAndExpressions::ProhibitCommaSeparatedStatements
* Variables::ProhibitPerl4PackageNames
[Policy Enhancements]
* Subroutines::RequireFinalReturn can now be configured to recognize
your custom functions that behave like "die" or "exit".
* Documentation::RequirePodSections can be configured to match
Module::Starter:PBP or to really match the PBP book.
1.03 2007-02-13
[Bug Fixes]
* Fixed a few more problems with the %f, %F, and %r format escapes.
* I forgot to put Conway's perlcriticrc file in the MANIFEST. Sorry.
[Interface Changes]
* Perl::Critic::Utils automatically exports everything. However,
this is deprecated. In the future, you must request your exports.
[Policy Changes]
* Duplicate violations of RequireExplicitPackage are now squelched,
in the same way as RequireUseStrict and RequireUseWarnings.
1.02 2007-02-11
[Bug Fixes]
* "undef" incorrectly triggered ProhibitMutatingListFunctions.
* 24876: %f and %F escapes not working in custom "verbose" format strings.
* 24875: Documentation bug in TestingAndDebugging::ProhibitNoStrict
[New Policies]
* InputOutput::RequireCheckedOpen
* InputOutput::RequireCheckedClose
[Other Cool Stuff]
* Added Conway's own suggested Perl::Critic configuration as
examples/perlcriticrc-conway.
* See the examples/ directory for some neat demonstrations of using
the Perl::Critic API. Contributed by Elliot Shank.
[Interface Changes]
* Perl::Critic::Utils no longer exports anything by default. Policies
outside the distribution will need to specify what exactly they need
from this module. There are a number of tags that can be used in
addition to individual imports.
1.01 2007-01-24
* PRODUCTION RELEASE: You may now consider the public Perl::Critic
API as "stable." Future minor releases will focus on bug fixes,
new policies, and internal refactoring.
[Bug Fixes]
* Fixed memory leak. This was reported by the Parrot team at
http://rt.perl.org/rt3/Ticket/Display.html?id=41230
0.23 2007-01-19
[Bug Fixes]
* 23994: Test 56 in t/05_utils.t of Perl::Critic v0.22 fails
* 24005: test 95 in t/13_bundled_policies fails in 0.22
[Groovy New Features]
* Added '%F' to the Violation format specifications. This will
give you just the name of file where the violation occurred
(i.e. without the path).
* Improved validation of .perlcriticrc file. An invalid
default setting will now cause a fatal exception. A
strange-looking policy name will cause a warning.
[Interface Changes]
* The syntax for theme expressions has changed. Instead of using
mathematical operators qw(+ * -) you must now use the logical
operators qw(|| && !). See the Perl::Critic docs for more info.
* The @GLOBALS and @BUILTINS variables are no longer exported by
Perl::Critic::Utils. Use the is_perl_global() and is_perl_builtin()
functions instead.
* Perl::Critic::Policy::policy_parameters() has bee renamed to
Perl::Critic::Policy::supported_parameters(). This was an
undocumented feature anyway, so it shouldn't affect anyone.
[Other Internal Changes]
* Perl::Critic now requires B::Keywords v1.05 or newer.
* A few internal classes have been refactored. As a result,
Set::Scalar is no longer a required dependency.
0.22 2006-12-15
[New Features]
* Introduced named severity levels: gentle, stern, harsh, cruel, brutal
You can use these named levels instead of the numeric ones.
For example: "perlcritic --severity=cruel MyModule.pm"
Or just: "perlcritic --cruel MyModule.pm"
* For perlcritic, the "-List" option has been renamed to
"-profileproto". The output now includes the names of the
parameters that each Policy supports, if any.
* Improved validation of Policy parameters in your F<.perlcriticrc>
Any invalid parameter now causes a fatal exception.
[Major Changes]
* Reassigned themes for most policies. Now there are fewer
themes and they are organized around programming concepts
instead of severity levels. If you have assigned your own
themes to any Policies, they should still work as expected.
[Policy Changes]
* ErrorHandling::RequireCarping will not complain if it can figure
out that the die or warn message will always end in a newline
("\n"). The idea is that, if you put the newline there, you
don't indend for there to be any file/line/stack information
emitted, in which case you really don't want carp/croak.
You can restore the old strict behavior by giving the policy
a false value for "allow_messages_ending_with_newlines" in your
configuration.
[Misc Changes]
* Added single-letter uppercase alternatives for some perlcritic options.
0.21_01 2006-12-03
[New Policies]
* TestingAndDebugging::ProhibitProlongedStrictureOverride
* ControlStructures::ProhibitMutatingListFunctions
[New Features]
* Say "perlcritic -List" to get an expanded listing of all Policies.
The format is suitable for use as your .perlcriticrc file.
* Say "perlcritic -doc PATTERN" to get the documentation for all
Policies that match m/PATTERN/imx. This is a little easier than
typing in the full name of the Policy module with "perldoc".
* Say "perlcritic --singlepolicy PATTERN" to use one and only one
policy.
* Can now specify exceptions to Variables::ProhibitPackageVars,
for packages like File::Find that only interface through
package variables.
[Bug Fixes]
* 21713 false positive for parens used with substr and unpack.
* 22890 allow Rcs keywords in POD.
[Internals]
* Testing system overhauled. Details on the Policy/subtest
framework is in t/run.t.
* Added Perl::Critic::Utils::words_from_string. This is safer
than plain old C<split /\s+/>.
0.21 2006-11-05
[New Policies]
* BuiltinFunctions::ProhibitReverseSortBlock
* BuiltinFunctions::ProhibitVoidGrep
* BuiltinFunctions::ProhibitVoidMap
* CodeLayout::RequireConsistentNewlines
* Modules::RequireFilenameMatchesPackage
* TestingAndDebugging::RequireTestLabels
* ValuesAndExpressions::ProhibitMismatchedOperators
[New Features]
* Introduced policy "themes." Themes are arbitrary names that can
be used to identify a group of related Policies. You can select
your favorite policies by combining themes in a mathematic expression
such as "pbp * (danger + risky)". See POD for details.
* perlcritic output is colorized if you have Term::ANSIColor. This
only works on non-Win32 platforms. Use -nocolor switch to disable.
* Say "perlcritic -count" to get just the the total number of
violations per file. Use this feature to quickly identify hot-spots.
* Use the -only switch to choose only from policies mentioned in your
.perlcriticrc file. This is useful if you usually only want to
work with a small subset of the policies.
* Default values for most of the perlcritic and Perl::Critic options
can now be defined in your .perlcriticrc file. See POD for details.
[Bug Fixes]
* 21236: wrong page number for "printing to filehandles"
* 21916: File handle ... wrong page reference in PBP [DUPE]
* 21714: false positive for capture var used in ternary condition
* 21718: No skip for File::Slurp in includes.t
* ProhibitBarewordFilehandles doesn't complain if you open
STDIN, STDOUT or STDERR.
* Parrot 40564: Subroutines::RequireFinalReturn should allow die,
exit, etc.
* Each "for" and "foreach" loop now adds one point to the McCabe
complexity score.
[Other Stuff]
* The internals of Perl::Critic have been significantly refactored,
but should still be compatible with existing third-party Policies.
* Added author-only tests to the release, but disabled by default
* New Perl::Critic::Utils::shebang_line() method
* Support for filename-based policies
* Additional prerequisite: Set::Scalar
* Now requires PPI version 1.118
0.20 2006-09-10
* Perl::Critic now requires PPI version 1.117, which fixes
several bugs that were introduced in version 1.116.
[Bug Fixes]
* 21079: grep clears @SITE_POLICIES
* 21352: Test failures with PPI 1.117
* 11365: sub DESTROY detected as a builtin homonym
0.19 2006-08-20
[New Policies]
* BuiltinFunctions::ProhibitStringySplit
* ControlStructures::ProhibitDeepNests
* RegularExpressions::ProhibitCaptureWithoutTest
* Variables::RequireLexicalLoopIterator
[New Features]
* "perlcritic -quiet" suppresses the "source OK" message.
* Variables::ProhibitPunctuationVars is now configurable.
[Bug Fixes]
* 20965: "Hard tabs used at" shouldn't check __DATA__
* 21070: ProhibitNoisyQuotes hates overload
* Punctuation variables are now exempt from ProhibitLocalVars
[Other Stuff]
* Test coverage is now over 95%
0.18_01 2006-08-06
[New Policies]
* Variables::RequireNegativeIndices
* InputOutput::ProhibitInteractiveTest
* ErrorHandling::RequireCarping
[Bug Fixes]
* RequireTidyCode tests fail if user has custom .perltidyrc file
* 20612: RequirePerlTidy was ignoring HEREDOCs
* 20659: __END__ statement considered "unreachable"
* Fix for PPI::XS (no C<use overload '""'> support)
* Support for 'goto' in ProhibitAmpersandSigils and
Subroutines::RequireFinalReturn
[Performance Enhancements]
* Introduced Perl::Critic::Document class. This is a facade for
PPI::Document which internally caches search results. This
reduces the running time by about 35%. The facade should be
invisible, unless you are doing something really sneaky.
* Extraction of the 'diagnostics' information is postponed
until it is really needed. Speedup has not been measured.
* Calls to helper-subs have been reordered for maximum efficiency.
[Other Cool Stuff]
* Includes updated version of perlcritic mode for emacs. See
"extras/perlcritic.el" for details.
0.18 2006-07-16
[Bug Fixes]
* 14855: Home discovery is dangerously naive.
* 20060: Incorrect page numbers in ProhibitLeadingZeros
and RequireNumberSeparator policies.
* 20068: .perlrc file - inconsistent documentation
* 20254: "use vars qw(@EXPORT_OK)" not recognized
* 20463: No-case heredoc terminator incorrectly detected as lower case.
* ProhibitOneArgBless doesn't understand "bless {} => $class;"
* ProhibitExcessComplexity doesn't count 'while' and 'until' stmnts
* ProhibitLeadingZeros was falsely hits '.0456'
[Enhancements]
* If File::HomeDir is available, we use it to locate the
.perlcriticrc file. This should help make Perl::Critic
more portable to Win32 platforms. If File::HomeDir is
not installed, we resort to looking at the usual
environment variables.
[Other Stuff]
* Added "perlcritic.el", which is a super-cool emacs minor-mode
that runs perl-critic on the current buffer and returns the
results in a sexy hot-linked "compiler" window. You can run
it on demand, or have it run automatically every time you
save the buffer. You can find this in the extras/ directory.
Thanks to Josh ben Jore for contributing this.
* Moved "Perl::Critic::TestUtils" into the installed build. This
module is only used for unit-testing Perl::Critic, but we
are putting it in the installation so folks who want to
extend Perl::Critic can make use of it.
0.17 2006-06-13
[Bug Fixes]
* 19836: Perl-Critic0.16 fails tests during install. This was
caused by a bug in version 3.01 of Module::Pluggable. See
http://rt.cpan.org/Ticket/Display.html?id=19857 for details.
* Fixed bug in no-critic pragma parser.
[New Policies]
* ValuesAndExpressions::ProhibitEscapedCharacters
* BuiltinFunctions::RequireSimpleSortBlock
[Enhancements]
* Perl::Critic can export critique() as a static function. This
may appeal to folks who dislike the object-oriented interface.
0.16 2006-05-14
[Enhancements]
* Perl::Critic->critique() now accepts a PPI::Document as the
argument. This feature creates an additional dependency on
Scalar::Util, but that shouldn't be a problem because it is
included with List::Util, which we already use.
[Miscellanea]
* Increased PPI dependency from v1.110 to v1.112
0.15_03 2006-05-07
[Bug Fixes]
* The "## no critic" feature is now implemented without eval-ing
the code. This keeps Perl::Critic pure and safe :)
* 19082: Page number for AUTOLOAD is incorrect
[New Policies]
* ControlStructures::ProhibitUnreachableCode (by Peter Guzis)
* Modules::ProhibitAutomaticExportation
* ValuesAndExpressions::ProhibitVersionStrings
0.15_02 2006-04-26
[Bug Fixes]
* Reimplemented the '##no critic' pragmas to have effect on the
line where the violation is reported, not on the line where
the candidate element lives. This is because some policies
may report violations that are nowhere near the element that
is being evaluated.
* RequireUseStrict, RequireUseWarnings, and RequireExplicitPackage
all emit violations for _every_ statement that violates the
Policy. This closes a loophole that allowed you to circumvent
the Policy by using '## no critic' on just the first statement
that violated the policy.
* Fixed the workaround for the magic shebang that is inserted
by EU::MM and M::B. This had stopped working around version 13.
* Fixed -noprofile option on 'perlcritic'. This also had stopped
working at some point.
0.15_01 2006-04-16
[Enhancements]
* Added diagnostic messages if the .perlcriticrc contains entries
for Policy modules that don't seem to exist.
* Now you can specify which policies to disable with the
"## no critic" pseudo-pragmas. This feature is still
experimental. See docs for details.
* perlcritic's directory searching now skips backup files, such
as *.swp, *.bak and *~. It also ignores version control system
directories, and the blib directory in module build directories.
[Bug Fixes]
* 18386: Bad example in POD for Documentation::RequirePodSections
* 18670: Test failure if Perl::Tidy is not installed
* 18698: Policy idea ProhibitUniversalFunctions (see New Policies)
* RequireInterpolationOfMetachars falsely hit strings like 'foo=s@'
which are commonly used with Getopt::Long.
[New Policies]
* BuiltinFunctions::ProhibitUniversalCan (by Chris Dolan)
* BuiltinFunctions::ProhibitUniversalIsa (by Chris Dolan)
[Miscellanea]
* All spurious options for `perlcritic` are now fatal.
* Changed several of the -verbose formats to be more readable.
* Explicit -severity option now overrides -[12345] shortcuts instead
of being the other way around.
0.15 2006-03-26
[Bug Fixes]
* 17964: Insists my code is not tidy (may not be fixed for all cases)
0.14_02 2006-03-19
[Bug Fixes]
* 15653: False positive in OneArgSelect (fixed for real this time)
[New Policies]
* ClassHierarchies::ProhibitAutoloading
* Documentation::RequirePodSections
* InputOutput::RequireBracedFileHandleWithPrint
* ValuesAndExpressions::ProhibitMixedBooleanOperators
* Variables::RequireInitializationForLocalVars
0.14_01 2006-03-05
[Bug Fixes]
* 14731: False positive: Builtin function called with parens
* 17554: False positive in CodeLayout::RequireTrailingCommas
[New Policies]
* ClassHierarchies::ProhibitExplicitISA
* InputOutput::ProhibitReadlineInForLoop
* Miscellanea::ProhibitFormats
* Miscellanea::ProhibitTies
* Variables::ProhibitConditionalDeclarations
0.14 2006-01-29
* More documentation edits.
[New Policies]
* Documentation::RequirePodAtEnd
* Subroutines::ProtectPrivateSubs
* Variables::ProhibitMatchVars
* Variables::ProtectPrivateVars
[Bug Fixes]
* 15295: "## no critic" pragmas too aggressive on compound statements.
* t/01_config.t failed in the presence of third-party policies
* Implemented workaround for failing pod_coverage tests.
* 16906: tr/// created false-positives with RegularExpression polices.
0.13_04 2005-12-31
* Moved DEVELOPER.pod file into the Perl/Critic dir.
* More documentation edits.
0.13_03 2005-12-30
* perlcritic now prints 'source OK' if it doesn't find any
violations. This gives folks a warm fuzzy feeling.
* Tweaked some test cases that were failing on my Solaris
environment at work.
0.13_02 2005-12-29
* Fixed Config to recognize fully-qualified module names in the
.perlcriticrc file.
* Various documentation edits.
0.13_01 2005-12-28
* Replaced 'priority' concept with 'severity'. Now each Policy module
has a predefined severity level ranging from 1 to 5. By default,
perlcritic only reports the most severe violations. You can adjust
the severity threshold at the command line, and you can change
the severity for any Policy using the config file.
* Chris implemented the applies_to() mechanism, which allows each Policy
class to declare the types of PPI elements that it wants to examine.
When traversing the document, Perl::Critic invokes the Policy only
for elements that are of the correct type. This improves performance
by about 33%.
* Perl::Critic now uses a Plugin architecture to automatically
discover Policy modules. So if you have custom Policies, all you
have to do is install them in the Perl::Critic::Policy namespace --
no need to add anything to your .perlcriticrc file. If you write
policies in a different namespace, you can configure that too. See
the Perl::Critic::Config docs for details.
[New Policies]
* Modules::RequireEndWithOne
* NamingConventions::ProhibitAmbiguousNames
* References::ProhibitDoubleSigils
* Subroutines::RequireFinalReturn
* Subroutines::ProhibitAmpersandSigils
* Subroutines::ProhibitExcessComplexity
* TestingAndDebugging::ProhibitNoStrict
* TestingAndDebugging::ProhibitNoWarnings
[Bug Fixes]
* 15101: Plugin architecture improves support for 3rd-party code
* 16319: Fixed incorrect PBP page number in ProhibitBarwordFilehandle
* 16321: Lists of empty quotes are now allowed by ProhibitQuotedWordLists
* 16288: Empty lists caused a fatal error RequireTrailingCommas
* 15653: Fixed false positive in OneArgSelect.
0.13 2005-10-31
* Renamed -Policy option to -include. Added -exclude to give the
opposite effect.
* Refactored constructor of Perl::Critic. Now, most of the work
is delegated to Perl::Critic::Config. I'm not sure I like how
this turned out, but we'll see how it goes.
* Renamed some Policy modules to be a bit more comprehensible. Note
that you may need to change your .perlcriticrc file accordingly.
I also suggest removing your current Perl::Critic installation
before installing this one.
* Improved error message when Perl::Critic dies because PPI can't
parse the input code.
* Changed output of -help to be more terse.
* Added -Policy option to perlcritic. The idea is to provide a
compact interface for selecting Policy modules at the command-line.
This feature is experimental and subject to change.
* Added a warning message if -verbose value looks strange. In most
applications, the -verbose option does not require a value, so people
might be puzzled when they write 'perlcritic -verbose my_file.pm' and
nothing seems to happen.
* Command-line options to perlcritic are now case-sensitive. This
makes it easier to abbreviate options that start with the same letters
(e.g. 'Version' and 'verbose')
* Fixed the new Policy modules that were misnamed and misplaced in the
previous distribution.
* Rewrote some of the ControlStructures and BuiltinFunction
policies to be simpler (and probably a little faster).
* Edited POD. Fixed some typos. Added PREREQUISITES section
to Perl::Critic documentation.
* Fixed the -verbose FORMAT option so that you can put metachars
in the FORMAT specification. If using perlcritic, be careful to
protect them from getting munged by the shell first.
* Replaced ProhibitRequireStatements with RequireBarewordIncludes
module. Courtesy of Chris Dolan <cdolan@cpan.org>
* Added configuration to ProhibitInterpolationOfLiterals so that
certain flavors of quotes can be exempt. This is for folks who
have configured their editor to use special syntax highlighting
for certain kinds of strings (SQL, for example).
* perlcritic now accepts multiple file arguments, so now you can
critique your entire distribution in one shot. As a result, the
output-formats have changed slightly.
[New Policies]
* BuiltinFunctions::ProhibitLvalueSubstr
* BuiltinFunctions::ProhibitSleepViaSelect
* ClassHierarchies::ProhibitOneArgBless
* CodeLayout::RequireTrailingCommas
* CodeLayout::RequireQuotedWordLists
* InputOutput::ProhibitTwoArgOpen
* InputOutput::ProhibitOneArgSelect
* InputOutput::ProhibitBarewordFileHandles
* Miscellanea::RequireRcsKeywords
* Modules::RequireVersionVar
* RegularExpressions::RequireExtendedFormatting
* RegularExpressions::RequireLineBoundaryMatching
[Name Changes]
* ProhibitUnpackagedCode => RequireExplicitPackage
* RequireQuotedWords => ProhibitQuotedWordLists
[Bug Fixes]
14923: 'require' is now permitted. See RequireBarewordIncludes.
15022: Fixed false-positives when keywords are used as hash keys.
15023: Fixed spurious Violations by removing magic shebang.
15031: Fixed spelling mistakes (and probably added some new ones).
15233: Postfix 'if' is now allowed with 'die', 'croak', etc.
0.12 2005-10-10
* The internal dynamics and API of Perl::Critic have changed
considerably. The result is a 300% increase in performance.
See the POD in Perl::Critic::Policy for details.
* Redesigned the 'verbose' feature. Now the output format
can be user-defined using a sprintf-like specification.
perlcritic also has a predefined output format that is
compatible with grep mode in editors like vim and emacs.
* 'return' is now exempt from ProhibitParensWithBuiltins. I may
extend this exemption to all unary functions.
* Edited POD. Added a super brief description of each policy
in the main Perl::Critic documentation. Added details about
editor integration.
[New Features]
* Added -verbose option to put more stuff in the output. In the
extreme, you can get the POD from Policy attached to each
and every violation.
[Additional Prerequisites]
* String::Format
* IO::String
* Pod::PlainText
0.10 2005-10-05
* Fixed stupid bug in newest Policy modules. They were returning
PPI objects instead of Perl::Critic::Violation objects. Doh!
* Fixed test scripts to prevent failures if the user already has a
.perlcriticrc file.
* 'ProhibitHardTabs' now allows leading tabs by default.
* Put the Changes file in reverse-chronological order, so the most
recent stuff is easy to find at the top of the file
0.09 2005-10-04
* Changed the syntax for the magic comments. Adam had the
idea of using a pragma-like notation. I liked it.
[Bug Fixes]
* 14810: Now you are allowed to create your own 'import' function,
since this is frequently done with fancy modules.
* 14817: Parens, brackets, and braces are now excluded from
'ProhibitNoisyQuotes' since they look better in quotes anyway.
* 14787: $1..$9 and '_' are exempt from ProhibitPunctuationVars
* 14899: Object methods with the same name as a built-in can
be called with parens (ProhibitParensWithBuiltins).
* 14901: Normalized the exit status of perlcritic to 0, 1, or 2.
See documentation for explanation.
* 14855: Partially fixed home directory discovery. Still not
completely portable, but at least doesn't create warnings.
[New features]
* 14734: Limit for number separators is now configurable
[New Policy modules]
* CodeLayout::ProhibitHardTabs
* ControlStructures::ProhibitUnlessBlocks
* ControlStructures::ProhibitUntilBlocks
* ControlStructures::ProhibitCStyleForLoops
0.08_2 2005-09-27
* Fixed problems with Perl::Critic::Config that caused File::Spec
to emit 'uninitialized value' warnings during the build.
* Added 1 Policy module contributed by Graham TerMarsch
* Switched from File::Spec::Functions to plain File::Spec because
I think its usage is more common.
* Removed 'FindBin' from the test files so I can be sure that the
right libraries are getting loaded. This means I'll have to
use the -l option with C<prove>.
* Fixed "ProhibitParensWithBuiltins" to allow parens to be used with
object method calls that have the same name as a builtin functions.
* Introduced magical comments that allow developers to configure
Perl::Critic on-the-fly from within their code.
* Added META.yml files and POD tests to the build. I did this
mostly just to boost the Kwalitee score on CPANTS.
* Switched from "Config::Std" to "Config::Tiny" because it doesn't
require those fancy Damian modules that don't seem to work on
some older versions of Perl.
* Edited more POD.
0.07 2005-09-21
* Fixed bugs in the ProhibitCascadingIfElse policy.
* Added ProhibitExplicitReturnUndef policy
* Made ProhibitUnpackagedCode configurable so you can exempt scripts,
which typically don't have an explicit 'package' statement.
* ProhibitPackageVars policy now exempts vars in ALL_CAPS. This
is to permit common package variables like @EXPORT and $VERSION.
* Renamed "ProhibitStringyGrep and "ProhibitStringyMap" because
the so-called string form doesn't really exist. Now called
"RequireBlockGrep" and "RequireBlockMap"
* Corrected documentation on defining Policy names within the
configuration file. This still isn't very clear and needs
to be rewritten.
* Perl::Critic now requires PPI version 1.003, which has a few bug
fixes of its own.
* Rewrite some code just to make Perl::Critic more self-compliant.
* Added test cases to verify the configuration functionality. These
are not completely thorough and need more work.
0.06 2005-09-17
* Now called 'Perl::Critic'.
* Added 4 new policy modules.
* Fixed bugs in build process.
* Added support for Module::Build.
0.05 2005-09-17
* End of 'Perl::Review' releases. I have changed the name to
'Perl::Critic' to avoid possible confusion with "The Perl Review"
magazine.
0.04 2005-09-14
* Version 0.03 was a bust because I uploaded the wrong tarball to PAUSE.
0.03 2005-09-13
* Fixed some POD links.
* Removed test cases for missing policy module.
0.02 2005-09-13
* Major overhaul based on feedback from Perl community.
* Factored coding standards into separate modules (known as
Policies). The idea here is to allow other developers to easily
contribute additional coding standards.
* Reworked Perl::Review into a simple engine for loading and running
Policy modules.
* Gave perlreview a command-line interface and configuration file
for selecting which Policy modules to use.
0.01 2005-08-16
* Initial version.
# ex: set ts=8 sts=4 sw=4 tw=78 ft= expandtab shiftround :
|