Module: Onceover::CodeQuality::Lint

Defined in:
lib/onceover/codequality/lint.rb

Constant Summary collapse

LINT_PATHS =

Apply linting to the manifests directory and each module under site

[
  "manifests",
].concat(Dir.glob('site/*').select {|f| File.directory? f})
LINT_OPTIONS =
[].freeze

Class Method Summary collapse

Class Method Details

.puppetObject



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/onceover/codequality/lint.rb', line 24

def self.puppet
  status = true
  LINT_PATHS.each { |p|
    if Dir.exists?(p)
      Dir.chdir(p) do
        logger.info("checking #{p}")
        if ! system("puppet-lint #{LINT_OPTIONS.join ' '} . ")
          status = false
        end
      end
    end
  }

  status
end