Skip to content

Commit

Permalink
Item15151: add warnings and strictness
Browse files Browse the repository at this point in the history
- added no critic where appropriate
- removed PiwikPlugin from core
- switching output from :utf8 to :encoding(UTF-8) as suggested by PBP
- fixed mixed comparators: numerics being compared using string comparator and vice versa
- fixed loop iterators not being scoped lexically
- replaced/removed , as a command separator
- fixed mixed precedence comparators (or vs || etc)
- simplified some eval "use $impl" patterns

Item15150: support hierarchical template webs in the regexes

note, creating a web from a hierarchical template web isn't supported yet (-> 2.2.0)
  • Loading branch information
MichaelDaum committed Jun 29, 2022
1 parent 85e86e1 commit 894282d
Show file tree
Hide file tree
Showing 120 changed files with 236 additions and 824 deletions.
1 change: 1 addition & 0 deletions BuildContrib/lib/Foswiki/Contrib/BuildContrib.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package Foswiki::Contrib::BuildContrib;
use strict;
use warnings;

our $VERSION = '2.10';
our $RELEASE = '27 Apr 2022';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package Foswiki::Contrib::Build;

use strict;
use warnings;

# Build POD documentation. This target defines =%$POD%= - it
# does not generate any output. The target will be invoked
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package Foswiki::Contrib::Build;

use strict;
use warnings;

my %minifiers; # functions used to minify

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package Foswiki::Contrib::Build;

use strict;
use warnings;

my $collector;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package Foswiki::Contrib::Build;

use strict;
use warnings;

=begin TML
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package Foswiki::Contrib::Build;

use strict;
use warnings;

=begin TML
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package Foswiki::Contrib::Build;

use strict;
use warnings;

=begin TML
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package Foswiki::Contrib::Build;

use strict;
use warnings;

=begin TML
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package Foswiki::Contrib::Build;

use strict;
use warnings;

my $collector;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package Foswiki::Contrib::Build;

use strict;
use warnings;

=begin TML
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package Foswiki::Contrib::Build;

use strict;
use warnings;

our @stageFilters;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package Foswiki::Contrib::Build;

use strict;
use warnings;

=begin TML
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package Foswiki::Contrib::Build;

use strict;
use warnings;

my @tidyFilters = ( { RE => qr/\.pl$/ }, { RE => qr/\.pm$/ }, );
my $collector;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package Foswiki::Contrib::Build;

use strict;
use warnings;

our $DEFAULTCUSTOMERDB = "$ENV{HOME}/customerDB";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package Foswiki::Contrib::Build;

use strict;
use warnings;

