Login
gknop/Perl-Critic.git
12 years agoForgot to add the requisite properties to ProhibitUnusedPrivateSubroutines.pm
Tom Wyant [Sat, 31 Oct 2009 20:19:11 +0000 (20:19 +0000)] 
Forgot to add the requisite properties to ProhibitUnusedPrivateSubroutines.pm
and .run.

12 years agoMake sub _parse_private_name_regex() the parser for parameter
Tom Wyant [Sat, 31 Oct 2009 20:12:55 +0000 (20:12 +0000)] 
Make sub _parse_private_name_regex() the parser for parameter
private_name_regex in P::C::P::Subroutines::ProhibitUnusedPrivateSubroutines.

Remove the negative lookahead assertion on 'parse_' in the
ProhibitUnusedPrivateSubroutines setup, since with the above fix and the
previous one on ProtectPrivateSubs it is no longer needed.

12 years agoMake sub _parse_private_name_regex() the custom parser for the
Tom Wyant [Sat, 31 Oct 2009 20:10:07 +0000 (20:10 +0000)] 
Make sub _parse_private_name_regex() the custom parser for the
private_name_regex parameter.

12 years agoImplement the TODO item P::C::P::Subroutines::ProhibitUnusedPrivateSubroutines.
Tom Wyant [Sat, 31 Oct 2009 02:28:53 +0000 (02:28 +0000)] 
Implement the TODO item P::C::P::Subroutines::ProhibitUnusedPrivateSubroutines.
This takes the same configuration parameters as
P::C::P::Subroutines::ProtectPrivateSubroutines.

Changes in other modules were self-compliance issues, which were solved by
removing the subroutines that were found in violation (after checking with
'ack' to see if they were truly not referred to!):
  - Perl::Critic::Policy::_get_source_file;
  - Perl::Critic::PolicyConfig::_validate_maximum_violations_per_document;
  - Perl::Critic::Policy::Documentation::PodSpelling::_set_spell_command;
  - Perl::Critic::Policy::NamingConventions::Capitalization::_local_variable.

There appear to be a couple distribution-private subroutines whose names
begin with single underscores:
  - Perl::Critic::PolicyParameter::_get_behavior_values;
  - Perl::Critic::PolicyParameter::_get_description_with_trailing_period.
These were dealt with by adding them to the 'accept' list in
xt/author/40_perlcriticrc-code.

12 years agoAdd idea for Subroutines::ProhibitUnusedPrivateSubroutines to
Elliot Shank [Thu, 29 Oct 2009 03:53:12 +0000 (03:53 +0000)] 
Add idea for Subroutines::ProhibitUnusedPrivateSubroutines to
TODO.pod.

12 years agoAdded test case for RT #50910. It appears that we already handle
Jeffrey Ryan Thalhammer [Wed, 28 Oct 2009 17:02:39 +0000 (17:02 +0000)] 
Added test case for RT #50910.  It appears that we already handle
this case properly, but I thought it would be good to add, just
to catch future regressions.

12 years agoUpdate VERSION numbers on files that were created on trunk
Jeffrey Ryan Thalhammer [Sat, 24 Oct 2009 20:07:24 +0000 (20:07 +0000)] 
Update VERSION numbers on files that were created on trunk
after the backlog branch was first made.

