Class | PuppetLint::Data |
In: |
lib/puppet-lint/data.rb
|
Parent: | Object |
Public: A singleton class storing all the information about the manifest being analysed.
filename | [R] | Internal: Get/Set the full expanded path to the manifest file being checked. |
fullpath | [R] | Internal: Get/Set the full expanded path to the manifest file being checked. |
manifest_lines | [RW] | Internal: Get/Set the raw manifest data, split by \n. |
path | [R] | Internal: Get/Set the full expanded path to the manifest file being checked. |
Internal: Calculate the positions of all class definitions within the `tokens` Array.
Returns an Array of Hashes, each containing:
:start - An Integer position in the `tokens` Array pointing to the first Token of a class definition. :end - An Integer position in the `tokens` Array pointing to the last Token of a class definition. :tokens - An Array consisting of all the Token objects that make up the class definition.
Internal: Calculate the positions of all defined type definitions within the `tokens` Array.
Returns an Array of Hashes, each containing:
:start - An Integer position in the `tokens` Array pointing to the first Token of a defined type definition. :end - An Integer position in the `tokens` Array pointing to the last Token of a defined type definition. :tokens - An Array consisting of all the Token objects that make up the defined type.
Internal: Calculate the positions of all the specified defintion types within the `tokens` Array.
Returns an Array of Hashes, each containing:
:start - An Integer position in the `tokens` Array pointing to the first Token of a definition. :end - An Integer position in the `tokens` Array pointing to the last Token of a definition. :tokens - An Array consisting of all the Token objects that make up the definition.
Internal: Find all the Token objects representing the parameter names in a resource definition.
resource_tokens - An Array of Token objects that comprise the resource
definition.
Returns an Array of Token objects.
Internal: Find the Token representing the type of a resource definition.
index - The Integer pointing to the start of the resource in the `tokens`
array.
Returns a Token object.
Internal: Retrieves a list of token types that are considered to be formatting tokens (whitespace, newlines, etc).
Returns an Array of Symbols.
Internal: Retrieves a Hash of Sets. Each key is a check name Symbol and the Set of Integers returned lists all the lines that the check results should be ignored on.
Returns a Hash of Sets of Integers.
Internal: Finds all the tokens that make up the defined type or class definition parameters.
these_tokens - An Array of PuppetLint::Lexer::Token objects that make up
the defined type or class definition.
Returns an Array of PuppetLint::Lexer::Token objects or nil if it takes no parameters.
Internal: Parses all COMMENT, MLCOMMENT and SLASH_COMMENT tokens looking for control comments (comments that enable or disable checks). Builds the contents of the `ignore_overrides` hash.
Returns nothing.
Internal: Store the path to the manifest file and populate fullpath and filename.
val - The path to the file as a String.
Returns nothing.
Internal: Calculate the positions of all resource declarations within the tokenised manifest. These positions only point to the content of the resource declarations, they do not include resource types or titles.
Returns an Array of Hashes, each containing:
:start - An Integer position in the `tokens` Array pointing to the first Token of a resource declaration. :end - An Integer position in the `tokens` Array pointing to the last Token of a resource declaration.
Internal: Retrieve a list of tokens that represent resource titles
Returns an Array of PuppetLint::Lexer::Token objects.
Internal: Store the tokenised manifest.
tokens - The Array of PuppetLint::Lexer::Token objects to store.
Returns nothing.