From b0cdf71502023059e8de4aff5d55d75eb4e11f6d Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sun, 13 Oct 2024 00:24:06 +0100 Subject: [PATCH] Update linter, fix its errors (#32) * update linter version * CI: update checkout version as well * CI: depth * Fix linter issues of linter itself * lint readme * add .perlcriticrc * maybe fix lint in readme * try again * mention this in changes --- .github/workflows/test.yml | 9 ++++++--- .perlcriticrc | 1 + Changes | 1 + README.md | 20 ++++++++++---------- 4 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 .perlcriticrc diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5f59b22..d4bc7a8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,12 +2,13 @@ name: Test on: - push - pull_request +permissions: {} jobs: test: name: Test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # Some deps can't be installed purely from CPAN. And some other are just slow to install from there. - run: sudo apt install libimage-magick-perl libgtk3-perl libglib-object-introspection-perl libtest-differences-perl libcarp-always-perl libdist-zilla-perl cpanminus xvfb # Install everything which is still not installed, but don't mess current directory with root-owned files @@ -26,8 +27,10 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: github/super-linter@v3 + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: super-linter/super-linter@v7.1.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} FILTER_REGEX_EXCLUDE: Makefile.PL diff --git a/.perlcriticrc b/.perlcriticrc new file mode 100644 index 0000000..56b5e89 --- /dev/null +++ b/.perlcriticrc @@ -0,0 +1 @@ +exclude = ProhibitBitwiseOperators diff --git a/Changes b/Changes index 0a51b6a..924baf5 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,6 @@ {{$NEXT}} - Removed perl feature switch, for compatibility with newer perl + - Made linter on CI happy 11 2024-10-01 17:08:47 IST - Replaced deprecated given/when with if/elsif/else diff --git a/README.md b/README.md index 50f8cf6..ec2dc16 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Gtk3 imager viewer widget modelled after the GtkImageView C widget by Björn Lindqvist To discuss Gtk3::ImageView or gtk3-perl, ask questions and flame/praise the -authors, join gtk-perl-list@gnome.org at lists.gnome.org. +authors, join [mailing list](mailto:gtk-perl-list@gnome.org) at lists.gnome.org. ## INSTALLATION @@ -28,24 +28,24 @@ Or you can use `dzil build` to get the directory of the release in current dir, `dzil help`, [dzil.org](http://dzil.org) and [Dist::Zilla::Tutorial](https://metacpan.org/pod/Dist::Zilla::Tutorial#BUILDING-YOUR-DIST) have more details. This will install the module to the subdirectory lib/perl5 under the given -prefix. If this is not already in perl's include path, you'll need to tell +prefix. If this is not already in perl's include path, you'll need to tell perl how to get to this library directory so you can use it; there are three ways: -* in your environment (the easiest): +- in your environment (the easiest): ```shell PERL5LIB=/some/other/place/lib/perl5/site_perl export PERL5LIB ``` -* on the perl command line: +- on the perl command line: ```shell perl -I /some/other/place/lib/perl5/site_perl yourscript ``` -* in the code of your perl script: +- in the code of your perl script: ```shell use lib '/some/other/place/lib/perl5/site_perl'; @@ -55,11 +55,11 @@ use lib '/some/other/place/lib/perl5/site_perl'; This module requires these other modules and libraries: -* perl >= 5.8.0 -* Glib >= 1.163 (Perl module) -* GTK+ 3.x (C library) -* Gtk3 (Perl module) -* Readonly (Perl module) +- perl >= 5.8.0 +- Glib >= 1.163 (Perl module) +- GTK+ 3.x (C library) +- Gtk3 (Perl module) +- Readonly (Perl module) ## BUG REPORTS