12 years agoFix PBP page numbers in
Elliot Shank [Fri, 23 Oct 2009 22:06:55 +0000 (22:06 +0000)] 
Fix PBP page numbers in
ValuesAndExpressions::ProhibitEscapedCharacters.  (Yup, just ran into
this at work and looked it up, saying "What does this have to do with
character escapes?".)

12 years agoWoops. I forgot to correct the test count.
Jeffrey Ryan Thalhammer [Thu, 15 Oct 2009 22:14:00 +0000 (22:14 +0000)] 
Woops.  I forgot to correct the test count.

12 years agoAdded support for the -unsafe switch. This is to protect
Jeffrey Ryan Thalhammer [Thu, 15 Oct 2009 21:10:02 +0000 (21:10 +0000)] 
Added support for the -unsafe switch.  This is to protect
users from accidentally running unsafe dynamic policies
over untrusted code.  The idea was inspired by Sartak, who
has written several dynamic Moose-related policies.
He said he would release them once we had created some
kind of safety mechanism on dynamic policies like his.

12 years agoMerge r3677 to the backlog branch. Remove the ability to specify
Elliot Shank [Fri, 2 Oct 2009 22:56:30 +0000 (22:56 +0000)] 
Merge r3677 to the backlog branch.  Remove the ability to specify
modifiers on the end of configured regular expressions. Instead,
document how it can be done with (?i: ... ).

12 years agoMerge r3645 to the backlog branch. The "## no critic" annotations are
Elliot Shank [Fri, 2 Oct 2009 22:52:13 +0000 (22:52 +0000)] 
Merge r3645 to the backlog branch.  The "## no critic" annotations are
now effective as-of their logical line numbers.  I think this is the
right thing to do, but I'm not completely sure.  Comments?

12 years agoMerge r364[34] to the backlog branch.
Elliot Shank [Fri, 2 Oct 2009 22:38:17 +0000 (22:38 +0000)] 
Merge r364[34] to the backlog branch.

Fixed spelling error.

I guess "subscripted" is not in the dictionary either.

12 years agoMerge r363[89] to the backlog branch.
Elliot Shank [Fri, 2 Oct 2009 22:35:35 +0000 (22:35 +0000)] 
Merge r363[89] to the backlog branch.

Turned PolicySummary.pod.PL into a "policysummary" action in
P::C::Module::Build.  The intent is move the generation of
PolicySummary.pod from a build-time event to a distro-creation-time
event.  That way, the file will be present in the distribution and
available on http://search.cpan.org.

Changed the POD in P::C::Module::Build so that it can automatically
generate online documentation for each of the custom actions.  For
example, when you say: "./Build help authortest".

If the actions are not listed as =items within the ACTION section of
the POD, then it doesn't work.

12 years agoMerge r3469, r347[1-4], and r3564 to the backlog branch.
Elliot Shank [Fri, 2 Oct 2009 22:31:13 +0000 (22:31 +0000)] 
Merge r3469, r347[1-4], and r3564 to the backlog branch.

Moved the guts of 20_policies.t into a new module called
Test::Perl::Critic::Policy.  This makes it easier for third-party
developers to test their own Policies.

I refactored much of the code into smaller subroutines, but the
mechanics are still pretty much the same.

Fixed T::P::C::Policy to workaround inconsisten behavior in various
versions of List::MoreUtils::none().

Doh!  Try again.

Note that T::P::C::Policy needs unit tests

Improve readability of diagnostic messages

Fix spelling errors.

12 years agoMerge r3455 to the backlog branch. A few more isa_ok tests to verify
Elliot Shank [Fri, 2 Oct 2009 22:03:56 +0000 (22:03 +0000)] 
Merge r3455 to the backlog branch.  A few more isa_ok tests to verify
the ancestry of the Perl::Critic::Document facade.

12 years agoFix current subversion version and indent the code blocks by the
Elliot Shank [Fri, 2 Oct 2009 21:55:47 +0000 (21:55 +0000)] 
Fix current subversion version and indent the code blocks by the
standard amount in CORE_DEVELOPER.

12 years agoMerge r3651 to the backlog branch. This file contains a (very
Elliot Shank [Fri, 2 Oct 2009 21:46:34 +0000 (21:46 +0000)] 
Merge r3651 to the backlog branch.  This file contains a (very
slightly) updated version of the letter I wrote early in the year
about how to get started developing, plus notes on adding global
configuration items/command options, and how to deprecate code.

12 years agoMerge r3650 to the backlog branch. RT #49500: From Debian:
Elliot Shank [Fri, 2 Oct 2009 21:45:26 +0000 (21:45 +0000)] 
Merge r3650 to the backlog branch.  RT #49500: From Debian:
RequireBracedFileHandleWithPrint don't recognize "say $fh".  Added
'say' to $PRINT_RX, and some tests to the .run file.

12 years agoMerge r3648 to the backlog branch. RT 49609:
Elliot Shank [Fri, 2 Oct 2009 21:41:49 +0000 (21:41 +0000)] 
Merge r3648 to the backlog branch.  RT 49609:
Subroutines::ProhibitAmpersandSigils improperly interprets list of sub
refs. The perlref document states that '\( a )' is equivalent to '(
\a)', and a little fiddling with YAML suggests that '\( ( a ) )' is
too.  So this revision makes the policy return on finding a list
preceded by a backslash cast.

12 years agoMerge r3646 to the backlog branch. I just realized my fix for RT
Elliot Shank [Fri, 2 Oct 2009 21:33:22 +0000 (21:33 +0000)] 
Merge r3646 to the backlog branch.  I just realized my fix for RT
36098 (RegularExpressions::ProhibitComplexRegexes should not penalize
long variable names) was not taking account of whether the regexp was
in fact interpolated before it applied its nasty hack. As a result,
P::C::Utils::PPIRegexp has grown a regexp_interpolates() subroutine
(true unless the first delimiter character is "'"), which is consulted
in ProhibitComplexRegexes before doing the dirty deed. The .run file
has grown a test to try to guard against regressions.

12 years agoMerge r3632 to the backlog branch. Most of 'RT 36081 redux'. The
Elliot Shank [Fri, 2 Oct 2009 00:01:36 +0000 (00:01 +0000)] 
Merge r3632 to the backlog branch.  Most of 'RT 36081 redux'. The
'next', 'last', 'redo', and 'return' verbs are handled pretty much the
same way as 'die' and friends, though they live in an internal hash
rather than a configuration variable. The 'goto' verb is another
kettle of fish. The updated code accepts 'goto &foo' unconditionally,
and 'goto LABEL' unless the label appears between the regex and the
capture variable. 'goto EXPRESSION' is still rejected. Also added
ability to handle 'die unless m/(foo)/' from the BUGS section of the
POD. Did not attempt 'when'. Revised POD accordingly, including weasel
words about how complicated the conditionals can be (not very!) before
the policy fails to understand them.

12 years agoFix $VERSION in Variables::ProhibitEvilVariables.
Elliot Shank [Thu, 1 Oct 2009 23:40:51 +0000 (23:40 +0000)] 
Fix $VERSION in Variables::ProhibitEvilVariables.

12 years agoMerge r3621 to the backlog branch. For what it isi (or is not) worth,
Elliot Shank [Thu, 1 Oct 2009 23:33:08 +0000 (23:33 +0000)] 
Merge r3621 to the backlog branch.  For what it isi (or is not) worth,
here is ProhibitEvilVariables. I took the coward's way out and
provided no evil variables by default. Note that we need some help
from PPI before variables of the form ${^_foo} can be made evil; see
PPI RT 49472.

12 years agoMerge r3620 to the backlog branch. Fix regression on 'use VERSION'.
Elliot Shank [Thu, 1 Oct 2009 23:19:28 +0000 (23:19 +0000)] 
Merge r3620 to the backlog branch.  Fix regression on 'use VERSION'.

12 years agoRename $P::C::Utils::Constants::MODULE_VERSION_TERM_ANSICOLOR to
Elliot Shank [Thu, 1 Oct 2009 22:54:20 +0000 (22:54 +0000)] 
Rename $P::C::Utils::Constants::MODULE_VERSION_TERM_ANSICOLOR to
$_MODULE_VERSION_TERM_ANSICOLOR and remove the POD for it.  This isn't
something that should be in our public interface.

12 years agoMerge r3619 to the backlog branch. Validate colors using the new
Elliot Shank [Thu, 1 Oct 2009 22:44:40 +0000 (22:44 +0000)] 
Merge r3619 to the backlog branch.  Validate colors using the new
Term::ANSIColor colorvalid() subroutine. All places where
Term::ANSIColor is loaded now check the version of the loaded code,
and ignore Term::ANSIColor if the version is too low. The version
number is centralized to P::C::Utils::Constants because of
ProhibitMagicNumbers violations, and because it seems the Right Thing.
Comments cross-reference the the definition of
$MODULE_VERSION_TERM_ANSICOLOR in P::C::Utils::Constants to the
corresponding value used in inc/Perl/Critic/BuildUtilities.pm.

12 years agoMerge r3637 to the backlog branch. Use my imaginative-software.com
Elliot Shank [Thu, 1 Oct 2009 00:35:26 +0000 (00:35 +0000)] 
Merge r3637 to the backlog branch.  Use my imaginative-software.com
e-mail address everywhere.

12 years agoMerge r3636 to the backlog branch. Assigned the COPYRIGHT to
Elliot Shank [Thu, 1 Oct 2009 00:32:21 +0000 (00:32 +0000)] 
Merge r3636 to the backlog branch.  Assigned the COPYRIGHT to
Imaginative Software Systems in all files where I was named as the
copyright holder.  I'm doing this to increase the marketing affinity
between Imaginative and Perl::Critic, and to help increase search
hits.

12 years agoMerge r3448, r3615, r3616, and r3649 to the backlog branch.
Elliot Shank [Thu, 1 Oct 2009 00:24:24 +0000 (00:24 +0000)] 
Merge r3448, r3615, r3616, and r3649 to the backlog branch.

Assign blame to correct person

Since PPI 1.206 still mistakes constructors for blocks in some (though
fewer) cases, comment code which is hacked to work around this, and
add a test to see when the problem is finally fixed.

Correct name of routine to be fixed when test passes.

Join broken NAME line.

12 years agoMert r3442 to the backlog branch. Add
Elliot Shank [Thu, 1 Oct 2009 00:11:47 +0000 (00:11 +0000)] 
Mert r3442 to the backlog branch.  Add
Perl::Critic::PPIx::Utilities::Statement, and in it
get_constant_name_elements_from_declaring_statement(). Deprecate
Perl::Critic::Utils::PPI::get_constant_name_element_from_declaring_statement().

12 years agoMerge r3313 to the backlog branch. Merge STDERR into STDOUT, so
Elliot Shank [Wed, 30 Sep 2009 00:56:30 +0000 (00:56 +0000)] 
Merge r3313 to the backlog branch.  Merge STDERR into STDOUT, so
TeamCity can see diagnostic messages.

12 years agoGet rid of P::C::Document::document_type() and just leave
Elliot Shank [Wed, 30 Sep 2009 00:43:30 +0000 (00:43 +0000)] 
Get rid of P::C::Document::document_type() and just leave
is_module()/is_program().

12 years agoRename the "--script-extensions" parameter to "--program-extensions"
Elliot Shank [Wed, 30 Sep 2009 00:32:43 +0000 (00:32 +0000)] 
Rename the "--script-extensions" parameter to "--program-extensions"
and otherwise try to get rid of all use of the word "script".

12 years agoMerge r3375, r3376, and r3381 to the backlog branch.
Elliot Shank [Tue, 29 Sep 2009 23:44:40 +0000 (23:44 +0000)] 
Merge r3375, r3376, and r3381 to the backlog branch.

Add command option --document-type and configuration item
script-extensions, both in aid of configuring perlcritic's idea of
which documents are scripts and which documents are modules.

Add command option --script-extensions, which can be specified
multiple times. Make Perl::Critic::Document->new() take keyword
arguments; the old interface still works but is deprecated. The
Perl::Critic::Document document_type() method is now an accessor only;
there is no mutator.

Remove --document-type command option, -document-type
Perl::Critic::Document->new() argument, everything in between, and
everything to support them. I think.

12 years agoBump the P::C version to 1.105. v1.105
Elliot Shank [Mon, 7 Sep 2009 21:19:21 +0000 (21:19 +0000)] 
Bump the P::C version to 1.105.

12 years agoChange InputOutput::RequireCheckedSyscalls to complain about "say" by
Elliot Shank [Mon, 7 Sep 2009 21:08:20 +0000 (21:08 +0000)] 
Change InputOutput::RequireCheckedSyscalls to complain about "say" by
default.  RT #37487

12 years agoFix RT #49016. Variables::ProhibitPunctuationVars would complain
Elliot Shank [Mon, 7 Sep 2009 20:59:49 +0000 (20:59 +0000)] 
Fix RT #49016.  Variables::ProhibitPunctuationVars would complain
about things that looked like references to magic hashes in strings,
however, without doing ye olde code interpolation via array reference
hack, you can't expand entire hashes in strings.

12 years agoMerge r3614 to the backlog branch. Correct presumptive typo in
Elliot Shank [Mon, 7 Sep 2009 19:49:56 +0000 (19:49 +0000)] 
Merge r3614 to the backlog branch.  Correct presumptive typo in
"emaila addresses".

12 years agoRemove incorrect comment in Changes that
Elliot Shank [Mon, 7 Sep 2009 19:45:11 +0000 (19:45 +0000)] 
Remove incorrect comment in Changes that
ProhibitInterpolationOfLiterals uses Email::Address.

12 years agoIn ValuesAndExpressions::RequireInterpolationOfMetachars, change the
Elliot Shank [Wed, 2 Sep 2009 02:44:07 +0000 (02:44 +0000)] 
In ValuesAndExpressions::RequireInterpolationOfMetachars, change the
block eval of a require of Email::Address to a string eval of a use of
a Email::Address so that we can specify a minimum version.

12 years agoAdd missing "on" to Changes on the backlog branch.
Elliot Shank [Sun, 23 Aug 2009 21:54:35 +0000 (21:54 +0000)] 
Add missing "on" to Changes on the backlog branch.

12 years agoBump P::C version to 1.104. v1.104
Elliot Shank [Sun, 23 Aug 2009 21:18:28 +0000 (21:18 +0000)] 
Bump P::C version to 1.104.

12 years agoUnsurprisingly, there were some self-compliance issues with the recent
Elliot Shank [Sun, 23 Aug 2009 20:59:29 +0000 (20:59 +0000)] 
Unsurprisingly, there were some self-compliance issues with the recent
change to Variables::ProhibitPunctuationVars.

12 years agoTest in t/Subroutines/RequireFinalReturn.run is no longer TODO and
Elliot Shank [Sun, 23 Aug 2009 20:50:01 +0000 (20:50 +0000)] 
Test in t/Subroutines/RequireFinalReturn.run is no longer TODO and
TODO test in t/Variables/ProhibitPunctuationVars.run had all of its
code commented out, which meant that it was "passing" when it
shouldn't have.

12 years agoRecent change to ValuesAndExpressions::ProhibitVersionStrings wasn't
Elliot Shank [Sun, 23 Aug 2009 20:28:31 +0000 (20:28 +0000)] 
Recent change to ValuesAndExpressions::ProhibitVersionStrings wasn't
checking perl version requirement statements.

12 years agoAdd is_script to the imports in
Elliot Shank [Sun, 23 Aug 2009 20:06:23 +0000 (20:06 +0000)] 
Add is_script to the imports in
Modules::RequireFilenameMatchesPackage.  I must have accidentally
gotten part of Tom's changes into the backlog branch.

12 years agoFix Variables::ProhibitPunctuationVars reference to non-public
Elliot Shank [Sun, 23 Aug 2009 19:49:38 +0000 (19:49 +0000)] 
Fix Variables::ProhibitPunctuationVars reference to non-public
variable in PPI::Token::Magic.

12 years agoMention indirect and Perl::Critic::Policy::Dynamic::NoIndirect in the
Elliot Shank [Sun, 23 Aug 2009 19:12:58 +0000 (19:12 +0000)] 
Mention indirect and Perl::Critic::Policy::Dynamic::NoIndirect in the
documentation for Objects::ProhibitIndirectSyntax.

12 years agoRename the --list-used command-line option to --list-enabled. This
Elliot Shank [Sun, 23 Aug 2009 18:26:53 +0000 (18:26 +0000)] 
Rename the --list-used command-line option to --list-enabled.  This
name matches the rest of the documentation and code.

12 years agoSync Changes on the backlog branch with the changes done in r3595 on
Elliot Shank [Sun, 23 Aug 2009 18:22:22 +0000 (18:22 +0000)] 
Sync Changes on the backlog branch with the changes done in r3595 on
trunk.

12 years agoUpdate Changes with the various RT tickets that have been fixed.
Elliot Shank [Sun, 23 Aug 2009 12:28:58 +0000 (12:28 +0000)] 
Update Changes with the various RT tickets that have been fixed.

12 years agoMerge r372 to the backlog branch. Remove mention of Switch in
Elliot Shank [Sun, 23 Aug 2009 12:24:27 +0000 (12:24 +0000)] 
Merge r372 to the backlog branch.  Remove mention of Switch in
ControlStructures::ProhibitCascadingIfElse since it is now deprecated
in perl core.

12 years agoMerge r3571 to the backlog branch. Remove superfluous import of
Elliot Shank [Sun, 23 Aug 2009 12:22:43 +0000 (12:22 +0000)] 
Merge r3571 to the backlog branch.  Remove superfluous import of
Perl::Critic::Utils is_script.

12 years agoFix "ensure we run true" comment at all the tests that get wrapped
Elliot Shank [Sun, 23 Aug 2009 12:16:57 +0000 (12:16 +0000)] 
Fix "ensure we run true" comment at all the tests that get wrapped
with the optional depenency stuff.

12 years agoMerge r3570 to the backlog branch. Add terminal 1; so test can be
Elliot Shank [Sun, 23 Aug 2009 12:10:26 +0000 (12:10 +0000)] 
Merge r3570 to the backlog branch.  Add terminal 1; so test can be
loaded into the without_optional_dependencies framework.

12 years agoAdd ~~ to the operator precedence table in P::C::Utils.
Elliot Shank [Sun, 23 Aug 2009 11:31:27 +0000 (11:31 +0000)] 
Add ~~ to the operator precedence table in P::C::Utils.

12 years agoHave ValuesAndExpressions::ProhibitVersionStrings apply to all include
Elliot Shank [Sun, 23 Aug 2009 11:10:16 +0000 (11:10 +0000)] 
Have ValuesAndExpressions::ProhibitVersionStrings apply to all include
statements, not just "use" and "require".

12 years agoSimplify ValuesAndExpressions::ProhibitVersionStrings a lot by using
Elliot Shank [Sun, 23 Aug 2009 11:04:32 +0000 (11:04 +0000)] 
Simplify ValuesAndExpressions::ProhibitVersionStrings a lot by using
the new PPI::Statement::Include::module_version() method.

12 years agoMention minor documentation fix for RT #48936 in Changes.
Elliot Shank [Sun, 23 Aug 2009 00:19:33 +0000 (00:19 +0000)] 
Mention minor documentation fix for RT #48936 in Changes.

12 years agoMerge r3579 to the backlog branch. Minor documentation problem in
Elliot Shank [Sun, 23 Aug 2009 00:16:06 +0000 (00:16 +0000)] 
Merge r3579 to the backlog branch.  Minor documentation problem in
ValuesAndExpressions::ProhibitInterpolationOfLiterals.  RT #48936.

12 years agoMerge r3577 to the backlog branch. Minor, stupid typo in Changes.
Elliot Shank [Sat, 22 Aug 2009 04:16:34 +0000 (04:16 +0000)] 
Merge r3577 to the backlog branch.  Minor, stupid typo in Changes.

12 years agoSpecify version 0.19 as minimum for List::MoreUtils. RT #48917
Elliot Shank [Sat, 22 Aug 2009 04:03:26 +0000 (04:03 +0000)] 
Specify version 0.19 as minimum for List::MoreUtils.  RT #48917

12 years agoMerge r3567 to the backlog branch.
Elliot Shank [Mon, 17 Aug 2009 03:24:46 +0000 (03:24 +0000)] 
Merge r3567 to the backlog branch.

Update distribution links in doc/links.html.

12 years agoMerge most of r3563 to the backlog branch.
Elliot Shank [Mon, 17 Aug 2009 03:05:53 +0000 (03:05 +0000)] 
Merge most of r3563 to the backlog branch.

Policy Modules::RequireFilenameMatchesPackage now respects the logical
filename as defined by the prevailing #line directive at the point
where the package declaration is found.  Test cases are included.

The r3563 includes moving the $LOCATION_* constants out of Violation
into Utils::Constants.  This part of the commit was not merged because
those constants should not be exposed outside of Violation.  There are
proper accessors to get at the values.  If I could, I'd get rid of the
location() method entirely.

12 years agoA couple of small self-compliance issues in
Elliot Shank [Sun, 9 Aug 2009 22:28:39 +0000 (22:28 +0000)] 
A couple of small self-compliance issues in
ValuesAndExpressions::RequireInterpolationOfMetachars and
P::C::TestUtils.

12 years agoMerge r3421 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 22:02:57 +0000 (22:02 +0000)] 
Merge r3421 to the backlog branch.

