Public: The public interface to puppet-lint.
VERSION | = | '1.1.0' |
code | [RW] | Public: Gets/Sets the String manifest code to be checked. |
manifest | [R] | Public: Gets the String manifest with the errors fixed. |
path | [RW] | Public: Gets/Sets the String path to the manifest to be checked. |
problems | [R] |
Public: Returns an Array of Hashes describing the problems found in the
manifest.
Each Hash will contain *at least*: :check - The Symbol name of the check that generated the problem. :kind - The Symbol kind of the problem (:error, :warning, or :fixed). :line - The Integer line number of the location of the problem in the manifest. :column - The Integer column number of the location of the problem in the manifest. :message - The String message describing the problem that was found. |
statistics | [R] |
Public: Returns a Hash of linter statistics
:error - An Integer count of errors found in the manifest. :warning - An Integer count of warnings found in the manifest. :fixed - An Integer count of problems found in the manifest that were automatically fixed. |
Public: Access PuppetLint‘s configuration from outside the class.
Returns a PuppetLint::Configuration object.
Public: Define a new check.
name - A unique name for the check as a Symbol. block - The check logic. This must contain a `check` method and optionally
a `fix` method.
Returns nothing.
Examples
PuppetLint.new_check(:foo) do def check end end
Public: Access PuppetLint‘s configuration from inside the class.
Returns a PuppetLint::Configuration object.
Public: Determine if PuppetLint found any errors in the manifest.
Returns true if errors were found, otherwise returns false.
Public: Set the path of the manifest file to be tested and read the contents of the file.
Returns nothing.
Internal: Format a problem message and print it to STDOUT.
message - A Hash containing all the information about a problem.
Returns nothing.
Internal: Print out the line of the manifest on which the problem was found as well as a marker pointing to the location on the line.
message - A Hash containing all the information about a problem.
Returns nothing.
Internal: Print the reported problems with a manifest to stdout.
problems - An Array of problem Hashes as returned by
PuppetLint::Checks#run.
Returns nothing.
Public: Run the loaded manifest code through the lint checks and print the results of the checks to stdout.
Returns nothing. Raises PuppetLint::NoCodeError if no manifest code has been loaded.
Public: Determine if PuppetLint found any warnings in the manifest.
Returns true if warnings were found, otherwise returns false.