our @twikiFilters = (
{ RE => qr/\.pm$/, filter => '_twikify_perl' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package Foswiki::Contrib::Build;

use strict;
use warnings;

=begin TML
Expand Down
1 change: 1 addition & 0 deletions BuildContrib/lib/Perl/Tidy.pm
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ use 5.004; # need IO::File from 5.004 or later
BEGIN { $^W = 1; } # turn on warnings

use strict;
use warnings;
use Exporter;
use Carp;
$|++;
Expand Down
1 change: 1 addition & 0 deletions CommentPlugin/lib/Foswiki/Plugins/CommentPlugin/JQuery.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

package Foswiki::Plugins::CommentPlugin::JQuery;
use strict;
use warnings;

use Foswiki::Plugins::JQueryPlugin::Plugin ();
our @ISA = qw( Foswiki::Plugins::JQueryPlugin::Plugin );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package Foswiki::Contrib::CompareRevisionsAddOn;
use strict;
use warnings;

# Also update CompareRevisionsAddOnPlugin
our $VERSION = '1.115';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

package Foswiki::Plugins::ConfigurePlugin::JQuery;
use strict;
use warnings;

use Foswiki::Plugins::JQueryPlugin::Plugin ();
our @ISA = qw( Foswiki::Plugins::JQueryPlugin::Plugin );
Expand Down
1 change: 1 addition & 0 deletions EditRowPlugin/lib/Foswiki/Plugins/EditRowPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package Foswiki::Plugins::EditRowPlugin;

use strict;
use warnings;
use Foswiki::Request ();
use Foswiki::Render ();
use Foswiki::Plugins::EditRowPlugin::View ();
Expand Down
1 change: 1 addition & 0 deletions EditRowPlugin/lib/Foswiki/Plugins/EditRowPlugin/Editor.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package Foswiki::Plugins::EditRowPlugin::Editor;
# Base class of editor plugins

use strict;
use warnings;
use Assert;

use Foswiki::Func ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package Foswiki::Plugins::EditRowPlugin::Editor::checkbox;

use strict;
use warnings;
use Assert;

use Foswiki::Plugins::EditRowPlugin::Editor ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package Foswiki::Plugins::EditRowPlugin::Editor::date;

use strict;
use warnings;
use Assert;

use Foswiki::Plugins::EditRowPlugin::Editor ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package Foswiki::Plugins::EditRowPlugin::Editor::editbutton;

use strict;
use warnings;
use Assert;

use Foswiki::Plugins::EditRowPlugin::Editor::label ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package Foswiki::Plugins::EditRowPlugin::Editor::label;

use strict;
use warnings;
use Assert;

use Foswiki::Plugins::EditRowPlugin::Editor ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package Foswiki::Plugins::EditRowPlugin::Editor::radio;

use strict;
use warnings;
use Assert;

use Foswiki::Plugins::EditRowPlugin::Editor ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package Foswiki::Plugins::EditRowPlugin::Editor::row;

use strict;
use warnings;
use Assert;

use Foswiki::Plugins::EditRowPlugin::Editor::label ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package Foswiki::Plugins::EditRowPlugin::Editor::select;

use strict;
use warnings;
use Assert;

use Foswiki::Plugins::EditRowPlugin::Editor ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package Foswiki::Plugins::EditRowPlugin::Editor::text;
# Note that textarea subclasses this class.

use strict;
use warnings;
use Assert;

use Foswiki::Plugins::EditRowPlugin::Editor ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package Foswiki::Plugins::EditRowPlugin::Editor::textarea;

use strict;
use warnings;
use Assert;

use Foswiki::Plugins::EditRowPlugin::Editor::text ();
Expand Down
1 change: 1 addition & 0 deletions EditRowPlugin/lib/Foswiki/Plugins/EditRowPlugin/JQuery.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

package Foswiki::Plugins::EditRowPlugin::JQuery;
use strict;
use warnings;

use Assert;

Expand Down
1 change: 1 addition & 0 deletions EditRowPlugin/lib/Foswiki/Plugins/EditRowPlugin/Table.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package Foswiki::Plugins::EditRowPlugin::Table;

use strict;
use warnings;
use Assert;

use Foswiki::Tables::Table ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package Foswiki::Plugins::EditRowPlugin::TableCell;

use strict;
use warnings;
use Assert;

use Foswiki::Func ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package Foswiki::Plugins::EditRowPlugin::TableParser;

use strict;
use warnings;
use Assert;

use Foswiki::Attrs ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package Foswiki::Plugins::EditRowPlugin::TableRow;

use strict;
use warnings;
use Assert;

use Foswiki::Func ();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package InterwikiPluginSuite;

use strict;
use warnings;

use Unit::TestSuite;
our @ISA = 'Unit::TestSuite';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package InterwikiPluginTests;

use strict;
use warnings;

use FoswikiFnTestCase;
our @ISA = qw( FoswikiFnTestCase );
Expand Down
1 change: 1 addition & 0 deletions JSCalendarContrib/test/unit/JSCalendarContribTests.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use strict;
use warnings;

package JSCalendarContribTests;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package Foswiki::Contrib::ModPerlEngineContrib;

use strict;
use warnings;

use vars qw( $VERSION $RELEASE $SHORTDESCRIPTION );

Expand Down
1 change: 1 addition & 0 deletions ModPerlEngineContrib/lib/Foswiki/Engine/Apache.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Refer to Foswiki::Engine documentation for explanation about methos below.
package Foswiki::Engine::Apache;

use strict;
use warnings;

use Foswiki::Engine;
our @ISA = qw( Foswiki::Engine );
Expand Down
1 change: 1 addition & 0 deletions ModPerlEngineContrib/lib/Foswiki/Engine/Apache/MP13.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Refer to Foswiki::Engine documentation for explanation about methos below.
package Foswiki::Engine::Apache::MP13;

use strict;
use warnings;
use Foswiki::Engine::Apache;
our @ISA = qw( Foswiki::Engine::Apache );

Expand Down
1 change: 1 addition & 0 deletions ModPerlEngineContrib/lib/Foswiki/Engine/Apache2.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Refer to the Foswiki::Engine documentation for further information.
package Foswiki::Engine::Apache2;

use strict;
use warnings;
use Foswiki::Engine::Apache;
our @ISA = qw( Foswiki::Engine::Apache );

Expand Down
1 change: 1 addition & 0 deletions ModPerlEngineContrib/lib/Foswiki/Engine/Apache2/MP20.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Refer to Foswiki::Engine documentation for explanation about methos below.
package Foswiki::Engine::Apache2::MP20;

use strict;
use warnings;
use Foswiki::Engine::Apache2;
our @ISA = qw( Foswiki::Engine::Apache2 );

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package PlainFileStoreContribSuite;

use strict;
use warnings;

use Unit::TestSuite;
our @ISA = qw( Unit::TestSuite );

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
use strict;

package PlainFileStoreContribTests;
use strict;
use warnings;

use Foswiki;
use FoswikiTestCase;
our @ISA = qw( FoswikiTestCase );

use strict;
use Foswiki;

sub new {
my $self = shift()->SUPER::new(@_);
return $self;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Plugin for an alternative query algorithm using DBCacheContrib
package Foswiki::Plugins::QueryAcceleratorPlugin;

use strict;
use warnings;

use Assert;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Part of QueryAcceleratorPlugin.

package Foswiki::Store::QueryAlgorithms::DBCache;
use strict;
use warnings;

#@ISA = ( 'Foswiki::Query::QueryAlgorithms' ); # interface

Expand Down
1 change: 1 addition & 0 deletions RenderFormPlugin/lib/Foswiki/Plugins/RenderFormPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package Foswiki::Plugins::RenderFormPlugin;

use strict;
use warnings;

use vars qw( $VERSION $RELEASE $REVISION $debug $pluginName );

Expand Down
Loading

0 comments on commit 894282d

Please sign in to comment.