Project

General

Profile

Actions

action #138521

open

coordination #96596: [qe-core][CI] CI/CD and Coding style improvements

[qe-core] Add line number to perlpod so its easier to parse the output

Added by szarate about 1 year ago. Updated 29 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2023-10-25
Due date:
% Done:

0%

Estimated time:
Difficulty:

Description

A new Add target to check documentation errors #18071 from @mpagot added a new neat script that does a nice check for perlpod, however the following is required to get the line number, and maybe this could be ported to Pod::Perldoc or maybe it could be contributed as a

            awk '/Around line/ {          # search for lines containing "Around line"
                   match($0, /[0-9]+/);   # extract the line number of the error
                   getline nextline;      # read the error description from the next line
                   gsub(/^[ \t]+/, "", nextline);  # remove leading whitespace from the error message
                   print "::error file='"${libfile}"',line="substr($0, RSTART, RLENGTH)"::"nextline;  # print in a github action compliant way
                }' "$tmperrorfile"
Actions #1

Updated by szarate about 1 year ago

  • Subject changed from [qe-core] Add line number to perlpod to [qe-core] Add line number to perlpod so its easier to parse the output
Actions #2

Updated by szarate about 1 year ago

So, POD checker has some filters:

https://metacpan.org/pod/Pod::Checker --

podchecker -warnings -msg "::" -severity -msg "file='" -filename -msg "," -line ../os-autoinst-distri-opensuse/lib/qesapdeployment.pm ../os-autoinst-distri-opensuse/lib/version
_utils.pm

Actions #3

Updated by mpagot about 1 year ago

perlcheck has sensible exit code:

  • 0 no errors but could have Warnings
  • 1 some errors
  • 2 no POD commands (no documentation)

Reported warnings are pretty interesting about final formatting of the html documentation. For example look at formatting of https://os-autoinst.github.io/os-autoinst-distri-opensuse/sles4sap_publiccloud.html and I suspect that perlcheck warnings in that file are about that

*** WARNING: =head2 without preceding higher level at line 62 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 91 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 118 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 188 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 217 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 243 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 264 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 308 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 319 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 342 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 375 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 399 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 416 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 443 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 483 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 508 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 541 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 582 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 604 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 617 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 653 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 664 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 688 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 770 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 793 in file lib/sles4sap_publiccloud.pm
*** WARNING: =head2 without preceding higher level at line 811 in file lib/sles4sap_publiccloud.pm
Actions #4

Updated by slo-gin 29 days ago

This ticket was set to Normal priority but was not updated within the SLO period. Please consider picking up this ticket or just set the ticket to the next lower priority.

Actions

Also available in: Atom PDF