Correct comment in xt/author/43_criticize-run-files.t.

12 years agoMerge r3481 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 22:01:17 +0000 (22:01 +0000)] 
Merge r3481 to the backlog branch.

RT 36098: Allow the $# 'twigil'. Catch (I hope!) more bracketed
variable names. More tests for all this.

12 years agoMerge r3476 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 21:58:02 +0000 (21:58 +0000)] 
Merge r3476 to the backlog branch.

Update to RT 36098/cvs commit 3470: test escaped things that might
look like interpolations but are not, or maybe vice versa.

12 years agoMerge r3475 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 21:56:10 +0000 (21:56 +0000)] 
Merge r3475 to the backlog branch.

Add TODO test case for RT#48422: Allow flow control method calls in
ControlStructures::ProhibitPostfixControls.

12 years agoMerge r3470 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 21:54:19 +0000 (21:54 +0000)] 
Merge r3470 to the backlog branch.

RT 36098: RegularExpressions::ProhibitComplexRegexes should not
penalize long variable names. Basically applied the same hack that was
used on \P. This meant ProhibitMagicNumbers no longer needed its '##
no critic (ProhibitComplexRegexes)'.

12 years agoMerge r3456 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 21:51:07 +0000 (21:51 +0000)] 
Merge r3456 to the backlog branch.

