Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Perltidy test in xt (related to #319) #322

Merged
merged 3 commits into from
May 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
);