Skip to content

Commit

Permalink
Initial structure
Browse files Browse the repository at this point in the history
  • Loading branch information
plicease committed Feb 12, 2024
1 parent 0792254 commit acbb5ea
Show file tree
Hide file tree
Showing 11 changed files with 264 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.pm linguist-language=Perl
*.t linguist-language=Perl
*.h linguist-language=C


82 changes: 82 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: linux

on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:

jobs:
perl:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
cip_tag:
- "5.37"
- "5.36"
- "5.34"
- "5.32"
- "5.30"
- "5.28"
- "5.26"
- "5.24"
- "5.22"
- "5.20"
- "5.18"
- "5.16"
- "5.14"
- "5.12"
- "5.10"
- "5.8"

env:
CIP_TAG: ${{ matrix.cip_tag }}

steps:
- uses: actions/checkout@v2

- name: Bootstrap CIP
run: |
curl -L https://raw.githubusercontent.com/uperl/cip/main/bin/github-bootstrap | bash
- name: Cache-Key
id: cache-key
run: |
echo -n '::set-output name=key::'
cip cache-key
- name: Cache CPAN modules
uses: actions/cache@v2
with:
path: ~/.cip
key: ${{ runner.os }}-build-${{ steps.cache-key.outputs.key }}
restore-keys: |
${{ runner.os }}-build-${{ steps.cache-key.outputs.key }}
- name: Start-Container
run: |
cip start
- name: Diagnostics
run: |
cip diag
- name: Install-Dependencies
run: |
cip install
- name: Build + Test
run: |
cip script
- name: CPAN log
if: ${{ failure() }}
run: |
cip exec bash -c 'cat $HOME/.cpanm/latest-build/build.log'
30 changes: 30 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: static

on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:

jobs:
perl:

runs-on: ubuntu-latest

env:
CIP_TAG: static

steps:
- uses: actions/checkout@v2

- name: Bootstrap CIP
run: |
curl -L https://raw.githubusercontent.com/uperl/cip/main/bin/github-bootstrap | bash
- name: Build + Test
run: |
cip script
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Test2-Tools-PerlCritic-Role-Progressive-*
/.build/
*.swp


6 changes: 6 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Revision history for {{$dist->name}}

{{$NEXT}}
- initial version


16 changes: 16 additions & 0 deletions author.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
pod_spelling_system:
skip: 0
# list of words that are spelled correctly
# (regardless of what spell check thinks)
# or stuff that I like to spell incorrectly
# intentionally
stopwords: []

pod_coverage:
skip: 0
# format is "Class#method" or "Class",regex allowed
# for either Class or method.
private: []


24 changes: 24 additions & 0 deletions dist.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name = Test2-Tools-PerlCritic-Role-Progressive
author = Graham Ollis <plicease@cpan.org>
license = Perl_5
copyright_holder = Graham Ollis
copyright_year = 2024
version = 0.01

[@Author::Plicease]
:version = 2.75
release_tests = 1
installer = Author::Plicease::MakeMaker
github_user = uperl
default_branch = main
test2_v0 = 1
workflow = static
workflow = linux
version_plugin = PkgVersion::Block

[Author::Plicease::Core]

[Author::Plicease::Upload]
cpan = 0


11 changes: 11 additions & 0 deletions lib/Test2/Tools/PerlCritic/Role/Progressive.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use warnings;
use 5.020;
use experimental qw( postderef signatures );

package Test2::Tools::PerlCritic::Role::Progressive {

# ABSTRACT: Role to progressively critique Perl code
}

1;

61 changes: 61 additions & 0 deletions perlcriticrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
severity = 1
only = 1

[Community::ArrayAssignAref]
[Community::BarewordFilehandles]
[Community::ConditionalDeclarations]
[Community::ConditionalImplicitReturn]
[Community::DeprecatedFeatures]
[Community::DiscouragedModules]
[Community::DollarAB]
[Community::Each]
[Community::EmptyReturn]
[Community::IndirectObjectNotation]
[Community::LexicalForeachIterator]
[Community::LoopOnHash]
[Community::ModPerl]
[Community::OpenArgs]
[Community::OverloadOptions]
[Community::POSIXImports]
[Community::PackageMatchesFilename]
[Community::PreferredAlternatives]
[Community::StrictWarnings]
extra_importers = Test2::V0
[Community::Threads]
[Community::Wantarray]
[Community::WarningsSwitch]
[Community::WhileDiamondDefaultAssignment]

[BuiltinFunctions::ProhibitBooleanGrep]
[BuiltinFunctions::ProhibitStringyEval]
[BuiltinFunctions::ProhibitStringySplit]
[BuiltinFunctions::ProhibitVoidGrep]
[BuiltinFunctions::ProhibitVoidMap]
[ClassHierarchies::ProhibitExplicitISA]
[ClassHierarchies::ProhibitOneArgBless]
[CodeLayout::ProhibitHardTabs]
allow_leading_tabs = 0
[CodeLayout::ProhibitTrailingWhitespace]
[CodeLayout::RequireConsistentNewlines]
[ControlStructures::ProhibitLabelsWithSpecialBlockNames]
[ControlStructures::ProhibitMutatingListFunctions]
[ControlStructures::ProhibitUnreachableCode]
[InputOutput::ProhibitBarewordFileHandles]
[InputOutput::ProhibitJoinedReadline]
[InputOutput::ProhibitTwoArgOpen]
[Miscellanea::ProhibitFormats]
[Miscellanea::ProhibitUselessNoCritic]
[Modules::ProhibitConditionalUseStatements]
;[Modules::RequireEndWithOne]
[Modules::RequireNoMatchVarsWithUseEnglish]
[Objects::ProhibitIndirectSyntax]
[RegularExpressions::ProhibitUselessTopic]
[Subroutines::ProhibitNestedSubs]
[ValuesAndExpressions::ProhibitLeadingZeros]
[ValuesAndExpressions::ProhibitMixedBooleanOperators]
[ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator]
[ValuesAndExpressions::RequireUpperCaseHeredocTerminator]
[Variables::ProhibitPerl4PackageNames]
[Variables::ProhibitUnusedVariables]


8 changes: 8 additions & 0 deletions t/test2_tools_perlcritic_role_progressive.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use Test2::V0 -no_srand => 1;
use Test2::Tools::PerlCritic::Role::Progressive;

ok 1, 'todo';

done_testing;


16 changes: 16 additions & 0 deletions xt/author/critic.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use Test2::Require::Module 'Test2::Tools::PerlCritic';
use Test2::Require::Module 'Perl::Critic';
use Test2::Require::Module 'Perl::Critic::Community';
use Test2::V0;
use Perl::Critic;
use Test2::Tools::PerlCritic;

my $critic = Perl::Critic->new(
-profile => 'perlcriticrc',
);

perl_critic_ok ['lib','t'], $critic;

done_testing;


0 comments on commit acbb5ea

Please sign in to comment.