Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

puppet-lint: Enable whitespace checker #947

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ def location_for(place, fake_version = nil)
end

group :test do
gem 'voxpupuli-test', '>= 1.0.0', :require => false
gem 'voxpupuli-test', '>= 1.4.0', :require => false
gem 'puppet-lint-manifest_whitespace-check', :require => false
Comment on lines +14 to +15
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to make this a part of vp-test 1.5.0 if it works well (which it appears to do)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, me too. I just added it for testing / enable people to reproduce this.

gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
end
Expand Down
4 changes: 1 addition & 3 deletions examples/plugins/ceph.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
include collectd

class { 'collectd::plugin::ceph':
osds => [ 'osd.0', 'osd.1', 'osd.2'],
osds => ['osd.0', 'osd.1', 'osd.2'],
bastelfreak marked this conversation as resolved.
Show resolved Hide resolved
}


4 changes: 2 additions & 2 deletions examples/plugins/filecount.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
},
}

collectd::plugin::filecount::directory {'foodir':
collectd::plugin::filecount::directory { 'foodir':
path => '/path/to/dir',
}

collectd::plugin::filecount::directory {'aborted-uploads':
collectd::plugin::filecount::directory { 'aborted-uploads':
path => '/var/spool/foo/upload',
pattern => '.part.*',
mtime => '5m',
Expand Down
8 changes: 4 additions & 4 deletions examples/plugins/perl.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
order => 99,
config => {
'foo' => 'bar',
'key' => [ 'val1', 'val2' ],
'key' => ['val1', 'val2'],
},
}

collectd::plugin::perl::plugin { 'bar':
module => 'B',
enable_debugger => 'DProf',
include_dir => ['/tmp', '/tmp/lib' ],
include_dir => ['/tmp', '/tmp/lib'],
}

#collectd::plugin::perl {
Expand All @@ -44,10 +44,10 @@
'foo' => 'bar',
'more' => {
'complex' => 'structure',
'no' => [ 'a', 'b' ],
'no' => ['a', 'b'],
'yes' => {
'last' => 'level',
'and' => [ 'array' , 'thing' ],
'and' => ['array' , 'thing'],
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion examples/plugins/processes.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include collectd

class { 'collectd::plugin::processes':
processes => [ 'process1', 'process2' ],
processes => ['process1', 'process2'],
process_matches => [
{ name => 'process-all',
regex => 'process[0-9]' },
Expand Down
5 changes: 2 additions & 3 deletions examples/plugins/snmp.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include collectd

class {'collectd::plugin::snmp':
data => {
class { 'collectd::plugin::snmp':
data => {
amavis_incoming_messages => {
'type' => 'counter',
'table' => false,
Expand All @@ -19,4 +19,3 @@
},
},
}

2 changes: 0 additions & 2 deletions examples/purge_config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
purge_config => true,
}


collectd::plugin { 'battery': }
collectd::plugin { 'cpu': }
collectd::plugin { 'df': }
Expand All @@ -18,4 +17,3 @@
collectd::plugin { 'processes': }
collectd::plugin { 'swap': }
collectd::plugin { 'users': }

2 changes: 0 additions & 2 deletions manifests/config.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# private
class collectd::config inherits collectd {

assert_private()

$_conf_content = $collectd::purge_config ? {
Expand Down Expand Up @@ -42,5 +41,4 @@
}

File['collectd.d'] -> Concat <| tag == 'collectd' |>

}
1 change: 0 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
Integer[1] $write_threads = $collectd::params::write_threads,
Boolean $utils = $collectd::params::utils,
) inherits collectd::params {

$collectd_version_real = pick_default($facts['collectd_version'], $minimum_version)

contain collectd::repo
Expand Down
4 changes: 1 addition & 3 deletions manifests/install.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# @summary installs collectd
# @api private
class collectd::install {

assert_private()

if $collectd::manage_package {
Expand All @@ -14,9 +13,8 @@

if $collectd::utils and ( $facts['os']['family'] == 'Debian' or
( $facts['os']['family'] == 'RedHat' and versioncmp($facts['os']['release']['major'],'8') >= 0 )) {
package{'collectd-utils':
package { 'collectd-utils':
ensure => $collectd::package_ensure,
}
}

}
5 changes: 2 additions & 3 deletions manifests/params.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#
class collectd::params {

$autoloadplugin = false
$fqdnlookup = true
$collectd_hostname = $facts['networking']['hostname']
Expand All @@ -16,7 +15,7 @@
$read_threads = 5
$write_threads = 5
$timeout = 2
$typesdb = [ '/usr/share/collectd/types.db' ]
$typesdb = ['/usr/share/collectd/types.db']
$write_queue_limit_high = undef
$write_queue_limit_low = undef
$package_ensure = 'present'
Expand All @@ -38,7 +37,7 @@

case $facts['os']['family'] {
'Debian': {
$package_name = [ 'collectd', 'collectd-core' ]
$package_name = ['collectd', 'collectd-core']
$package_provider = 'apt'
$collectd_dir = '/etc/collectd'
$plugin_conf_dir = "${collectd_dir}/conf.d"
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
$plugin = $name,
Optional[Integer] $flushinterval = undef,
) {

include collectd

$conf_dir = $collectd::plugin_conf_dir
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/aggregation.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
Optional[Integer[1]] $interval = undef,
Hash $aggregators = {},
) {

include collectd

collectd::plugin { 'aggregation':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/aggregation/aggregator.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
Optional[Boolean] $calculatemaximum = undef,
Optional[Boolean] $calculatestddev = undef,
) {

include collectd
include collectd::plugin::aggregation

Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/amqp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
Boolean $graphiteseparateinstances = false,
Boolean $graphitealwaysappendds = false,
) {

include collectd

if $facts['os']['family'] == 'RedHat' {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/amqp1.pp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
Optional[Integer] $retry_delay = undef,
Optional[Integer] $interval = undef,
) {

include collectd

if $facts['os']['family'] == 'RedHat' {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/apache.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
Optional[Integer[1]] $interval = undef,
Optional[Array] $package_install_options = $collectd::package_install_options,
) {

include collectd

if $facts['os']['family'] == 'RedHat' {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/battery.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
Boolean $report_degraded = false,
Boolean $query_state_fs = false,
) {

include collectd

collectd::plugin { 'battery':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/bind.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
Array[Collectd::Bind::View] $views = [],
Optional[Integer[1]] $interval = undef,
) {

include collectd

if $facts['os']['family'] == 'RedHat' {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/ceph.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
Boolean $manage_package = $collectd::manage_package,
String $package_name = 'collectd-ceph'
) {

include collectd

if $manage_package {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/cgroups.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
Boolean $ignore_selected = false,
Optional[Integer[1]] $interval = undef,
) {

include collectd

collectd::plugin { 'cgroups':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/chain.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
Collectd::Filter::Target $defaulttarget = 'write',
Array $rules = []
) {

include collectd

$conf_dir = $collectd::plugin_conf_dir
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/connectivity.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
Boolean $manage_package = $collectd::manage_package,
Array[String[1]] $interfaces = [],
) {

include collectd

if $manage_package and $facts['os']['family'] == 'RedHat' {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/conntrack.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
class collectd::plugin::conntrack (
Enum['present', 'absent'] $ensure = 'present',
) {

include collectd

collectd::plugin { 'conntrack':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/contextswitch.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Enum['present', 'absent'] $ensure = 'present',
Optional[Integer[1]] $interval = undef,
) {

include collectd

collectd::plugin { 'contextswitch':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/cpu.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
Boolean $subtractgueststate = true,
Optional[Integer[1]] $interval = undef,
) {

include collectd

collectd::plugin { 'cpu':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/cpufreq.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
class collectd::plugin::cpufreq (
Enum['present', 'absent'] $ensure = 'present',
) {

include collectd

collectd::plugin { 'cpufreq':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/csv.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
$interval = undef,
$storerates = false
) {

include collectd

collectd::plugin { 'csv':
Expand Down
2 changes: 1 addition & 1 deletion manifests/plugin/cuda.pp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
}

if ($_manage_package) and ($provider_proxy) {
$install_options = [{'--proxy' => $provider_proxy}]
$install_options = [{ '--proxy' => $provider_proxy }]
} else {
$install_options = undef
}
Expand Down
3 changes: 1 addition & 2 deletions manifests/plugin/curl.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
$ensure = 'present',
$manage_package = undef,
$interval = undef,
$pages = { },
$pages = {},
) {

include collectd

$_manage_package = pick($manage_package, $collectd::manage_package)
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/curl/page.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
Optional[Array[Hash]] $matches = undef,
String $plugininstance = $name, # You can have multiple <Page> with the same name.
) {

include collectd
include collectd::plugin::curl

Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/curl_json.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
$order = '10',
$manage_package = undef,
) {

include collectd

$_manage_package = pick($manage_package, $collectd::manage_package)
Expand Down
5 changes: 2 additions & 3 deletions manifests/plugin/dbi.pp
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# https://collectd.org/wiki/index.php/Plugin:DBI
class collectd::plugin::dbi (
$ensure = 'present',
$databases = { },
$queries = { },
$databases = {},
$queries = {},
$packages = undef,
$interval = undef,
$manage_package = undef,
) {

include collectd

$_manage_package = pick($manage_package, $collectd::manage_package)
Expand Down
3 changes: 1 addition & 2 deletions manifests/plugin/dbi/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
Array $query = [],
Optional[Integer[1]] $db_query_interval = undef,
) {

include collectd
include collectd::plugin::dbi

concat::fragment{ "collectd_plugin_dbi_conf_db_${title}":
concat::fragment { "collectd_plugin_dbi_conf_db_${title}":
order => '50',
target => "${collectd::plugin_conf_dir}/dbi-config.conf",
content => template('collectd/plugin/dbi/database.conf.erb'),
Expand Down
2 changes: 1 addition & 1 deletion manifests/plugin/dbi/query.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
include collectd
include collectd::plugin::dbi

concat::fragment{ "collectd_plugin_dbi_conf_query_${title}":
concat::fragment { "collectd_plugin_dbi_conf_query_${title}":
order => '30',
target => "${collectd::plugin_conf_dir}/dbi-config.conf",
content => template('collectd/plugin/dbi/query.conf.erb'),
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/dcpmm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
Boolean $enable_dispatch_all = false,

) {

include collectd

if $collect_health and $collect_perf_metrics {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/df.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
Boolean $valuesabsolute = true,
Boolean $valuespercentage = false,
) {

include collectd

collectd::plugin { 'df':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/disk.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
$udevnameattr = undef,
Optional[Array[String]] $package_install_options = undef
) {

include collectd

if $facts['os']['family'] == 'RedHat' {
Expand Down
Loading