Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tidy all files and fix critic violations #1250

Merged
merged 5 commits into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
*.komodoproject
*.kpf
*.sqlite*
*.sw*
.DS_Store
.tidyall.d
/MYMETA.*
/Makefile
/Makefile.old
/blib
/cover_db/
/etc/metacpan_local.pl
/local/
/log4perl_local.conf
/metacpan_server_local.conf
/perltidy.LOG
/pm_to_blib
/var
/etc/metacpan_local.pl
/t/var/darkpan/
/t/var/log/
/t/var/tmp/
/var
*.komodoproject
*.kpf
*.sqlite*
*.sw*
.DS_Store
.tidyall.d
3 changes: 1 addition & 2 deletions .perlcriticrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ verbose = 11
theme = core

[-ControlStructures::ProhibitPostfixControls]
[-Documentation::RequirePodLinksIncludeText]
[-Documentation::RequirePodSections]
[-InputOutput::ProhibitInteractiveTest]
[-Modules::RequireVersionVar]
[-RegularExpressions::RequireDotMatchAnything]
[-RegularExpressions::RequireExtendedFormatting]
[-RegularExpressions::RequireLineBoundaryMatching]
[-Subroutines::ProhibitExplicitReturnUndef]
[-TestingAndDebugging::ProhibitNoStrict]
[-ValuesAndExpressions::ProhibitNoisyQuotes]
[-ValuesAndExpressions::ProhibitAccessOfPrivateData]
[-Variables::ProhibitPunctuationVars]

[CodeLayout::RequireTrailingCommas]
Expand Down
1 change: 1 addition & 0 deletions bin/convert_authors.pl
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env perl
# PODNAME: foo

use strict;
Expand Down
1 change: 1 addition & 0 deletions bin/mirror_cpan_for_developers.pl
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env perl
# This script is only needed if you are developing metacpan,
# on the live servers we use File::Rsync::Mirror::Recent
# https://github.com/metacpan/metacpan-puppet/tree/master/modules/rrrclient
Expand Down
8 changes: 4 additions & 4 deletions bin/unlisted_prereqs.pl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

use strict;
use warnings;
use Perl::PrereqScanner 1.014;
use CPAN::Meta::Requirements ();
use File::Find::Rule::Perl;
use List::Util qw( sum );
use Perl::PrereqScanner 1.014 ();
use CPAN::Meta::Requirements ();
use File::Find::Rule::Perl ();
use List::Util qw( sum );
use version 0.77;

# TODO: use CPAN::Meta::Prereqs
Expand Down
2 changes: 1 addition & 1 deletion etc/metacpan.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# do not edit this file
# create etc/metacpan_local.pl instead
use FindBin;
use FindBin ();

{
# ElasticSearch instance, can be either a single server
Expand Down
2 changes: 1 addition & 1 deletion improve-search-results/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# carton/local::lib
/local/
# carton/local::lib
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Server/Controller/Login.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sub auto : Private {
sub index : Path {
my ( $self, $c ) = @_;
my @login = map { "<li><a href=\"/login/" . lc($_) . "\">$_</a></li>" }
sort grep {s/^Login:://} $c->controllers;
sort map /^Login::(.*)/, $c->controllers;
$c->res->content_type('text/html');
$c->res->body(qq{<pre><h1>Login via</h1><ul>@login</ul></pre>});
}
Expand Down
2 changes: 1 addition & 1 deletion perlimports.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# preserve_unused disabled.

cache = false # setting this to true is currently discouraged
ignore_modules = ["Catalyst::Runtime","Module::Pluggable", "namespace::clean", "Test::More", "Type::Library", "With::Roles"]
ignore_modules = ["Catalyst::Runtime","Module::Pluggable", "namespace::clean", "Test::More", "Type::Library", "With::Roles", "File::Find::Rule::Perl"]
ignore_modules_filename = ""
ignore_modules_pattern = "" # regex like "^(Foo|Foo::Bar)"
ignore_modules_pattern_filename = ""
Expand Down
4 changes: 2 additions & 2 deletions t/lib/MetaCPAN/Server/Test.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package MetaCPAN::Server::Test;
use strict;
use warnings;

use HTTP::Request::Common qw( DELETE GET POST );
use HTTP::Request::Common qw( DELETE GET POST ); ## no perlimports
use MetaCPAN::Server ();
use Plack::Test qw( test_psgi );
use Plack::Test qw( test_psgi ); ## no perlimports
use Test::More;

use base 'Exporter';
Expand Down
3 changes: 0 additions & 3 deletions tidyall.ini
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,5 @@ ignore = lib/MetaCPAN/Server/View/Pod.pm
ignore = lib/MetaCPAN/Util.pm
ignore = lib/Plack/Session/Store/ElasticSearch.pm

[SortLines]
select = .gitignore

[UniqueLines]
select = .gitignore