diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-05-11 12:39:23 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-05-26 14:21:49 +0000 |
commit | 075c3e4470aa56c5759ce261970880c2845086fa (patch) | |
tree | 7d492bf3e1654d1e6cbd6049b4cee0b21d0365c2 /scripts/t | |
parent | 6e5c35eda6b24d2eb73f293b64ce14d866ea233d (diff) |
Fix path normalization on Windows
In order to find out which files to run our perl syntax check on, we use git
ls-files to get a list of all files and then compare it with Perl::Critic's
all_per_files. Unfortunately all_perl_files returns paths with backwards
slashes on Windows, while git ls-files returns paths with forward slashes. The
only overlap between those two lists were paths that contained no slashes at
all, which means that only setup.pl, test.pl, etc. were actually syntax
checked.
The root cause is that
apply { canonpath } qx(git ls-files)
does not work as expected. I don't know why, but it does work when assigning $_
explicitly.
Change-Id: I608445f276761452158a9096dce04539ff273b24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'scripts/t')
-rw-r--r-- | scripts/t/QtQA/PerlChecks.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/t/QtQA/PerlChecks.pm b/scripts/t/QtQA/PerlChecks.pm index ab9d36aa..4f22340f 100644 --- a/scripts/t/QtQA/PerlChecks.pm +++ b/scripts/t/QtQA/PerlChecks.pm @@ -67,7 +67,7 @@ sub all_files_in_git my @out; if (-d $QT_MODULE_TO_TEST . '/.git') { @out = - apply { canonpath } # make paths canonical ... + apply { $_ = canonpath($_) } # make paths canonical ... apply { chomp } # strip all newlines ... qx( git ls-files ); } else { |