From 4677a7c89429ddf530b4cb50bc5d24a9d661fede Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 19 Aug 2021 16:36:43 -0400 Subject: [PATCH] perlcritic: use strict, use warnings --- src/Makefile.PL | 2 ++ src/lib/Hydra/Config.pm | 3 +++ src/lib/Hydra/Event.pm | 1 + src/lib/Hydra/Helper/AddBuilds.pm | 1 + src/lib/Hydra/Helper/CatalystUtils.pm | 1 + src/lib/Hydra/Helper/Email.pm | 1 + src/lib/Hydra/Helper/Escape.pm | 1 + src/lib/Hydra/Helper/Nix.pm | 1 + src/lib/Hydra/Model/DB.pm | 1 + src/lib/Hydra/Plugin.pm | 1 + src/lib/Hydra/Plugin/BazaarInput.pm | 1 + src/lib/Hydra/Plugin/BitBucketPulls.pm | 1 + src/lib/Hydra/Plugin/BitBucketStatus.pm | 1 + src/lib/Hydra/Plugin/CircleCINotification.pm | 1 + src/lib/Hydra/Plugin/CompressLog.pm | 1 + src/lib/Hydra/Plugin/CoverityScan.pm | 1 + src/lib/Hydra/Plugin/DarcsInput.pm | 1 + src/lib/Hydra/Plugin/DeclarativeJobsets.pm | 1 + src/lib/Hydra/Plugin/EmailNotification.pm | 1 + src/lib/Hydra/Plugin/GitInput.pm | 1 + src/lib/Hydra/Plugin/GiteaStatus.pm | 1 + src/lib/Hydra/Plugin/GithubPulls.pm | 1 + src/lib/Hydra/Plugin/GithubRefs.pm | 1 + src/lib/Hydra/Plugin/GithubStatus.pm | 1 + src/lib/Hydra/Plugin/GitlabPulls.pm | 1 + src/lib/Hydra/Plugin/GitlabStatus.pm | 1 + src/lib/Hydra/Plugin/HipChatNotification.pm | 1 + src/lib/Hydra/Plugin/InfluxDBNotification.pm | 1 + src/lib/Hydra/Plugin/MercurialInput.pm | 1 + src/lib/Hydra/Plugin/PathInput.pm | 1 + src/lib/Hydra/Plugin/RunCommand.pm | 1 + src/lib/Hydra/Plugin/S3Backup.pm | 1 + src/lib/Hydra/Plugin/SlackNotification.pm | 1 + src/lib/Hydra/Plugin/SoTest.pm | 1 + src/lib/Hydra/Plugin/SubversionInput.pm | 1 + src/lib/Hydra/View/JSON.pm | 2 ++ src/lib/Hydra/View/NARInfo.pm | 3 ++- src/lib/Hydra/View/NixClosure.pm | 1 + src/lib/Hydra/View/NixExprs.pm | 1 + src/lib/Hydra/View/NixLog.pm | 1 + src/lib/Hydra/View/NixManifest.pm | 1 + src/lib/Hydra/View/NixNAR.pm | 1 + src/lib/Hydra/View/TT.pm | 1 + src/script/hydra-backfill-ids | 1 + src/script/hydra-create-user | 1 + src/script/hydra-dev-server | 3 +++ src/script/hydra-eval-jobset | 1 + src/script/hydra-init | 1 + src/script/hydra-notify | 1 + src/script/hydra-s3-backup-collect-garbage | 1 + src/script/hydra-send-stats | 1 + src/script/hydra-server | 3 +++ src/script/hydra-update-gc-roots | 1 + src/sql/update-dbix.pl | 2 ++ t/Config/hydra-notify.t | 1 + t/Config/include.t | 1 + t/Config/statsd.t | 1 + t/Controller/Build/evals.t | 1 + t/Controller/Jobset/channel.t | 1 + t/Controller/Jobset/evals.t | 1 + t/Controller/Jobset/http.t | 1 + t/Controller/Jobset/type-constraints.t | 1 + t/Controller/Root/evals.t | 1 + t/Controller/metrics.t | 1 + t/Controller/projects.t | 1 + t/Event.t | 1 + t/Event/BuildFinished.t | 1 + t/Event/BuildStarted.t | 1 + t/Event/StepFinished.t | 1 + t/Helper/escape.t | 1 + t/PostgresListener.t | 1 + t/Schema/Users.t | 1 + t/api-test.t | 1 + t/build-products.t | 1 + t/evaluate-basic.t | 1 + t/evaluate-dependent-jobsets.t | 1 + t/input-types/bzr-checkout.t | 1 + t/input-types/bzr.t | 1 + t/input-types/darcs.t | 1 + t/input-types/deepgit.t | 1 + t/input-types/git-rev.t | 1 + t/input-types/git.t | 1 + t/input-types/hg.t | 1 + t/input-types/svn-checkout.t | 1 + t/input-types/svn.t | 1 + t/lib/Setup.pm | 1 + t/queue-runner/default-machine-file.t | 1 + t/s3-backup-test.pl | 1 + t/scripts/hydra-create-user.t | 1 + t/scripts/hydra-init.t | 1 + t/scripts/hydra-send-stats.t | 1 + t/setup-notifications-jobset.pl | 2 ++ 92 files changed, 103 insertions(+), 1 deletion(-) diff --git a/src/Makefile.PL b/src/Makefile.PL index 36b3e992..9b04da7f 100644 --- a/src/Makefile.PL +++ b/src/Makefile.PL @@ -1,5 +1,7 @@ # IMPORTANT: if you delete this file your app will not work as # expected. you have been warned +use strict; +use warnings; use inc::Module::Install; name 'Hydra'; diff --git a/src/lib/Hydra/Config.pm b/src/lib/Hydra/Config.pm index a681f1c0..bb991822 100644 --- a/src/lib/Hydra/Config.pm +++ b/src/lib/Hydra/Config.pm @@ -1,5 +1,8 @@ package Hydra::Config; +use strict; +use warnings; + our %configGeneralOpts = (-UseApacheInclude => 1, -IncludeAgain => 1, -IncludeRelative => 1); 1; diff --git a/src/lib/Hydra/Event.pm b/src/lib/Hydra/Event.pm index cd8bdde2..e3954308 100644 --- a/src/lib/Hydra/Event.pm +++ b/src/lib/Hydra/Event.pm @@ -1,6 +1,7 @@ package Hydra::Event; use strict; +use warnings; use Hydra::Event::BuildFinished; use Hydra::Event::BuildStarted; use Hydra::Event::StepFinished; diff --git a/src/lib/Hydra/Helper/AddBuilds.pm b/src/lib/Hydra/Helper/AddBuilds.pm index d928943a..6923c72a 100644 --- a/src/lib/Hydra/Helper/AddBuilds.pm +++ b/src/lib/Hydra/Helper/AddBuilds.pm @@ -1,6 +1,7 @@ package Hydra::Helper::AddBuilds; use strict; +use warnings; use utf8; use Encode; use JSON; diff --git a/src/lib/Hydra/Helper/CatalystUtils.pm b/src/lib/Hydra/Helper/CatalystUtils.pm index cd3a0fd7..0b48e455 100644 --- a/src/lib/Hydra/Helper/CatalystUtils.pm +++ b/src/lib/Hydra/Helper/CatalystUtils.pm @@ -2,6 +2,7 @@ package Hydra::Helper::CatalystUtils; use utf8; use strict; +use warnings; use Exporter; use Readonly; use Nix::Store; diff --git a/src/lib/Hydra/Helper/Email.pm b/src/lib/Hydra/Helper/Email.pm index 44366f43..6bd9e517 100644 --- a/src/lib/Hydra/Helper/Email.pm +++ b/src/lib/Hydra/Helper/Email.pm @@ -1,6 +1,7 @@ package Hydra::Helper::Email; use strict; +use warnings; use Email::MIME; use Email::Sender::Simple qw(sendmail); use Exporter 'import'; diff --git a/src/lib/Hydra/Helper/Escape.pm b/src/lib/Hydra/Helper/Escape.pm index 3037951f..8458f885 100644 --- a/src/lib/Hydra/Helper/Escape.pm +++ b/src/lib/Hydra/Helper/Escape.pm @@ -1,6 +1,7 @@ package Hydra::Helper::Escape; use strict; +use warnings; use base qw(Exporter); use Hydra::Helper::AttributeSet; diff --git a/src/lib/Hydra/Helper/Nix.pm b/src/lib/Hydra/Helper/Nix.pm index bd294b73..953a7114 100644 --- a/src/lib/Hydra/Helper/Nix.pm +++ b/src/lib/Hydra/Helper/Nix.pm @@ -1,6 +1,7 @@ package Hydra::Helper::Nix; use strict; +use warnings; use Exporter; use File::Path; use File::Basename; diff --git a/src/lib/Hydra/Model/DB.pm b/src/lib/Hydra/Model/DB.pm index 7514302e..d3a401c3 100644 --- a/src/lib/Hydra/Model/DB.pm +++ b/src/lib/Hydra/Model/DB.pm @@ -1,6 +1,7 @@ package Hydra::Model::DB; use strict; +use warnings; use base 'Catalyst::Model::DBIC::Schema'; sub getHydraPath { diff --git a/src/lib/Hydra/Plugin.pm b/src/lib/Hydra/Plugin.pm index 119d2738..a3526427 100644 --- a/src/lib/Hydra/Plugin.pm +++ b/src/lib/Hydra/Plugin.pm @@ -1,6 +1,7 @@ package Hydra::Plugin; use strict; +use warnings; use Module::Pluggable search_path => "Hydra::Plugin", instantiate => 'new'; diff --git a/src/lib/Hydra/Plugin/BazaarInput.pm b/src/lib/Hydra/Plugin/BazaarInput.pm index db26172f..458f5141 100644 --- a/src/lib/Hydra/Plugin/BazaarInput.pm +++ b/src/lib/Hydra/Plugin/BazaarInput.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::BazaarInput; use strict; +use warnings; use parent 'Hydra::Plugin'; use Digest::SHA qw(sha256_hex); use File::Path; diff --git a/src/lib/Hydra/Plugin/BitBucketPulls.pm b/src/lib/Hydra/Plugin/BitBucketPulls.pm index 1a50f6ec..5371d5f0 100644 --- a/src/lib/Hydra/Plugin/BitBucketPulls.pm +++ b/src/lib/Hydra/Plugin/BitBucketPulls.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::BitBucketPulls; use strict; +use warnings; use parent 'Hydra::Plugin'; use HTTP::Request; use LWP::UserAgent; diff --git a/src/lib/Hydra/Plugin/BitBucketStatus.pm b/src/lib/Hydra/Plugin/BitBucketStatus.pm index 097bed00..72ed3b6b 100644 --- a/src/lib/Hydra/Plugin/BitBucketStatus.pm +++ b/src/lib/Hydra/Plugin/BitBucketStatus.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::BitBucketStatus; use strict; +use warnings; use parent 'Hydra::Plugin'; use HTTP::Request; use JSON; diff --git a/src/lib/Hydra/Plugin/CircleCINotification.pm b/src/lib/Hydra/Plugin/CircleCINotification.pm index 398fe066..a2eb26a4 100644 --- a/src/lib/Hydra/Plugin/CircleCINotification.pm +++ b/src/lib/Hydra/Plugin/CircleCINotification.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::CircleCINotification; use strict; +use warnings; use parent 'Hydra::Plugin'; use HTTP::Request; use LWP::UserAgent; diff --git a/src/lib/Hydra/Plugin/CompressLog.pm b/src/lib/Hydra/Plugin/CompressLog.pm index bf8d4327..10e8f6cc 100644 --- a/src/lib/Hydra/Plugin/CompressLog.pm +++ b/src/lib/Hydra/Plugin/CompressLog.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::CompressLog; use strict; +use warnings; use utf8; use parent 'Hydra::Plugin'; use Hydra::Helper::CatalystUtils; diff --git a/src/lib/Hydra/Plugin/CoverityScan.pm b/src/lib/Hydra/Plugin/CoverityScan.pm index f395100f..53f7c3f6 100644 --- a/src/lib/Hydra/Plugin/CoverityScan.pm +++ b/src/lib/Hydra/Plugin/CoverityScan.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::CoverityScan; use strict; +use warnings; use parent 'Hydra::Plugin'; use File::Basename; use LWP::UserAgent; diff --git a/src/lib/Hydra/Plugin/DarcsInput.pm b/src/lib/Hydra/Plugin/DarcsInput.pm index 0091819a..42f6a9a4 100644 --- a/src/lib/Hydra/Plugin/DarcsInput.pm +++ b/src/lib/Hydra/Plugin/DarcsInput.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::DarcsInput; use strict; +use warnings; use parent 'Hydra::Plugin'; use Digest::SHA qw(sha256_hex); use File::Path; diff --git a/src/lib/Hydra/Plugin/DeclarativeJobsets.pm b/src/lib/Hydra/Plugin/DeclarativeJobsets.pm index 2b6771b5..f59fa858 100644 --- a/src/lib/Hydra/Plugin/DeclarativeJobsets.pm +++ b/src/lib/Hydra/Plugin/DeclarativeJobsets.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::DeclarativeJobsets; use strict; +use warnings; use parent 'Hydra::Plugin'; use Hydra::Helper::AddBuilds; diff --git a/src/lib/Hydra/Plugin/EmailNotification.pm b/src/lib/Hydra/Plugin/EmailNotification.pm index 4e6c7809..721365e1 100644 --- a/src/lib/Hydra/Plugin/EmailNotification.pm +++ b/src/lib/Hydra/Plugin/EmailNotification.pm @@ -2,6 +2,7 @@ package Hydra::Plugin::EmailNotification; use utf8; use strict; +use warnings; use parent 'Hydra::Plugin'; use POSIX qw(strftime); use Template; diff --git a/src/lib/Hydra/Plugin/GitInput.pm b/src/lib/Hydra/Plugin/GitInput.pm index 848c0dee..cd8d23e2 100644 --- a/src/lib/Hydra/Plugin/GitInput.pm +++ b/src/lib/Hydra/Plugin/GitInput.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::GitInput; use strict; +use warnings; use parent 'Hydra::Plugin'; use Digest::SHA qw(sha256_hex); use File::Path; diff --git a/src/lib/Hydra/Plugin/GiteaStatus.pm b/src/lib/Hydra/Plugin/GiteaStatus.pm index 75796053..567dfd09 100644 --- a/src/lib/Hydra/Plugin/GiteaStatus.pm +++ b/src/lib/Hydra/Plugin/GiteaStatus.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::GiteaStatus; use strict; +use warnings; use parent 'Hydra::Plugin'; use HTTP::Request; diff --git a/src/lib/Hydra/Plugin/GithubPulls.pm b/src/lib/Hydra/Plugin/GithubPulls.pm index 6a3cc951..fb497c76 100644 --- a/src/lib/Hydra/Plugin/GithubPulls.pm +++ b/src/lib/Hydra/Plugin/GithubPulls.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::GithubPulls; use strict; +use warnings; use parent 'Hydra::Plugin'; use HTTP::Request; use LWP::UserAgent; diff --git a/src/lib/Hydra/Plugin/GithubRefs.pm b/src/lib/Hydra/Plugin/GithubRefs.pm index 408159dd..1de2672d 100644 --- a/src/lib/Hydra/Plugin/GithubRefs.pm +++ b/src/lib/Hydra/Plugin/GithubRefs.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::GithubRefs; use strict; +use warnings; use parent 'Hydra::Plugin'; use HTTP::Request; use LWP::UserAgent; diff --git a/src/lib/Hydra/Plugin/GithubStatus.pm b/src/lib/Hydra/Plugin/GithubStatus.pm index e3dfc533..cda7426a 100644 --- a/src/lib/Hydra/Plugin/GithubStatus.pm +++ b/src/lib/Hydra/Plugin/GithubStatus.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::GithubStatus; use strict; +use warnings; use parent 'Hydra::Plugin'; use HTTP::Request; use JSON; diff --git a/src/lib/Hydra/Plugin/GitlabPulls.pm b/src/lib/Hydra/Plugin/GitlabPulls.pm index b44a1a98..3249ecf8 100644 --- a/src/lib/Hydra/Plugin/GitlabPulls.pm +++ b/src/lib/Hydra/Plugin/GitlabPulls.pm @@ -15,6 +15,7 @@ package Hydra::Plugin::GitlabPulls; use strict; +use warnings; use parent 'Hydra::Plugin'; use HTTP::Request; use LWP::UserAgent; diff --git a/src/lib/Hydra/Plugin/GitlabStatus.pm b/src/lib/Hydra/Plugin/GitlabStatus.pm index 483d99bd..d19877ed 100644 --- a/src/lib/Hydra/Plugin/GitlabStatus.pm +++ b/src/lib/Hydra/Plugin/GitlabStatus.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::GitlabStatus; use strict; +use warnings; use parent 'Hydra::Plugin'; use HTTP::Request; use JSON; diff --git a/src/lib/Hydra/Plugin/HipChatNotification.pm b/src/lib/Hydra/Plugin/HipChatNotification.pm index 9a7385c4..415cfafb 100644 --- a/src/lib/Hydra/Plugin/HipChatNotification.pm +++ b/src/lib/Hydra/Plugin/HipChatNotification.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::HipChatNotification; use strict; +use warnings; use parent 'Hydra::Plugin'; use LWP::UserAgent; use Hydra::Helper::CatalystUtils; diff --git a/src/lib/Hydra/Plugin/InfluxDBNotification.pm b/src/lib/Hydra/Plugin/InfluxDBNotification.pm index 21a3fa31..62200cc9 100644 --- a/src/lib/Hydra/Plugin/InfluxDBNotification.pm +++ b/src/lib/Hydra/Plugin/InfluxDBNotification.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::InfluxDBNotification; use strict; +use warnings; use parent 'Hydra::Plugin'; use HTTP::Request; use LWP::UserAgent; diff --git a/src/lib/Hydra/Plugin/MercurialInput.pm b/src/lib/Hydra/Plugin/MercurialInput.pm index 8a9b4b43..3aaa0ba3 100644 --- a/src/lib/Hydra/Plugin/MercurialInput.pm +++ b/src/lib/Hydra/Plugin/MercurialInput.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::MercurialInput; use strict; +use warnings; use parent 'Hydra::Plugin'; use Digest::SHA qw(sha256_hex); use File::Path; diff --git a/src/lib/Hydra/Plugin/PathInput.pm b/src/lib/Hydra/Plugin/PathInput.pm index d5c490f0..e7d98da2 100644 --- a/src/lib/Hydra/Plugin/PathInput.pm +++ b/src/lib/Hydra/Plugin/PathInput.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::PathInput; use strict; +use warnings; use parent 'Hydra::Plugin'; use POSIX qw(strftime); use Hydra::Helper::Nix; diff --git a/src/lib/Hydra/Plugin/RunCommand.pm b/src/lib/Hydra/Plugin/RunCommand.pm index 7cfb63c5..33295e50 100644 --- a/src/lib/Hydra/Plugin/RunCommand.pm +++ b/src/lib/Hydra/Plugin/RunCommand.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::RunCommand; use strict; +use warnings; use parent 'Hydra::Plugin'; use experimental 'smartmatch'; use JSON; diff --git a/src/lib/Hydra/Plugin/S3Backup.pm b/src/lib/Hydra/Plugin/S3Backup.pm index 346cf239..bdd23b2f 100644 --- a/src/lib/Hydra/Plugin/S3Backup.pm +++ b/src/lib/Hydra/Plugin/S3Backup.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::S3Backup; use strict; +use warnings; use parent 'Hydra::Plugin'; use File::Temp; use File::Basename; diff --git a/src/lib/Hydra/Plugin/SlackNotification.pm b/src/lib/Hydra/Plugin/SlackNotification.pm index 387f92c4..5320dd7b 100644 --- a/src/lib/Hydra/Plugin/SlackNotification.pm +++ b/src/lib/Hydra/Plugin/SlackNotification.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::SlackNotification; use strict; +use warnings; use parent 'Hydra::Plugin'; use HTTP::Request; use LWP::UserAgent; diff --git a/src/lib/Hydra/Plugin/SoTest.pm b/src/lib/Hydra/Plugin/SoTest.pm index aed7a1b8..e3abf4cc 100644 --- a/src/lib/Hydra/Plugin/SoTest.pm +++ b/src/lib/Hydra/Plugin/SoTest.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::SoTest; use strict; +use warnings; use parent 'Hydra::Plugin'; use Hydra::Helper::CatalystUtils; use HTTP::Request; diff --git a/src/lib/Hydra/Plugin/SubversionInput.pm b/src/lib/Hydra/Plugin/SubversionInput.pm index a8183e2c..7879364e 100644 --- a/src/lib/Hydra/Plugin/SubversionInput.pm +++ b/src/lib/Hydra/Plugin/SubversionInput.pm @@ -1,6 +1,7 @@ package Hydra::Plugin::SubversionInput; use strict; +use warnings; use parent 'Hydra::Plugin'; use Digest::SHA qw(sha256_hex); use Hydra::Helper::Nix; diff --git a/src/lib/Hydra/View/JSON.pm b/src/lib/Hydra/View/JSON.pm index f2ab1fc8..d8924ac3 100644 --- a/src/lib/Hydra/View/JSON.pm +++ b/src/lib/Hydra/View/JSON.pm @@ -1,3 +1,5 @@ package Hydra::View::JSON; +use strict; +use warnings; use base qw(Catalyst::View::JSON); 1; diff --git a/src/lib/Hydra/View/NARInfo.pm b/src/lib/Hydra/View/NARInfo.pm index 460bd706..44db78b1 100644 --- a/src/lib/Hydra/View/NARInfo.pm +++ b/src/lib/Hydra/View/NARInfo.pm @@ -1,5 +1,7 @@ package Hydra::View::NARInfo; +use strict; +use warnings; use File::Basename; use Hydra::Helper::CatalystUtils; use MIME::Base64; @@ -7,7 +9,6 @@ use Nix::Manifest; use Nix::Store; use Nix::Utils; use base qw/Catalyst::View/; -use strict; sub process { my ($self, $c) = @_; diff --git a/src/lib/Hydra/View/NixClosure.pm b/src/lib/Hydra/View/NixClosure.pm index d906dce3..c157af6b 100644 --- a/src/lib/Hydra/View/NixClosure.pm +++ b/src/lib/Hydra/View/NixClosure.pm @@ -1,6 +1,7 @@ package Hydra::View::NixClosure; use strict; +use warnings; use base qw/Catalyst::View/; use IO::Pipe; diff --git a/src/lib/Hydra/View/NixExprs.pm b/src/lib/Hydra/View/NixExprs.pm index 194c51ec..eb68c8bc 100644 --- a/src/lib/Hydra/View/NixExprs.pm +++ b/src/lib/Hydra/View/NixExprs.pm @@ -1,6 +1,7 @@ package Hydra::View::NixExprs; use strict; +use warnings; use base qw/Catalyst::View/; use Hydra::Helper::Nix; use Hydra::Helper::Escape; diff --git a/src/lib/Hydra/View/NixLog.pm b/src/lib/Hydra/View/NixLog.pm index fb9e0e1f..c2146bd4 100644 --- a/src/lib/Hydra/View/NixLog.pm +++ b/src/lib/Hydra/View/NixLog.pm @@ -1,6 +1,7 @@ package Hydra::View::NixLog; use strict; +use warnings; use base qw/Catalyst::View/; use Hydra::Helper::CatalystUtils; diff --git a/src/lib/Hydra/View/NixManifest.pm b/src/lib/Hydra/View/NixManifest.pm index c64f8dab..5b02ac06 100644 --- a/src/lib/Hydra/View/NixManifest.pm +++ b/src/lib/Hydra/View/NixManifest.pm @@ -1,6 +1,7 @@ package Hydra::View::NixManifest; use strict; +use warnings; use base qw/Catalyst::View/; use Hydra::Helper::Nix; use Nix::Store; diff --git a/src/lib/Hydra/View/NixNAR.pm b/src/lib/Hydra/View/NixNAR.pm index e1798275..cae43275 100644 --- a/src/lib/Hydra/View/NixNAR.pm +++ b/src/lib/Hydra/View/NixNAR.pm @@ -1,6 +1,7 @@ package Hydra::View::NixNAR; use strict; +use warnings; use base qw/Catalyst::View/; use Hydra::Helper::CatalystUtils; diff --git a/src/lib/Hydra/View/TT.pm b/src/lib/Hydra/View/TT.pm index f8b3fb64..c6176231 100644 --- a/src/lib/Hydra/View/TT.pm +++ b/src/lib/Hydra/View/TT.pm @@ -1,6 +1,7 @@ package Hydra::View::TT; use strict; +use warnings; use base 'Catalyst::View::TT'; use Hydra::Helper::Nix; use Time::Seconds; diff --git a/src/script/hydra-backfill-ids b/src/script/hydra-backfill-ids index d9fc362a..bb750829 100755 --- a/src/script/hydra-backfill-ids +++ b/src/script/hydra-backfill-ids @@ -1,6 +1,7 @@ #! /usr/bin/env perl use strict; +use warnings; use utf8; use Hydra::Model::DB; diff --git a/src/script/hydra-create-user b/src/script/hydra-create-user index 0ed51bd8..d0178dc1 100755 --- a/src/script/hydra-create-user +++ b/src/script/hydra-create-user @@ -1,6 +1,7 @@ #! /usr/bin/env perl use strict; +use warnings; use Hydra::Schema; use Hydra::Helper::Nix; use Hydra::Model::DB; diff --git a/src/script/hydra-dev-server b/src/script/hydra-dev-server index 4f03ee39..ea502d89 100755 --- a/src/script/hydra-dev-server +++ b/src/script/hydra-dev-server @@ -1,5 +1,8 @@ #! /usr/bin/env perl +use strict; +use warnings; + BEGIN { $ENV{CATALYST_SCRIPT_GEN} = 40; } diff --git a/src/script/hydra-eval-jobset b/src/script/hydra-eval-jobset index 77938c85..4d44a4b0 100755 --- a/src/script/hydra-eval-jobset +++ b/src/script/hydra-eval-jobset @@ -1,6 +1,7 @@ #! /usr/bin/env perl use strict; +use warnings; use utf8; use Config::General; use Data::Dump qw(dump); diff --git a/src/script/hydra-init b/src/script/hydra-init index ac9d4afe..6bc38470 100755 --- a/src/script/hydra-init +++ b/src/script/hydra-init @@ -1,6 +1,7 @@ #! /usr/bin/env perl use strict; +use warnings; use Hydra::Schema; use Hydra::Helper::Nix; use Hydra::Model::DB; diff --git a/src/script/hydra-notify b/src/script/hydra-notify index 770f0620..b877c7ee 100755 --- a/src/script/hydra-notify +++ b/src/script/hydra-notify @@ -1,6 +1,7 @@ #! /usr/bin/env perl use strict; +use warnings; use utf8; use Getopt::Long; use HTTP::Server::PSGI; diff --git a/src/script/hydra-s3-backup-collect-garbage b/src/script/hydra-s3-backup-collect-garbage index ae6423f7..b8394518 100755 --- a/src/script/hydra-s3-backup-collect-garbage +++ b/src/script/hydra-s3-backup-collect-garbage @@ -1,6 +1,7 @@ #! /usr/bin/env perl use strict; +use warnings; use File::Basename; use Fcntl; use IO::File; diff --git a/src/script/hydra-send-stats b/src/script/hydra-send-stats index d07d9406..8b015ae7 100755 --- a/src/script/hydra-send-stats +++ b/src/script/hydra-send-stats @@ -1,6 +1,7 @@ #! /usr/bin/env perl use strict; +use warnings; use utf8; use Hydra::Helper::Nix; use Net::Statsd; diff --git a/src/script/hydra-server b/src/script/hydra-server index b8922e93..7f0deb2e 100755 --- a/src/script/hydra-server +++ b/src/script/hydra-server @@ -1,5 +1,8 @@ #! /usr/bin/env perl +use strict; +use warnings; + BEGIN { $ENV{CATALYST_SCRIPT_GEN} = 40; } diff --git a/src/script/hydra-update-gc-roots b/src/script/hydra-update-gc-roots index de544e53..69578e29 100755 --- a/src/script/hydra-update-gc-roots +++ b/src/script/hydra-update-gc-roots @@ -1,6 +1,7 @@ #! /usr/bin/env perl use strict; +use warnings; use File::Path; use File::stat; use File::Basename; diff --git a/src/sql/update-dbix.pl b/src/sql/update-dbix.pl index a9a18f0e..338e65b1 100644 --- a/src/sql/update-dbix.pl +++ b/src/sql/update-dbix.pl @@ -1,4 +1,6 @@ use Cwd; +use strict; +use warnings; die "$0: dbi connection string required \n" if scalar @ARGV != 1; diff --git a/t/Config/hydra-notify.t b/t/Config/hydra-notify.t index 7fc8aa63..fb050324 100644 --- a/t/Config/hydra-notify.t +++ b/t/Config/hydra-notify.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; my %ctx = test_init(hydra_config => q| diff --git a/t/Config/include.t b/t/Config/include.t index 3e57b3d4..e161902e 100644 --- a/t/Config/include.t +++ b/t/Config/include.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; my %ctx = test_init( diff --git a/t/Config/statsd.t b/t/Config/statsd.t index be042127..c50e8d99 100644 --- a/t/Config/statsd.t +++ b/t/Config/statsd.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; my %ctx = test_init(hydra_config => q| diff --git a/t/Controller/Build/evals.t b/t/Controller/Build/evals.t index b12e00c6..6cbdeac9 100644 --- a/t/Controller/Build/evals.t +++ b/t/Controller/Build/evals.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; use Data::Dumper; my %ctx = test_init(); diff --git a/t/Controller/Jobset/channel.t b/t/Controller/Jobset/channel.t index cb0a5952..322abc92 100644 --- a/t/Controller/Jobset/channel.t +++ b/t/Controller/Jobset/channel.t @@ -1,5 +1,6 @@ use feature 'unicode_strings'; use strict; +use warnings; use Setup; use IO::Uncompress::Bunzip2 qw(bunzip2); use Archive::Tar; diff --git a/t/Controller/Jobset/evals.t b/t/Controller/Jobset/evals.t index ba53124a..221efb65 100644 --- a/t/Controller/Jobset/evals.t +++ b/t/Controller/Jobset/evals.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; use Data::Dumper; my %ctx = test_init(); diff --git a/t/Controller/Jobset/http.t b/t/Controller/Jobset/http.t index be2950f0..6b5788c5 100644 --- a/t/Controller/Jobset/http.t +++ b/t/Controller/Jobset/http.t @@ -1,5 +1,6 @@ use feature 'unicode_strings'; use strict; +use warnings; use Setup; use JSON qw(decode_json encode_json); diff --git a/t/Controller/Jobset/type-constraints.t b/t/Controller/Jobset/type-constraints.t index 361c7c56..88a8e2ee 100644 --- a/t/Controller/Jobset/type-constraints.t +++ b/t/Controller/Jobset/type-constraints.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; my %ctx = test_init(); diff --git a/t/Controller/Root/evals.t b/t/Controller/Root/evals.t index 895ef424..2119725b 100644 --- a/t/Controller/Root/evals.t +++ b/t/Controller/Root/evals.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; use Data::Dumper; my %ctx = test_init(); diff --git a/t/Controller/metrics.t b/t/Controller/metrics.t index 8915104d..325efad9 100644 --- a/t/Controller/metrics.t +++ b/t/Controller/metrics.t @@ -1,5 +1,6 @@ use feature 'unicode_strings'; use strict; +use warnings; use Setup; use JSON qw(decode_json encode_json); diff --git a/t/Controller/projects.t b/t/Controller/projects.t index fb7df6ad..068f566b 100644 --- a/t/Controller/projects.t +++ b/t/Controller/projects.t @@ -1,5 +1,6 @@ use feature 'unicode_strings'; use strict; +use warnings; use Setup; use JSON qw(decode_json encode_json); diff --git a/t/Event.t b/t/Event.t index a15b95ea..908c2440 100644 --- a/t/Event.t +++ b/t/Event.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Hydra::Event; use Test2::V0; diff --git a/t/Event/BuildFinished.t b/t/Event/BuildFinished.t index 8650f95c..298b4162 100644 --- a/t/Event/BuildFinished.t +++ b/t/Event/BuildFinished.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; my %ctx = test_init(); diff --git a/t/Event/BuildStarted.t b/t/Event/BuildStarted.t index 04a7df54..08433d8d 100644 --- a/t/Event/BuildStarted.t +++ b/t/Event/BuildStarted.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; my %ctx = test_init(); diff --git a/t/Event/StepFinished.t b/t/Event/StepFinished.t index a4bc3fb9..ae2d8081 100644 --- a/t/Event/StepFinished.t +++ b/t/Event/StepFinished.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; my %ctx = test_init(); diff --git a/t/Helper/escape.t b/t/Helper/escape.t index 22dd4d47..424c9198 100644 --- a/t/Helper/escape.t +++ b/t/Helper/escape.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; use Data::Dumper; use Test2::V0; diff --git a/t/PostgresListener.t b/t/PostgresListener.t index ac9ec502..0249d498 100644 --- a/t/PostgresListener.t +++ b/t/PostgresListener.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; my %ctx = test_init(); diff --git a/t/Schema/Users.t b/t/Schema/Users.t index fd1a66e1..b9d52419 100644 --- a/t/Schema/Users.t +++ b/t/Schema/Users.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; my %ctx = test_init(); diff --git a/t/api-test.t b/t/api-test.t index ac1e4964..3fee0264 100644 --- a/t/api-test.t +++ b/t/api-test.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; use JSON; use File::Copy; diff --git a/t/build-products.t b/t/build-products.t index 6987b9df..3bc62d2e 100644 --- a/t/build-products.t +++ b/t/build-products.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; my %ctx = test_init(); diff --git a/t/evaluate-basic.t b/t/evaluate-basic.t index c12709b2..f4c6fde8 100644 --- a/t/evaluate-basic.t +++ b/t/evaluate-basic.t @@ -1,5 +1,6 @@ use feature 'unicode_strings'; use strict; +use warnings; use Setup; my %ctx = test_init(); diff --git a/t/evaluate-dependent-jobsets.t b/t/evaluate-dependent-jobsets.t index c5a4085d..19c62891 100644 --- a/t/evaluate-dependent-jobsets.t +++ b/t/evaluate-dependent-jobsets.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; my %ctx = test_init(); diff --git a/t/input-types/bzr-checkout.t b/t/input-types/bzr-checkout.t index ee1f90a0..297c9bd6 100644 --- a/t/input-types/bzr-checkout.t +++ b/t/input-types/bzr-checkout.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; use TestScmInput; diff --git a/t/input-types/bzr.t b/t/input-types/bzr.t index 0cc0a23d..36448103 100644 --- a/t/input-types/bzr.t +++ b/t/input-types/bzr.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; use TestScmInput; diff --git a/t/input-types/darcs.t b/t/input-types/darcs.t index aa95a8e6..7f8bd044 100644 --- a/t/input-types/darcs.t +++ b/t/input-types/darcs.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; use TestScmInput; diff --git a/t/input-types/deepgit.t b/t/input-types/deepgit.t index 4d418148..487d0a83 100644 --- a/t/input-types/deepgit.t +++ b/t/input-types/deepgit.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; use TestScmInput; diff --git a/t/input-types/git-rev.t b/t/input-types/git-rev.t index 866370d2..a1749f3b 100644 --- a/t/input-types/git-rev.t +++ b/t/input-types/git-rev.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; use TestScmInput; diff --git a/t/input-types/git.t b/t/input-types/git.t index 0804cc1a..ed2ab43b 100644 --- a/t/input-types/git.t +++ b/t/input-types/git.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; use TestScmInput; diff --git a/t/input-types/hg.t b/t/input-types/hg.t index 28552288..83d9df87 100644 --- a/t/input-types/hg.t +++ b/t/input-types/hg.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; use TestScmInput; diff --git a/t/input-types/svn-checkout.t b/t/input-types/svn-checkout.t index 48f07f09..af4e65ce 100644 --- a/t/input-types/svn-checkout.t +++ b/t/input-types/svn-checkout.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; use TestScmInput; diff --git a/t/input-types/svn.t b/t/input-types/svn.t index c2eb8cec..44f8d44e 100644 --- a/t/input-types/svn.t +++ b/t/input-types/svn.t @@ -1,4 +1,5 @@ use strict; +use warnings; use Setup; use TestScmInput; diff --git a/t/lib/Setup.pm b/t/lib/Setup.pm index 800c90eb..751a81c2 100644 --- a/t/lib/Setup.pm +++ b/t/lib/Setup.pm @@ -1,6 +1,7 @@ package Setup; use strict; +use warnings; use Exporter; use Test::PostgreSQL; use File::Temp; diff --git a/t/queue-runner/default-machine-file.t b/t/queue-runner/default-machine-file.t index d57f1816..e6348226 100644 --- a/t/queue-runner/default-machine-file.t +++ b/t/queue-runner/default-machine-file.t @@ -1,5 +1,6 @@ use feature 'unicode_strings'; use strict; +use warnings; use Setup; my %ctx = test_init( diff --git a/t/s3-backup-test.pl b/t/s3-backup-test.pl index 372a9697..3baa8b99 100644 --- a/t/s3-backup-test.pl +++ b/t/s3-backup-test.pl @@ -1,4 +1,5 @@ use strict; +use warnings; use File::Basename; use Hydra::Model::DB; use Hydra::Helper::Nix; diff --git a/t/scripts/hydra-create-user.t b/t/scripts/hydra-create-user.t index 3706d911..abd0b1b8 100644 --- a/t/scripts/hydra-create-user.t +++ b/t/scripts/hydra-create-user.t @@ -1,5 +1,6 @@ use feature 'unicode_strings'; use strict; +use warnings; use Setup; my %ctx = test_init(); diff --git a/t/scripts/hydra-init.t b/t/scripts/hydra-init.t index 517a14d7..3fbcb629 100644 --- a/t/scripts/hydra-init.t +++ b/t/scripts/hydra-init.t @@ -1,5 +1,6 @@ use feature 'unicode_strings'; use strict; +use warnings; use Setup; my %ctx = test_init(); diff --git a/t/scripts/hydra-send-stats.t b/t/scripts/hydra-send-stats.t index dde88cfe..1c0e1eeb 100644 --- a/t/scripts/hydra-send-stats.t +++ b/t/scripts/hydra-send-stats.t @@ -1,5 +1,6 @@ use feature 'unicode_strings'; use strict; +use warnings; use Setup; my %ctx = test_init(); diff --git a/t/setup-notifications-jobset.pl b/t/setup-notifications-jobset.pl index 8eef78e6..70998845 100644 --- a/t/setup-notifications-jobset.pl +++ b/t/setup-notifications-jobset.pl @@ -1,3 +1,5 @@ +use strict; +use warnings; use LWP::UserAgent; use JSON;