Start checking PRs with perlcritic

[?]
Aug 19, 2021, 8:13 PM
BJIR6VCGO3J5FEUEMVA7RGIRIDZYSH6ZBYAZSC2FZZ24QDL7APXQC

Dependencies

  • [2] IRZYSVNO tests: delete set-up.pl / tear-down.pl
  • [3] 2JJP7673 tests: move to t, allow `yath test` from root
  • [4] UBUZPF7J Note in README how to run a single test
  • [5] LA5L7JCU README.md: info about runHydra/foreman
  • [6] TOTCBKRU README: update with instructions on running tests
  • [7] 43CQEJTE README.md update
  • [*] CLXEECMF * Start putting build results in a database.
  • [*] NVMDS7GE Add README.md
  • [*] G2ZB6464 first test, not yet in buildprocess

Change contents

  • file addition: .perlcriticrc (----------)
    [9.2]
    theme = community
    # 5 is the least complainy, 1 is the most complainy
    severity = 5
  • replacement in README.md at line 109
    [5.1][5.1:19]()
    ### Running Tests
    [5.1]
    [5.977]
    ### Checking your patches
  • replacement in README.md at line 111
    [5.978][5.20:170]()
    After making your changes, verify the test suite still passes. After following the steps in [Development Environment](#development-environment), run:
    [5.978]
    [5.170]
    After making your changes, verify the test suite passes and perlcritic is still happy.
  • replacement in README.md at line 113
    [5.171][5.171:175]()
    ```
    [5.171]
    [5.175]
    Start by following the steps in [Development Environment](#development-environment).
    Then, you can run the tests and the perlcritic linter together with:
    ```console
  • replacement in README.md at line 120
    [5.200][4.0:35]()
    $ # Or, to run a single test, use:
    [5.200]
    [4.35]
    ```
    You can run a single test with:
    ```
    $ nix-shell
  • edit in README.md at line 127
    [4.61]
    [5.200]
    ```
    And you can run just perlcritic with:
  • edit in README.md at line 132
    [5.204]
    [5.204]
    $ nix-shell
    $ make perlcritic
    ```
  • edit in t/Makefile.am at line 26
    [11.103]
    [2.0]
    perlcritic.pl \
  • file addition: perlcritic.pl (---r------)
    [3.697]
    #!/usr/bin/env perl
    use strict;
    use warnings;
    use Cwd 'abs_path';
    use File::Basename;
    my $dirname = abs_path(dirname(__FILE__) . "/..");
    print STDERR "Executing perlcritic against $dirname\n";
    chdir($dirname) or die "Failed to enter $dirname\n";
    exec("perlcritic", ".") or die "Failed to execute perlcritic.";