Skip to content

Commit

Permalink
Merge pull request #322 from sympa-community/add-perltidy-test by ldidry
Browse files Browse the repository at this point in the history
Add Perltidy test in xt (related to #319)
  • Loading branch information
ikedas authored May 31, 2018
2 parents ad27668 + fcb6bed commit dbde457
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ install:
- cpanm --notest --quiet CGI::Fast FCGI
- cpanm --notest --quiet Unicode::CaseFold
- cpanm --notest --quiet SOAP::Lite Net::LDAP
- cpanm --installdeps . --with-develop

before_script:
- coverage-setup
Expand All @@ -40,6 +41,7 @@ script:
- autoreconf -i
- ./configure
- cd src; make; cd ..
- make check-local TEST_FILES='xt/perltidy.t' || true
- make check-local TEST_FILES='t/compile_executables.t t/compile_modules.t t/Language.t t/parse_templates.t t/pod-syntax.t'

after_success:
Expand Down
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ noinst_SCRIPTS = \
xt/fixme.t \
xt/fixme-todo.t \
xt/pod-coverage.t \
xt/pod-spelling.t
xt/pod-spelling.t \
xt/perltidy.t

EXTRA_DIST = \
AUTHORS.md \
Expand Down
5 changes: 5 additions & 0 deletions cpanfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
on 'develop' => sub {
requires 'Test::Fixme';
requires 'Test::PerlTidy';
requires 'Perl::Tidy', '== 20180220';
};
2 changes: 1 addition & 1 deletion doc/dot.perltidyrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-cti=0 # No extra indentation for closing brackets
-i=4 # Indent level is 4 cols
-ci=4 # Continuation indent is 4 cols
-l=78 # Max line witdh is 78 cols
-l=78 # Max line width is 78 cols
-nolc # Don't outdent long comments (* -olc)
-nolq # Don't outdent long quoted strings
-nsbl # No opening sub brace on new line (* -sbl)
Expand Down
10 changes: 10 additions & 0 deletions xt/perltidy.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use strict;
use warnings;

use Test::PerlTidy;
use FindBin qw($Bin);

run_tests(
path => "$Bin/../src/",
perltidyrc => "$Bin/../doc/dot.perltidyrc"
);

0 comments on commit dbde457

Please sign in to comment.