action #112544
closed[Kernel] Leave an empty line between pod and code in os-autoinst-distri-opensuse libraries
100%
Description
While reviewing https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/15049 a suggestion was made to always leave an empty line between pod and code as some renderers could see the lack of the empty line as malformed.
However most of the libraries in the os-autoinst-distri-opensuse repository do not follow this recommendation, for example:
- https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/lib/susedistribution.pm
- https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/lib/opensusebasetest.pm
- https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/lib/utils.pm
This ticket intends to track the actions to apply the suggestion to all libraries under https://github.com/os-autoinst/os-autoinst-distri-opensuse/tree/master/lib
Updated by okurz almost 2 years ago
- Category set to Enhancement to existing tests
Updated by ybonatakis almost 2 years ago
- Subject changed from Leave an empty line between pod and code in os-autoinst-distri-opensuse libraries to [Kernel] Leave an empty line between pod and code in os-autoinst-distri-opensuse libraries
- Assignee set to ybonatakis
Updated by ybonatakis almost 2 years ago
- Status changed from New to In Progress
i created a small script which search for all the files under lib and then adds a new line for all the matching patterns /=cut\n/sub/
ls -Rf path/os-autoinst-distri-opensuse/lib/**/**/*.pm | while read -r file ; do echo $file; sed -rni '1h;1!H;${g;s:=cut(\nsub):=cut\n\1:g;p;}' $file; done
verify that works with (should return zero unless you have other tmp files under lib)
grep -Pzo "=cut\nsub" -rn lib
https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/15139
Updated by ybonatakis almost 2 years ago
question: do we need to provide also CI chech?
Updated by okurz almost 2 years ago
Yes, otherwise all your changes will be in vain very soon :)
Updated by ybonatakis almost 2 years ago
- Status changed from In Progress to Feedback
Check script is added for CI and PR is ready for review
Updated by ybonatakis almost 2 years ago
merged. The CI also caught a few file i missed in the first place so i feel confident that works.
Updated by acarvajal almost 2 years ago
- Status changed from Feedback to Resolved
- % Done changed from 0 to 100