RT 45196: Allow qw$Revision: 1234 $ but not qw{$Revision: 1234$} in
Miscellanea::RequireRcsKeywords. A minor tweak in P::C::TestUtils was
made to allow an explicit end marker (another '## cut') for a subtest
document, because I kept getting false negatives from the .run file
footer.

12 years agoBreak out the tests of ignoring email addresses from
Elliot Shank [Sun, 9 Aug 2009 21:06:04 +0000 (21:06 +0000)] 
Break out the tests of ignoring email addresses from
ValuesAndExpressions/RequireInterpolationOfMetachars.run because,
unlike other optional modules, the presence of Email::Address actually
changes how ValuesAndExpressions::RequireInterpolationOfMetachars
works.

12 years agoMerge r3461 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 20:31:29 +0000 (20:31 +0000)] 
Merge r3461 to the backlog branch.

"undocument" Perl::Critic::Policy;:new().

12 years agoMerge r3426 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 20:29:36 +0000 (20:29 +0000)] 
Merge r3426 to the backlog branch.

Change P::C::Violation to take advantage of the PPI #line directive
support.

12 years agoMerge r3425 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 20:16:47 +0000 (20:16 +0000)] 
Merge r3425 to the backlog branch.

Now that PPI::Statement::Variable::symbols() exists, remove the
duplicate implementation in NamingConventions::Capitalization.

