GitHub Need To Know¶
CI tests on pull requests¶
- GitHub CI is using perltidy to check your changes to Perl modules.
- GitHub CI is doing some more tests on your Perl modules.
Perl-Tidy¶
- The version used is 20210717, so install it from software.opensuse.org if you have another version.
Perl-Tidy configruation file¶
You need to place a file called .perltidyrc
in your home directory. The file should contain the following:
# 120 characters would be desired but it is not feasible right now
#-l=120 # 120 characters per line
-l=160
-fbl # don't change blank lines
-fnl # don't remove new lines
-nsfs # no spaces before semicolons
-baao # space after operators
-bbao # space before operators
-pt=2 # no spaces around ()
-bt=2 # no spaces around []
-sbt=2 # no spaces around {}
-sct # stack closing tokens )}
These are the same parameters as used by the CI workflow.
Beware of the evil tabs¶
One trouble I had with perltidy after inserting a line of code and indented comment lines was, that it complained
about the whitespace used for indentation. My Emacs used TAB and perltidy wants pure spaces.
To avoid this you can add this setting from the EmacsWiki to your local Emacs config file:
(setq-default indent-tabs-mode nil)
More Perl tests¶
Trap when using record_soft_failure¶
GitHub CI uses this test test in the Makefile to check if every soft_failure has a reference. References are tested with his regex:
'([$$0-9a-z]+#[$$0-9a-zA-Z]+|fate.suse.com/[0-9]|\$$[a-z]+)'
There is an unwritten rule that when recording a soft_failure you need to reference a bug. So you should state something like 'bsc#12345' as a reference.
When no reference is set then the GitHub CI workflow will fail.
Updated by rainerkoenig over 3 years ago · 2 revisions