Skip to content

Commit

Permalink
Resolve puppet-lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jcpunk committed Sep 14, 2020
1 parent e2442f6 commit cc19a2a
Show file tree
Hide file tree
Showing 19 changed files with 25 additions and 18 deletions.
2 changes: 1 addition & 1 deletion examples/has_interface_with.pp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include ::stdlib
include stdlib
info('has_interface_with(\'lo\'):', has_interface_with('lo'))
info('has_interface_with(\'loX\'):', has_interface_with('loX'))
info('has_interface_with(\'ipaddress\', \'127.0.0.1\'):', has_interface_with('ipaddress', '127.0.0.1'))
Expand Down
2 changes: 1 addition & 1 deletion examples/has_ip_address.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include ::stdlib
include stdlib
info('has_ip_address(\'192.168.1.256\'):', has_ip_address('192.168.1.256'))
info('has_ip_address(\'127.0.0.1\'):', has_ip_address('127.0.0.1'))
2 changes: 1 addition & 1 deletion examples/has_ip_network.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include ::stdlib
include stdlib
info('has_ip_network(\'127.0.0.0\'):', has_ip_network('127.0.0.0'))
info('has_ip_network(\'128.0.0.0\'):', has_ip_network('128.0.0.0'))
2 changes: 1 addition & 1 deletion examples/init.pp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ::stdlib
include stdlib
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
# of stdlib::stages.
#
class stdlib {
include ::stdlib::stages
include stdlib::stages
}
2 changes: 0 additions & 2 deletions manifests/stages.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@
# }
#
class stdlib::stages {

stage { 'setup': before => Stage['main'] }
stage { 'runtime': require => Stage['main'] }
-> stage { 'setup_infra': }
-> stage { 'deploy_infra': }
-> stage { 'setup_app': }
-> stage { 'deploy_app': }
-> stage { 'deploy': }

}
4 changes: 2 additions & 2 deletions spec/fixtures/test/manifests/base32.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Class to test the Stdlib::Base32 type alias
class test::base32 (
Stdlib::Base32 $value,
) {
Stdlib::Base32 $value,
) {
notice('Success')
}
4 changes: 2 additions & 2 deletions spec/fixtures/test/manifests/base64.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Class to test the Stdlib::Base64 type alias
class test::base64 (
Stdlib::Base64 $value,
) {
Stdlib::Base64 $value,
) {
notice('Success')
}
2 changes: 1 addition & 1 deletion spec/fixtures/test/manifests/deftype.pp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Class to test deftype
define test::deftype( $param = 'foo' ) {
define test::deftype ( $param = 'foo' ) {
notify { "deftype: ${title}": }
}
2 changes: 1 addition & 1 deletion spec/fixtures/test/manifests/ensure_resources.pp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A helper class to test the ensure_resources function
class test::ensure_resources( $resource_type, $title_hash, $attributes_hash ) {
class test::ensure_resources ( $resource_type, $title_hash, $attributes_hash ) {
ensure_resources($resource_type, $title_hash, $attributes_hash)
}
2 changes: 2 additions & 0 deletions types/filemode.pp
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# See `man chmod.1` for the regular expression for symbolic mode
# lint:ignore:140chars
type Stdlib::Filemode = Pattern[/\A(([0-7]{1,4})|(([ugoa]*([-+=]([rwxXst]*|[ugo]))+|[-+=][0-7]+)(,([ugoa]*([-+=]([rwxXst]*|[ugo]))+|[-+=][0-7]+))*))\z/]
# lint:endignore
2 changes: 2 additions & 0 deletions types/ip/address/v4/cidr.pp
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# lint:ignore:140chars
type Stdlib::IP::Address::V4::CIDR = Pattern[/\A([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}\/([0-9]|[12][0-9]|3[0-2])\z/]
# lint:endignore
2 changes: 2 additions & 0 deletions types/ip/address/v4/nosubnet.pp
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# lint:ignore:140chars
type Stdlib::IP::Address::V4::Nosubnet = Pattern[/\A([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}\z/]
# lint:endignore
2 changes: 2 additions & 0 deletions types/ip/address/v6/alternative.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# lint:ignore:140chars
type Stdlib::IP::Address::V6::Alternative = Pattern[
/\A([[:xdigit:]]{1,4}:){6}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}(\/(1([01][0-9]|2[0-8])|[1-9][0-9]|[0-9]))?\z/,
/\A([[:xdigit:]]{1,4}:){5}:([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}(\/(1([01][0-9]|2[0-8])|[1-9][0-9]|[0-9]))?\z/,
Expand All @@ -7,3 +8,4 @@
/\A([[:xdigit:]]{1,4}:){1}(:[[:xdigit:]]{1,4}){0,4}:([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}(\/(1([01][0-9]|2[0-8])|[1-9][0-9]|[0-9]))?\z/,
/\A:(:[[:xdigit:]]{1,4}){0,5}:([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}(\/(1([01][0-9]|2[0-8])|[1-9][0-9]|[0-9]))?\z/,
]
# lint:endignore
4 changes: 2 additions & 2 deletions types/ip/address/v6/cidr.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

# lint:ignore:140chars
type Stdlib::IP::Address::V6::CIDR = Pattern[/\A((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*\/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])?\z/]

# lint:endignore
2 changes: 2 additions & 0 deletions types/ip/address/v6/nosubnet/alternative.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# lint:ignore:140chars
type Stdlib::IP::Address::V6::Nosubnet::Alternative = Pattern[
/\A([[:xdigit:]]{1,4}:){6}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}\z/,
/\A([[:xdigit:]]{1,4}:){5}:([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}\z/,
Expand All @@ -7,3 +8,4 @@
/\A([[:xdigit:]]{1,4}:){1}(:[[:xdigit:]]{1,4}){0,4}:([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}\z/,
/\A:(:[[:xdigit:]]{1,4}){0,5}:([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}\z/,
]
# lint:endignore
2 changes: 1 addition & 1 deletion types/mac.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# A type for a MAC address
type Stdlib::MAC = Pattern[
/\A([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})\z/,
/\A([0-9A-Fa-f]{2}[:-]){19}([0-9A-Fa-f]{2})\z/
/\A([0-9A-Fa-f]{2}[:-]){19}([0-9A-Fa-f]{2})\z/,
]
1 change: 0 additions & 1 deletion types/objectstore/gsuri.pp
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
type Stdlib::ObjectStore::GSUri = Pattern[/\Ags:\/\/.*\z/]

2 changes: 1 addition & 1 deletion types/syslogfacility.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
'local4',
'local5',
'local6',
'local7'
'local7',
]

0 comments on commit cc19a2a

Please sign in to comment.