12 years agoMerge r3424 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 20:14:15 +0000 (20:14 +0000)] 
Merge r3424 to the backlog branch.

Take advantage of PPI::Statement::Include::arguments() in
P::C::Utils::PPI.

12 years agoMerge r3423 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 20:10:54 +0000 (20:10 +0000)] 
Merge r3423 to the backlog branch.

Add example to the POD for
Perl::Critic::Utils::PPI::get_previous_module_used_on_same_line().

12 years agoMerge r3422 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 20:09:38 +0000 (20:09 +0000)] 
Merge r3422 to the backlog branch.

Add "regexes" to xt/author/40_stop_words.

12 years agoMerge r3359 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 20:07:21 +0000 (20:07 +0000)] 
Merge r3359 to the backlog branch.

Trailing whitespace in ProhibitComplexVersion.

12 years agoMerge r3358 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 20:06:02 +0000 (20:06 +0000)] 
Merge r3358 to the backlog branch.

Formatting changes to --statistics output.

12 years agoMerge r3354 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 20:02:54 +0000 (20:02 +0000)] 
Merge r3354 to the backlog branch.

Fix some "not $foo eq $bar" issues in ProhibitMagicNumbers.

12 years agoMerge r3351, r3353, and r3357 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 20:00:53 +0000 (20:00 +0000)] 
Merge r3351, r3353, and r3357 to the backlog branch.

