[lintian] 01/03: Run perltidy
This is an automated email from the git hooks/post-receive script.
broucaries-guest pushed a commit to branch master
in repository lintian.
commit 654510698a55312836718bb1e59dafdb445e2fff
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date: Thu Mar 13 21:10:51 2014 +0100
Run perltidy
Signed-off-by: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
---
checks/cruft.pm | 19 +++++++++++++------
lib/Lintian/Data.pm | 2 +-
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/checks/cruft.pm b/checks/cruft.pm
index b93a131..2ece4b1 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -106,8 +106,12 @@ my $WARN_FILE_TYPE = Lintian::Data->new(
# get javascript name
sub _minified_javascript_name_regexp {
- my $jsv = $WARN_FILE_TYPE->value('source-contains-prebuilt-javascript-object');
- return defined($jsv) ? $jsv->{'regname'} : qr/(?i)[\.-](?:min|pack(?:ed)?)\.js$/;
+ my $jsv
+ = $WARN_FILE_TYPE->value('source-contains-prebuilt-javascript-object');
+ return
+ defined($jsv)
+ ? $jsv->{'regname'}
+ : qr/(?i)[\.-](?:min|pack(?:ed)?)\.js$/;
}
sub _get_license_check_file {
@@ -653,7 +657,8 @@ sub full_text_check {
}
# some js file comments are really really long
- my $sfd = Lintian::SlidingWindow->new('<:raw', $path, \&lc_block, $isjsfile ? 8092 : 4096);
+ my $sfd = Lintian::SlidingWindow->new('<:raw', $path, \&lc_block,
+ $isjsfile ? 8092 : 4096);
my %licenseproblemhash = ();
my $cleanjsblock = '';
@@ -688,13 +693,13 @@ sub full_text_check {
$block, $blocknumber,\$cleanedblock, \%matchedkeyword,
\%licenseproblemhash);
-
# check javascript problem
if($isjsfile) {
if($blocknumber == 0) {
my $strip = $block;
# from perl faq strip comments
- $strip =~ s#/\*[^*]*\*+([^/*][^*]*\*+)*/|//([^\\]|[^\n][\n]?)*?\n|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#defined $3 ? $3 : ""#gse;
+ $strip
+ =~ s#/\*[^*]*\*+([^/*][^*]*\*+)*/|//([^\\]|[^\n][\n]?)*?\n|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#defined $3 ? $3 : ""#gse;
# strip empty line
$strip =~ s/^\s*\n//mg;
# remove last \n
@@ -704,7 +709,9 @@ sub full_text_check {
if($total > 0) {
my $linelength = $total/($strip =~ tr/\n// + 1);
if($linelength > 255) {
- tag 'source-contains-prebuilt-javascript-object', $name, 'means line length is about', $linelength, 'characters';
+ tag 'source-contains-prebuilt-javascript-object',
+ $name, 'means line length is about', $linelength,
+ 'characters';
}
}
}
diff --git a/lib/Lintian/Data.pm b/lib/Lintian/Data.pm
index ac8ccd1..beb47e2 100644
--- a/lib/Lintian/Data.pm
+++ b/lib/Lintian/Data.pm
@@ -219,7 +219,7 @@ sub known {
sub all {
my ($self) = @_;
my $data = $self->{data} || $self->_force_promise;
- return keys(%{ $data });
+ return keys(%{$data});
}
# Query a data object for the value attached to a particular keyword.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: