GitHub Need To Know » History » Version 1
rainerkoenig, 2021-09-13 14:53
New page
1 | 1 | rainerkoenig | # GitHub Need To Know |
---|---|---|---|
2 | |||
3 | ## CI tests on pull requests |
||
4 | |||
5 | * GitHub CI is using [perltidy](https://metacpan.org/dist/Perl-Tidy/view/bin/perltidy) to check your changes to Perl modules. |
||
6 | * The version used is 20210717, so install it from [software.opensuse.org](https://software.opensuse.org/package/perl-Perl-Tidy?search_term=perl-tidy) if you have another version. |
||
7 | |||
8 | ### Perl-Tidy configruation file |
||
9 | |||
10 | You need to place a file called `.perltidyrc` in your home directory. The file should contain the following: |
||
11 | |||
12 | ~~~ text |
||
13 | # 120 characters would be desired but it is not feasible right now |
||
14 | #-l=120 # 120 characters per line |
||
15 | -l=160 |
||
16 | -fbl # don't change blank lines |
||
17 | -fnl # don't remove new lines |
||
18 | -nsfs # no spaces before semicolons |
||
19 | -baao # space after operators |
||
20 | -bbao # space before operators |
||
21 | -pt=2 # no spaces around () |
||
22 | -bt=2 # no spaces around [] |
||
23 | -sbt=2 # no spaces around {} |
||
24 | -sct # stack closing tokens )} |
||
25 | |||
26 | ~~~ |
||
27 | |||
28 | These are the same parameters as used by the CI workflow. |
||
29 | |||
30 | ### Beware of the evil tabs |
||
31 | |||
32 | One trouble I had with perltidy after inserting a line of code and indented comment lines was, that it complained |
||
33 | about the whitespace used for indentation. My Emacs used TAB and perltidy wants pure spaces. |
||
34 | |||
35 | To avoid this you can add this setting from the [EmacsWiki](https://www.emacswiki.org/emacs/NoTabs) to your local Emacs config file: |
||
36 | |||
37 | ~~~ lua |
||
38 | (setq-default indent-tabs-mode nil) |
||
39 | ~~~ |