Add TODO comment to ProhibitVersionStrings about removing
_is_version_string() after the next non-dev PPI release.

Add TODO for reformatting the POD.

Remove "proposed implementation" comments in TODO.pod.

12 years agoMerge r3349 and r3355 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 19:55:40 +0000 (19:55 +0000)] 
Merge r3349 and r3355 to the backlog branch.

Small formatting issue in
ValuesAndExpressions::RequireConstantVersion.

Code cleanup and whitespace refactoring in ProhibitComplexVersion,
RequireConstantVersion, and ProhibitComplexVersion.

12 years agoMerge r3348 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 19:50:46 +0000 (19:50 +0000)] 
Merge r3348 to the backlog branch.

Change ProhibitPunctuationVars to accept $] by default because there's
no English.pm equivalent.

12 years agoMerge r3233, r3245, and r3246 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 19:43:09 +0000 (19:43 +0000)] 
Merge r3233, r3245, and r3246 to the backlog branch.

Restore ProhibitPunctuationVars.

ProhibitPunctuationVars: replaced named regexps with literals; made
file lexicals Readonly.

ProhibitPunctuationVars: comment tweak; removed trailing whitespace.

12 years agoCode cleanups in Modules::ProhibitAutomaticExportation done during fix
Elliot Shank [Sun, 9 Aug 2009 03:56:46 +0000 (03:56 +0000)] 
Code cleanups in Modules::ProhibitAutomaticExportation done during fix
to ValuesAndExpressions::RequireInterpolationOfMetachars.

