Skip to content

Commit ecc9940

Browse files
committed
Improve the formatting of nested ternaries in Perl
Add --warn-nested-ternaries to perltidy code checks.
1 parent 2d09eec commit ecc9940

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ code-check:
272272
fi ; \
273273
if command -v "perltidy" >/dev/null 2>&1; then \
274274
echo "Running perltidy to check Perl code..." ; \
275-
perltidy -se -wma -wmauc=0 -wmr -wuk \
275+
perltidy -se -wma -wmauc=0 -wmr -wnt -wuk \
276276
-wvt='c p r u' -wvxl='*_unused' $$F ; \
277277
else \
278278
echo "Skipping Perl code checking (perltidy not found)" ; \

frontends/cnfsstat.in

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,12 @@ sub read_storageconf {
377377

378378
$key{'SIZE'} .= ",0" unless $key{'SIZE'} =~ /,/;
379379
$key{'SIZE'} =~ s/,/:/;
380-
$key{'FILTERED'}
381-
= defined $key{'FILTERED'}
382-
? $key{'FILTERED'} =~ /^(true|yes|on)$/i
380+
$key{'FILTERED'} = defined $key{'FILTERED'}
381+
? (
382+
$key{'FILTERED'} =~ /^(true|yes|on)$/i
383383
? 1
384384
: 0
385+
)
385386
: 0;
386387

387388
if (!defined $stor{ $key{'OPTIONS'} }) {

0 commit comments

Comments
 (0)