mirror of
https://github.com/ovh/the-bastion.git
synced 2025-01-19 13:53:23 +08:00
chore: perlcritic/perltidy passes
This commit is contained in:
parent
ea6867a614
commit
163a3fd726
2 changed files with 21 additions and 19 deletions
|
@ -31,6 +31,7 @@ sub dumpdoc {
|
|||
die "something is missing: " . ($h{param} ? "" : "param ") . ($h{default} ? "" : "default ") . ($h{desc} ? "" : "desc ") . ($h{type} ? "" : "type") . "\n";
|
||||
}
|
||||
%h = ();
|
||||
return;
|
||||
}
|
||||
|
||||
my $state = '';
|
||||
|
@ -78,7 +79,7 @@ while (<>) {
|
|||
}
|
||||
dumpdoc();
|
||||
|
||||
print <<EOF
|
||||
print <<'EOF'
|
||||
======================
|
||||
bastion.conf reference
|
||||
======================
|
||||
|
@ -105,7 +106,7 @@ foreach my $section (@orderedsections) {
|
|||
print "- :ref:`bastion_conf_$_`\n";
|
||||
}
|
||||
}
|
||||
print <<EOF
|
||||
print <<'EOF'
|
||||
|
||||
Option Reference
|
||||
================
|
||||
|
@ -113,5 +114,4 @@ Option Reference
|
|||
EOF
|
||||
;
|
||||
|
||||
|
||||
print join("", @out);
|
||||
|
|
|
@ -250,7 +250,7 @@ sub load_configuration {
|
|||
}
|
||||
|
||||
# if set to "no", "false" or "disabled", be nice and cast to false (because a string is true, otherwise)
|
||||
elsif (grep { lc($C->{$o}) eq lc($_) } qw{ no false disabled }) {
|
||||
elsif (grep { lc($C->{$o}) eq lc } qw{ no false disabled }) {
|
||||
push @errors, "Configuration error: found value '" . $C->{$o} . "' for option '$o', but it's supposed to be a boolean, assuming false";
|
||||
$C->{$o} = 0;
|
||||
}
|
||||
|
@ -294,7 +294,9 @@ sub load_configuration {
|
|||
|
||||
# 5/6) Arrays whose values should match a specific regex.
|
||||
foreach my $o (
|
||||
## no critic(RegularExpressions::ProhibitFixedStringMatches)
|
||||
{name => 'allowedIngressSshAlgorithms', default => [qw{ rsa ecdsa ed25519 }], validre => qr/^(rsa|ecdsa|ed25519)$/},
|
||||
## no critic(RegularExpressions::ProhibitFixedStringMatches)
|
||||
{name => 'allowedEgressSshAlgorithms', default => [qw{ rsa ecdsa ed25519 }], validre => qr/^(rsa|ecdsa|ed25519)$/},
|
||||
{name => 'accountCreateSupplementaryGroups', default => [], validre => qr/^(.*)$/},
|
||||
{name => 'accountCreateDefaultPersonalAccesses', default => [], validre => qr/^(.*)$/},
|
||||
|
|
Loading…
Reference in a new issue