12 years agoFix issue found in
Elliot Shank [Sun, 9 Aug 2009 03:55:35 +0000 (03:55 +0000)] 
Fix issue found in
ValuesAndExpressions::RequireInterpolationOfMetachars found by self
compliance of Modules::ProhibitAutomaticExportation.

12 years agoUse Email::Address to get
Elliot Shank [Sun, 9 Aug 2009 03:36:47 +0000 (03:36 +0000)] 
Use Email::Address to get
ValuesAndExpressions::RequireInterpolationOfMetachars to ignore email
addresses.

12 years agoDid the equivalent of the patch in RT #47318 to
Elliot Shank [Sun, 9 Aug 2009 02:37:33 +0000 (02:37 +0000)] 
Did the equivalent of the patch in RT #47318 to
ValuesAndExpressions::RequireInterpolationOfMetachars: allow sigils in
"use vars" arguments.

12 years agoMerge r3352 and r3356 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 01:21:17 +0000 (01:21 +0000)] 
Merge r3352 and r3356 to the backlog branch.

Add new policies to Perl-Critic/Changes.

Remove "new feature" in Changes that was actually a new policy.

12 years agoMerge r3346 and r3347 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 01:17:30 +0000 (01:17 +0000)] 
Merge r3346 and r3347 to the backlog branch.

Added test cases for RT #46862, where a built-in function needs
parentheses because they contain some kind of operator.

I have already written the code to make this test pass, but I'm not
going to commit it until my demonstration of Continuous Integration
systems at the Perlmongers meeting tonight.

Adding code to fix test case.

12 years agoMerge r3326 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 01:10:32 +0000 (01:10 +0000)] 
Merge r3326 to the backlog branch.

Updated Changes file.

12 years agoMerge r3325 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 01:07:28 +0000 (01:07 +0000)] 
Merge r3325 to the backlog branch.

Modified NamingConventions::Capitalization to cope with fully
qualified subroutine declarations, such as "sub Foo::Bar::baz {...}".
The rules apply as usual, but the package part of the subroutine name
is ignored.

12 years agoMerge part of r3323 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 01:03:04 +0000 (01:03 +0000)] 
Merge part of r3323 to the backlog branch.

Fix self-compliance problems.

Only merged Miscellanea::RequireRcsKeywords and xt/author/40_stop_words.

12 years agoMerge r3308 and r3309 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 00:52:43 +0000 (00:52 +0000)] 
Merge r3308 and r3309 to the backlog branch.

Just comments

Woops, the new --list-all command line option slipped into that last
commit.  Now, I have renamed it back to --list and introduced
--list-used, so that the command line iterface is backward compatible.
But I still want a better name than --list-used.

12 years agoMerge r3307 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 00:48:00 +0000 (00:48 +0000)] 
Merge r3307 to the backlog branch.

Bug fix.  I admit, I didn't run the tests first.  Sorry.
[Miscellanea::RequireRcsKeywords]

12 years agoMerge r3305 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 00:45:48 +0000 (00:45 +0000)] 
Merge r3305 to the backlog branch.

More micro-optimization. [Miscellanea::RequireRcsKeywords]

12 years agoMerge r3303 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 00:40:32 +0000 (00:40 +0000)] 
Merge r3303 to the backlog branch.

Rewrote [TestingAndDebugging::RequireUseWarnings] to take advantage of
optimized find() method.

12 years agoMerge r3302 to the backlog branch.
Elliot Shank [Sun, 9 Aug 2009 00:38:52 +0000 (00:38 +0000)] 
Merge r3302 to the backlog branch.

Rewrote [TestingAndDebugging::RequireUseStrict] to take advantage of
the optimized find() method.