pax_global_header00006660000000000000000000000064151031467110014511gustar00rootroot0000000000000052 comment=f1a29d8264451c21bbb60abdbd736d8df2a01ecc puppetlabs-puppet-lint-f1a29d8/000077500000000000000000000000001510314671100165675ustar00rootroot00000000000000puppetlabs-puppet-lint-f1a29d8/.dockerignore000066400000000000000000000003121510314671100212370ustar00rootroot00000000000000/*.pp /*.gem /.bundle /.git /.gitignore /.rspec /.rubocop_todo.yml /.rubocop.yml /.ruby-version /.travis.yml /appveyor.yml /CHANGELOG.md /coverage /Gemfile /Gemfile.lock /Rakefile /README.md /spec /tmp puppetlabs-puppet-lint-f1a29d8/.fixtures.yml000066400000000000000000000003641510314671100212440ustar00rootroot00000000000000fixtures: repositories: facts: 'https://github.com/puppetlabs/puppetlabs-facts.git' provision: 'https://github.com/puppetlabs/provision.git' puppet_agent: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git' symlinks: [] puppetlabs-puppet-lint-f1a29d8/.github/000077500000000000000000000000001510314671100201275ustar00rootroot00000000000000puppetlabs-puppet-lint-f1a29d8/.github/pull_request_template.md000066400000000000000000000006701510314671100250730ustar00rootroot00000000000000## Summary Provide a detailed description of all the changes present in this pull request. ## Additional Context Add any additional context about the problem here. - [ ] Root cause and the steps to reproduce. (If applicable) - [ ] Thought process behind the implementation. ## Related Issues (if any) Mention any related issues or pull requests. ## Checklist - [ ] 🟢 Spec tests. - [ ] 🟢 Acceptance tests. - [ ] Manually verified. puppetlabs-puppet-lint-f1a29d8/.github/workflows/000077500000000000000000000000001510314671100221645ustar00rootroot00000000000000puppetlabs-puppet-lint-f1a29d8/.github/workflows/ci.yml000066400000000000000000000016471510314671100233120ustar00rootroot00000000000000name: "ci" on: push: branches: - "main" pull_request: branches: - "main" workflow_dispatch: env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} jobs: spec: strategy: fail-fast: false matrix: ruby_version: - '3.2' - '3.3' - '3.4' name: "spec (ruby ${{ matrix.ruby_version }})" uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main" secrets: "inherit" with: rake_task: "spec:coverage" ruby_version: ${{ matrix.ruby_version }} acceptance: strategy: fail-fast: false matrix: ruby_version: - '3.2' - '3.3' - '3.4' name: "acceptance (ruby ${{ matrix.ruby_version }})" needs: "spec" uses: "puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@main" secrets: "inherit" with: ruby_version: ${{ matrix.ruby_version }} puppetlabs-puppet-lint-f1a29d8/.github/workflows/jekyll-gh-pages.yml000066400000000000000000000024201510314671100256700ustar00rootroot00000000000000name: Deploy GitHub Pages on: # Runs on pushes targeting the default branch push: branches: ["main"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. concurrency: group: "pages" cancel-in-progress: false jobs: # Build job build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Pages uses: actions/configure-pages@v5 - name: Build with Jekyll uses: actions/jekyll-build-pages@v1 with: source: ./ destination: ./_site - name: Upload artifact uses: actions/upload-pages-artifact@v3 # Deployment job deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 puppetlabs-puppet-lint-f1a29d8/.github/workflows/mend.yml000066400000000000000000000003661510314671100236370ustar00rootroot00000000000000name: "mend" on: pull_request: branches: - "main" schedule: - cron: "0 0 * * *" workflow_dispatch: jobs: mend: uses: "puppetlabs/cat-github-actions/.github/workflows/tooling_mend_ruby.yml@main" secrets: "inherit" puppetlabs-puppet-lint-f1a29d8/.github/workflows/nightly.yml000066400000000000000000000034671510314671100243770ustar00rootroot00000000000000name: "nightly" on: schedule: - cron: "0 0 * * *" workflow_dispatch: jobs: spec: strategy: fail-fast: false matrix: ruby_version: - '3.2' - '3.3' name: "spec (ruby ${{ matrix.ruby_version }})" uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main" secrets: "inherit" with: ruby_version: ${{ matrix.ruby_version }} acceptance: strategy: fail-fast: false matrix: ruby_version: - '3.2' - '3.3' name: "acceptance (ruby ${{ matrix.ruby_version }})" needs: "spec" uses: "puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@main" secrets: "inherit" with: ruby_version: ${{ matrix.ruby_version }} on-failure-workflow-restarter-proxy: # (1) run this job after the "spec" job and... needs: [spec, acceptance] # (2) continue ONLY IF "spec" fails if: always() && needs.spec.result == 'failure' || needs.acceptance.result == 'failure' runs-on: ubuntu-latest steps: # (3) checkout this repository in order to "see" the following custom action - name: Checkout repository uses: actions/checkout@v4 # (4) "use" the custom action to retrigger the failed "spec job" above # NOTE: pass the SOURCE_GITHUB_TOKEN to the custom action because (a) it must have # this to trigger the reusable workflow that restarts the failed job; and # (b) custom actions do not have access to the calling workflow's secrets - name: Trigger reusable workflow uses: "puppetlabs/cat-github-actions/.github/actions/workflow-restarter-proxy@main" env: SOURCE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: repository: ${{ github.repository }} run_id: ${{ github.run_id }} puppetlabs-puppet-lint-f1a29d8/.github/workflows/release.yml000066400000000000000000000005721510314671100243330ustar00rootroot00000000000000name: "Release" on: workflow_dispatch: inputs: target: description: "The target for the release. This can be a commit sha or a branch." required: false default: "main" jobs: release: uses: "puppetlabs/cat-github-actions/.github/workflows/gem_release.yml@main" with: target: "${{ github.event.inputs.target }}" secrets: "inherit" puppetlabs-puppet-lint-f1a29d8/.github/workflows/release_prep.yml000066400000000000000000000010231510314671100253510ustar00rootroot00000000000000name: "Release Prep" on: workflow_dispatch: inputs: target: description: "The target for the release. This can be a commit sha or a branch." required: false default: "main" version: description: "Version of gem to be released." required: true jobs: release_prep: uses: "puppetlabs/cat-github-actions/.github/workflows/gem_release_prep.yml@main" with: target: "${{ github.event.inputs.target }}" version: "${{ github.event.inputs.version }}" secrets: "inherit" puppetlabs-puppet-lint-f1a29d8/.github/workflows/workflow-restarter.yml000066400000000000000000000013261510314671100265740ustar00rootroot00000000000000# target-repo/.github/workflows/call-reusable-workflow.yml name: Workflow Restarter on: workflow_dispatch: inputs: repo: description: "GitHub repository name." required: true type: string run_id: description: "The ID of the workflow run to rerun." required: true type: string retries: description: "The number of times to retry the workflow run." required: false type: string default: "3" jobs: call-reusable-workflow: uses: "puppetlabs/cat-github-actions/.github/workflows/workflow-restarter.yml@main" with: repo: ${{ inputs.repo }} run_id: ${{ inputs.run_id }} retries: ${{ inputs.retries }}puppetlabs-puppet-lint-f1a29d8/.gitignore000066400000000000000000000002031510314671100205520ustar00rootroot00000000000000*.gem .bundle/ .rbenv-version .ruby-version Gemfile.lock vendor/ coverage/ *.swp /_site/ .idea /*.pp /tmp/ .vendor/ spec/fixtures/ puppetlabs-puppet-lint-f1a29d8/.rspec000066400000000000000000000000371510314671100177040ustar00rootroot00000000000000--format documentation --color puppetlabs-puppet-lint-f1a29d8/.rubocop.yml000066400000000000000000000000751510314671100210430ustar00rootroot00000000000000inherit_from: - rubocop_baseline.yml - .rubocop_todo.yml puppetlabs-puppet-lint-f1a29d8/.rubocop_todo.yml000066400000000000000000000116521510314671100220730ustar00rootroot00000000000000# This configuration was generated by # `rubocop --auto-gen-config` # on 2024-01-22 14:59:34 UTC using RuboCop version 1.50.2. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: Severity, Include. # Include: **/*.gemspec Gemspec/RequireMFA: Exclude: - 'puppet-lint.gemspec' # Offense count: 4 # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches. Lint/DuplicateBranch: Exclude: - 'lib/puppet-lint/lexer/string_slurper.rb' - 'lib/puppet-lint/lexer/token.rb' # Offense count: 9 # Configuration parameters: MaximumRangeSize. Lint/MissingCopEnableDirective: Exclude: - 'lib/puppet-lint.rb' - 'lib/puppet-lint/lexer.rb' - 'lib/puppet-lint/lexer/string_slurper.rb' - 'lib/puppet-lint/lexer/token.rb' - 'lib/puppet-lint/report/codeclimate.rb' - 'lib/puppet-lint/report/github.rb' - 'lib/puppet-lint/tasks/puppet-lint.rb' - 'spec/unit/puppet-lint/puppet-lint_spec.rb' # Offense count: 58 # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. Metrics/AbcSize: Max: 142 # Offense count: 35 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode. # AllowedMethods: refine Metrics/BlockLength: Max: 104 # Offense count: 2 # Configuration parameters: CountBlocks. Metrics/BlockNesting: Max: 5 # Offense count: 8 # Configuration parameters: CountComments, CountAsOne. Metrics/ClassLength: Max: 387 # Offense count: 33 # Configuration parameters: AllowedMethods, AllowedPatterns. Metrics/CyclomaticComplexity: Max: 33 # Offense count: 81 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. Metrics/MethodLength: Max: 111 # Offense count: 26 # Configuration parameters: AllowedMethods, AllowedPatterns. Metrics/PerceivedComplexity: Max: 31 # Offense count: 186 # Configuration parameters: ForbiddenDelimiters. # ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$)) Naming/HeredocDelimiterNaming: Enabled: false # Offense count: 2 # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to Naming/MethodParameterName: Exclude: - 'lib/puppet-lint/monkeypatches.rb' # Offense count: 7 # Configuration parameters: MinSize. Performance/CollectionLiteralInLoop: Exclude: - 'lib/puppet-lint/bin.rb' - 'lib/puppet-lint/data.rb' - 'lib/puppet-lint/plugins/check_resources/ensure_first_param.rb' - 'lib/puppet-lint/plugins/check_whitespace/trailing_whitespace.rb' # Offense count: 409 # Configuration parameters: Prefixes, AllowedPatterns. # Prefixes: when, with, without RSpec/ContextWording: Enabled: false # Offense count: 41 # Configuration parameters: IgnoredMetadata. RSpec/DescribeClass: Enabled: false # Offense count: 50 # Configuration parameters: CountAsOne. RSpec/ExampleLength: Max: 148 # Offense count: 119 RSpec/MultipleExpectations: Max: 137 # Offense count: 3 # Configuration parameters: AllowSubject. RSpec/MultipleMemoizedHelpers: Max: 13 # Offense count: 52 # Configuration parameters: AllowedGroups. RSpec/NestedGroups: Max: 5 # Offense count: 8 RSpec/RepeatedExampleGroupDescription: Exclude: - 'spec/unit/puppet-lint/plugins/check_resources/file_mode_spec.rb' - 'spec/unit/puppet-lint/plugins/check_resources/unquoted_file_mode_spec.rb' - 'spec/unit/puppet-lint/plugins/legacy_facts/legacy_facts_spec.rb' # Offense count: 9 # Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata. # Include: **/*_spec.rb RSpec/SpecFilePathFormat: Exclude: - '**/spec/routing/**/*' - 'spec/unit/puppet-lint/bin_spec.rb' - 'spec/unit/puppet-lint/checks_spec.rb' - 'spec/unit/puppet-lint/checkplugin_spec.rb' - 'spec/unit/puppet-lint/configuration_spec.rb' - 'spec/unit/puppet-lint/data_spec.rb' - 'spec/unit/puppet-lint/lexer/string_slurper_spec.rb' - 'spec/unit/puppet-lint/lexer/token_spec.rb' - 'spec/unit/puppet-lint/lexer_spec.rb' - 'spec/unit/puppet-lint/puppet-lint_spec.rb' # Offense count: 106 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: always, always_true, never Style/FrozenStringLiteralComment: Enabled: false # Offense count: 9 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: Mode. Style/StringConcatenation: Exclude: - 'lib/puppet-lint/bin.rb' - 'lib/puppet-lint/plugins.rb' - 'lib/puppet-lint/plugins/top_scope_facts/top_scope_facts.rb' - 'spec/unit/puppet-lint/plugins/check_strings/variables_not_enclosed_spec.rb' puppetlabs-puppet-lint-f1a29d8/CHANGELOG.md000066400000000000000000000421241510314671100204030ustar00rootroot00000000000000 # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org). ## [v5.1.1](https://github.com/puppetlabs/puppet-lint/tree/v5.1.1) - 2025-11-06 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v5.1.0...v5.1.1) ### Fixed - (CAT-2484) Prevent YAML corruption by making PuppetLint instances file-type aware [#256](https://github.com/puppetlabs/puppet-lint/pull/256) ([gavindidrichsen](https://github.com/gavindidrichsen)) ## [v5.1.0](https://github.com/puppetlabs/puppet-lint/tree/v5.1.0) - 2025-09-25 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v5.0.0...v5.1.0) ### Added - Fix `Ensure check methods can't modify tokens array` and add Ruby 3.4 testing [#233](https://github.com/puppetlabs/puppet-lint/pull/233) ([alexjfisher](https://github.com/alexjfisher)) ## [v5.0.0](https://github.com/puppetlabs/puppet-lint/tree/v5.0.0) - 2025-09-23 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v4.3.0...v5.0.0) ### Changed - (CAT-2281) Remove puppet 7 infrastructure [#242](https://github.com/puppetlabs/puppet-lint/pull/242) ([LukasAud](https://github.com/LukasAud)) ### Added - Add abstract data types to lexer type tokens list [#240](https://github.com/puppetlabs/puppet-lint/pull/240) ([kenyon](https://github.com/kenyon)) ### Fixed - Add missing `require 'pp'` [#247](https://github.com/puppetlabs/puppet-lint/pull/247) ([alexjfisher](https://github.com/alexjfisher)) - Avoid using the manifest lexer on YAML [#239](https://github.com/puppetlabs/puppet-lint/pull/239) ([tokenrove](https://github.com/tokenrove)) ## [v4.3.0](https://github.com/puppetlabs/puppet-lint/tree/v4.3.0) - 2025-03-06 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v4.2.4...v4.3.0) ### Added - Extend puppet-lint to legacy_check yaml files [#235](https://github.com/puppetlabs/puppet-lint/pull/235) ([alex501212](https://github.com/alex501212)) - Add Binary type to lexer type tokens list [#224](https://github.com/puppetlabs/puppet-lint/pull/224) ([jay7x](https://github.com/jay7x)) - Add Error type to the lexer tokens (and sort them) [#216](https://github.com/puppetlabs/puppet-lint/pull/216) ([jay7x](https://github.com/jay7x)) - Create a new plugin for ensuring a single space before a '=>' [#175](https://github.com/puppetlabs/puppet-lint/pull/175) ([gerases](https://github.com/gerases)) ### Fixed - add --top-scope-variables cli argument, fix #228 [#229](https://github.com/puppetlabs/puppet-lint/pull/229) ([jcharaoui](https://github.com/jcharaoui)) - Fix function call name token type in function_indexes method [#198](https://github.com/puppetlabs/puppet-lint/pull/198) ([hsnodgrass](https://github.com/hsnodgrass)) ## [v4.2.4](https://github.com/puppetlabs/puppet-lint/tree/v4.2.4) - 2024-02-09 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v4.2.3...v4.2.4) ### Fixed - (GH-189) - invalid fact correction for top scope structured fact [#190](https://github.com/puppetlabs/puppet-lint/pull/190) ([jordanbreen28](https://github.com/jordanbreen28)) ## [v4.2.3](https://github.com/puppetlabs/puppet-lint/tree/v4.2.3) - 2023-11-22 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v4.2.2...v4.2.3) ### Fixed - (maint) - Update redundant description [#179](https://github.com/puppetlabs/puppet-lint/pull/179) ([jordanbreen28](https://github.com/jordanbreen28)) ## [v4.2.2](https://github.com/puppetlabs/puppet-lint/tree/v4.2.2) - 2023-11-21 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v4.2.1...v4.2.2) ### Fixed - Use better yardoc tags [#172](https://github.com/puppetlabs/puppet-lint/pull/172) ([ekohl](https://github.com/ekohl)) ## [v4.2.1](https://github.com/puppetlabs/puppet-lint/tree/v4.2.1) - 2023-10-09 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v4.2.0...v4.2.1) ### Fixed - legacy_facts: Deal with variables ending in facts [#155](https://github.com/puppetlabs/puppet-lint/pull/155) ([ekohl](https://github.com/ekohl)) ## [v4.2.0](https://github.com/puppetlabs/puppet-lint/tree/v4.2.0) - 2023-08-29 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v4.1.0...v4.2.0) ### Added - Revert "(CAT-1301) Add check unsafe interpolations check" [#147](https://github.com/puppetlabs/puppet-lint/pull/147) ([pmcmaw](https://github.com/pmcmaw)) ## [v4.1.0](https://github.com/puppetlabs/puppet-lint/tree/v4.1.0) - 2023-08-25 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v4.0.1...v4.1.0) ### Added - (CAT-1301) Add check unsafe interpolations check [#142](https://github.com/puppetlabs/puppet-lint/pull/142) ([GSPatton](https://github.com/GSPatton)) ## [v4.0.1](https://github.com/puppetlabs/puppet-lint/tree/v4.0.1) - 2023-07-31 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v4.0.0...v4.0.1) ### Fixed - (CAT-1167) Fix failing legacy fact autocorrector [#138](https://github.com/puppetlabs/puppet-lint/pull/138) ([LukasAud](https://github.com/LukasAud)) - (GH-122) Fix bad detection of optional parameters out of order [#123](https://github.com/puppetlabs/puppet-lint/pull/123) ([tiandrey](https://github.com/tiandrey)) - Do not crash when referring to a fact key without quoting it [#119](https://github.com/puppetlabs/puppet-lint/pull/119) ([chutzimir](https://github.com/chutzimir)) ## [v4.0.0](https://github.com/puppetlabs/puppet-lint/tree/v4.0.0) - 2023-04-21 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v3.4.0...v4.0.0) ### Changed - (CONT-811) Add Ruby 3.2 support and Remove support for Ruby 2.5 [#113](https://github.com/puppetlabs/puppet-lint/pull/113) ([GSPatton](https://github.com/GSPatton)) ## [v3.4.0](https://github.com/puppetlabs/puppet-lint/tree/v3.4.0) - 2023-04-05 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v3.3.0...v3.4.0) ### Fixed - (maint) Update issues URL [#112](https://github.com/puppetlabs/puppet-lint/pull/112) ([pmcmaw](https://github.com/pmcmaw)) ## [v3.3.0](https://github.com/puppetlabs/puppet-lint/tree/v3.3.0) - 2023-03-07 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v3.2.0...v3.3.0) ### Fixed - (maint) Corrects legacy macOS facts [#103](https://github.com/puppetlabs/puppet-lint/pull/103) ([mhashizume](https://github.com/mhashizume)) ## [v3.2.0](https://github.com/puppetlabs/puppet-lint/tree/v3.2.0) - 2023-02-28 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v3.1.0...v3.2.0) ### Added - codeclimate (GitLab Code Quality compatible) output support [#79](https://github.com/puppetlabs/puppet-lint/pull/79) ([alexjfisher](https://github.com/alexjfisher)) ### Fixed - (CONT-675) Fix fact detection [#96](https://github.com/puppetlabs/puppet-lint/pull/96) ([chelnak](https://github.com/chelnak)) ## [v3.1.0](https://github.com/puppetlabs/puppet-lint/tree/v3.1.0) - 2023-02-28 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v3.0.1...v3.1.0) ### Added - (CONT-670) Add legacy facts check [#91](https://github.com/puppetlabs/puppet-lint/pull/91) ([chelnak](https://github.com/chelnak)) - (CONT-339) Lower Ruby requirement [#87](https://github.com/puppetlabs/puppet-lint/pull/87) ([chelnak](https://github.com/chelnak)) - (CONT-339) Add top scope facts check [#85](https://github.com/puppetlabs/puppet-lint/pull/85) ([chelnak](https://github.com/chelnak)) ### Fixed - (CONT-666) Skip classref types [#93](https://github.com/puppetlabs/puppet-lint/pull/93) ([chelnak](https://github.com/chelnak)) - Fix first token whitespace [#86](https://github.com/puppetlabs/puppet-lint/pull/86) ([nwoythal](https://github.com/nwoythal)) - Fix assertion when rspec-json_expectations is missing [#75](https://github.com/puppetlabs/puppet-lint/pull/75) ([ekohl](https://github.com/ekohl)) - (CONT-214) Fix rubocop inheritance [#70](https://github.com/puppetlabs/puppet-lint/pull/70) ([chelnak](https://github.com/chelnak)) ## [v3.0.1](https://github.com/puppetlabs/puppet-lint/tree/v3.0.1) - 2022-10-20 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/v3.0.0...v3.0.1) ### Fixed - Fix plugin regressions introduced in 3.0.0 [#66](https://github.com/puppetlabs/puppet-lint/pull/66) ([ekohl](https://github.com/ekohl)) ## [v3.0.0](https://github.com/puppetlabs/puppet-lint/tree/v3.0.0) - 2022-10-13 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.5.2...v3.0.0) ### Changed - (MAINT) bump ruby version [#50](https://github.com/puppetlabs/puppet-lint/pull/50) ([chelnak](https://github.com/chelnak)) ### Added - (GH-47) Expose additional indexes [#48](https://github.com/puppetlabs/puppet-lint/pull/48) ([chelnak](https://github.com/chelnak)) - Add SARIF support [#40](https://github.com/puppetlabs/puppet-lint/pull/40) ([shaopeng-gh](https://github.com/shaopeng-gh)) - Add GitHub Actions annotations [#34](https://github.com/puppetlabs/puppet-lint/pull/34) ([ekohl](https://github.com/ekohl)) ### Fixed - Don't print GitHub annotations in JSON mode [#35](https://github.com/puppetlabs/puppet-lint/pull/35) ([ekohl](https://github.com/ekohl)) ## [2.5.2](https://github.com/puppetlabs/puppet-lint/tree/2.5.2) - 2021-09-14 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.5.1...2.5.2) ## [2.5.1](https://github.com/puppetlabs/puppet-lint/tree/2.5.1) - 2021-09-13 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.5.0...2.5.1) ### Fixed - (GH-16) Do not warn on "\s" string literal [#20](https://github.com/puppetlabs/puppet-lint/pull/20) ([sanfrancrisko](https://github.com/sanfrancrisko)) ## [2.5.0](https://github.com/puppetlabs/puppet-lint/tree/2.5.0) - 2021-07-26 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.4.2...2.5.0) ## [2.4.2](https://github.com/puppetlabs/puppet-lint/tree/2.4.2) - 2019-10-31 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.4.1...2.4.2) ## [2.4.1](https://github.com/puppetlabs/puppet-lint/tree/2.4.1) - 2019-10-09 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.4.0...2.4.1) ## [2.4.0](https://github.com/puppetlabs/puppet-lint/tree/2.4.0) - 2019-10-08 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.3.6...2.4.0) ## [2.3.6](https://github.com/puppetlabs/puppet-lint/tree/2.3.6) - 2018-07-09 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.3.5...2.3.6) ## [2.3.5](https://github.com/puppetlabs/puppet-lint/tree/2.3.5) - 2018-03-27 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.3.4...2.3.5) ## [2.3.4](https://github.com/puppetlabs/puppet-lint/tree/2.3.4) - 2018-03-26 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.3.3...2.3.4) ## [2.3.3](https://github.com/puppetlabs/puppet-lint/tree/2.3.3) - 2017-09-28 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.3.2...2.3.3) ## [2.3.2](https://github.com/puppetlabs/puppet-lint/tree/2.3.2) - 2017-09-27 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.3.1...2.3.2) ## [2.3.1](https://github.com/puppetlabs/puppet-lint/tree/2.3.1) - 2017-09-27 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.3.0...2.3.1) ## [2.3.0](https://github.com/puppetlabs/puppet-lint/tree/2.3.0) - 2017-07-12 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.2.1...2.3.0) ## [2.2.1](https://github.com/puppetlabs/puppet-lint/tree/2.2.1) - 2017-03-29 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.2.0...2.2.1) ## [2.2.0](https://github.com/puppetlabs/puppet-lint/tree/2.2.0) - 2017-03-29 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.1.1...2.2.0) ## [2.1.1](https://github.com/puppetlabs/puppet-lint/tree/2.1.1) - 2017-02-14 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.1.0...2.1.1) ## [2.1.0](https://github.com/puppetlabs/puppet-lint/tree/2.1.0) - 2016-12-30 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.0.2...2.1.0) ## [2.0.2](https://github.com/puppetlabs/puppet-lint/tree/2.0.2) - 2016-08-18 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.0.1...2.0.2) ## [2.0.1](https://github.com/puppetlabs/puppet-lint/tree/2.0.1) - 2016-08-18 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2.0.0...2.0.1) ## [2.0.0](https://github.com/puppetlabs/puppet-lint/tree/2.0.0) - 2016-06-22 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/1.1.0...2.0.0) ## [1.1.0](https://github.com/puppetlabs/puppet-lint/tree/1.1.0) - 2014-09-23 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/1.0.1...1.1.0) ## [1.0.1](https://github.com/puppetlabs/puppet-lint/tree/1.0.1) - 2014-08-20 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/1.0.0...1.0.1) ## [1.0.0](https://github.com/puppetlabs/puppet-lint/tree/1.0.0) - 2014-08-18 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.4.0.pre1...1.0.0) ## [0.4.0.pre1](https://github.com/puppetlabs/puppet-lint/tree/0.4.0.pre1) - 2013-01-28 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.3.2...0.4.0.pre1) ## [0.3.2](https://github.com/puppetlabs/puppet-lint/tree/0.3.2) - 2012-10-19 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.3.1...0.3.2) ## [0.3.1](https://github.com/puppetlabs/puppet-lint/tree/0.3.1) - 2012-09-26 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.3.0...0.3.1) ## [0.3.0](https://github.com/puppetlabs/puppet-lint/tree/0.3.0) - 2012-09-25 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.2.1...0.3.0) ## [0.2.1](https://github.com/puppetlabs/puppet-lint/tree/0.2.1) - 2012-08-27 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.2.0...0.2.1) ## [0.2.0](https://github.com/puppetlabs/puppet-lint/tree/0.2.0) - 2012-08-23 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.2.0.pre1...0.2.0) ## [0.2.0.pre1](https://github.com/puppetlabs/puppet-lint/tree/0.2.0.pre1) - 2012-07-11 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.1.13...0.2.0.pre1) ## [0.1.13](https://github.com/puppetlabs/puppet-lint/tree/0.1.13) - 2012-03-25 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.1.12...0.1.13) ## [0.1.12](https://github.com/puppetlabs/puppet-lint/tree/0.1.12) - 2012-01-27 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.1.11...0.1.12) ## [0.1.11](https://github.com/puppetlabs/puppet-lint/tree/0.1.11) - 2012-01-12 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.1.10...0.1.11) ## [0.1.10](https://github.com/puppetlabs/puppet-lint/tree/0.1.10) - 2012-01-12 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.1.9...0.1.10) ## [0.1.9](https://github.com/puppetlabs/puppet-lint/tree/0.1.9) - 2011-12-27 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.1.8...0.1.9) ## [0.1.8](https://github.com/puppetlabs/puppet-lint/tree/0.1.8) - 2011-12-27 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.1.7...0.1.8) ## [0.1.7](https://github.com/puppetlabs/puppet-lint/tree/0.1.7) - 2011-10-18 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.1.4...0.1.7) ## [0.1.4](https://github.com/puppetlabs/puppet-lint/tree/0.1.4) - 2011-09-10 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.1.3...0.1.4) ## [0.1.3](https://github.com/puppetlabs/puppet-lint/tree/0.1.3) - 2011-09-09 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.1.2...0.1.3) ## [0.1.2](https://github.com/puppetlabs/puppet-lint/tree/0.1.2) - 2011-09-09 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.1.1...0.1.2) ## [0.1.1](https://github.com/puppetlabs/puppet-lint/tree/0.1.1) - 2011-09-07 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.1.0...0.1.1) ## [0.1.0](https://github.com/puppetlabs/puppet-lint/tree/0.1.0) - 2011-08-22 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.0.7...0.1.0) ## [0.0.7](https://github.com/puppetlabs/puppet-lint/tree/0.0.7) - 2011-08-21 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.0.6...0.0.7) ## [0.0.6](https://github.com/puppetlabs/puppet-lint/tree/0.0.6) - 2011-08-19 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.0.5...0.0.6) ## [0.0.5](https://github.com/puppetlabs/puppet-lint/tree/0.0.5) - 2011-08-19 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.0.4...0.0.5) ## [0.0.4](https://github.com/puppetlabs/puppet-lint/tree/0.0.4) - 2011-08-18 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.0.3...0.0.4) ## [0.0.3](https://github.com/puppetlabs/puppet-lint/tree/0.0.3) - 2011-08-17 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.0.2...0.0.3) ## [0.0.2](https://github.com/puppetlabs/puppet-lint/tree/0.0.2) - 2011-08-16 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/0.0.1...0.0.2) ## [0.0.1](https://github.com/puppetlabs/puppet-lint/tree/0.0.1) - 2011-08-15 [Full Changelog](https://github.com/puppetlabs/puppet-lint/compare/2dd42b803a4dfc3a2398a509d26f285c9427ba41...0.0.1) puppetlabs-puppet-lint-f1a29d8/CODEOWNERS000066400000000000000000000001201510314671100201530ustar00rootroot00000000000000# Setting ownership to the tooling team and Tim * @puppetlabs/devx @bastelfreak puppetlabs-puppet-lint-f1a29d8/Dockerfile000066400000000000000000000002461510314671100205630ustar00rootroot00000000000000FROM ruby:2.7-alpine RUN mkdir /puppet-lint /puppet VOLUME /puppet WORKDIR /puppet ENTRYPOINT ["/puppet-lint/bin/puppet-lint"] CMD ["--help"] COPY . /puppet-lint/ puppetlabs-puppet-lint-f1a29d8/Gemfile000066400000000000000000000014171510314671100200650ustar00rootroot00000000000000source 'https://rubygems.org' gemspec group :test do gem 'rake' gem 'rspec-its', '~> 1.0' gem 'rspec', '~> 3.0' gem 'json' gem 'rspec-json_expectations', '~> 1.4' gem 'simplecov', :require => false gem 'simplecov-console', :require => false end group :acceptance do gem 'serverspec' gem 'puppetlabs_spec_helper' gem 'puppet_litmus' end group :development do gem 'github_changelog_generator', '~> 1.15.0', require: false gem 'faraday-retry', require: false gem 'pry', require: false gem 'pry-byebug', require: false gem 'pry-stack_explorer', require: false end group :rubocop do gem 'rubocop', '~> 1.64.0', require: false gem 'rubocop-rspec', '~> 3.0', require: false gem 'rubocop-performance', '~> 1.16', require: false end puppetlabs-puppet-lint-f1a29d8/HISTORY.md000066400000000000000000002732631510314671100202670ustar00rootroot00000000000000# Changelog ## [2.5.0](https://github.com/rodjek/puppet-lint/tree/2.5.0) (2021-07-23) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.4.2...2.5.0) **Implemented enhancements:** - Include check name in log output by default [\#883](https://github.com/rodjek/puppet-lint/pull/883) ([usev6](https://github.com/usev6)) **Fixed bugs:** - Array operations on parameters confuse puppet-lint [\#930](https://github.com/rodjek/puppet-lint/issues/930) - Wrong warrning: "variable contains an uppercase" [\#929](https://github.com/rodjek/puppet-lint/issues/929) - Erroneous "WARNING: indentation of =\> is not properly aligned" since 2.4.0 [\#912](https://github.com/rodjek/puppet-lint/issues/912) - NoMethodError: undefined method `next\_token\_of' for nil:NilClass [\#906](https://github.com/rodjek/puppet-lint/issues/906) - Lint failure on reduce function [\#869](https://github.com/rodjek/puppet-lint/issues/869) - lint failure on 'ensure' word in dsc\_lite module [\#866](https://github.com/rodjek/puppet-lint/issues/866) - Content of heredocs should not be checked [\#851](https://github.com/rodjek/puppet-lint/issues/851) - Whoops! It looks like puppet-lint has encountered an error that it doesn't [\#839](https://github.com/rodjek/puppet-lint/issues/839) **Closed issues:** - heredoc prematurely terminated [\#940](https://github.com/rodjek/puppet-lint/issues/940) - Heredoc syntax error [\#935](https://github.com/rodjek/puppet-lint/issues/935) - Lint for ' [\#927](https://github.com/rodjek/puppet-lint/issues/927) - puppet-lint-class\_parameter-check fails on voxpupuli/collectd [\#926](https://github.com/rodjek/puppet-lint/issues/926) - puppet-lint error [\#917](https://github.com/rodjek/puppet-lint/issues/917) - Improper "unquoted node name found" [\#904](https://github.com/rodjek/puppet-lint/issues/904) - 2.4.x regression with puppet-lint-legacy\_facts-check [\#902](https://github.com/rodjek/puppet-lint/issues/902) - puppet-lint a puppet type in voxpupuli-corosync [\#857](https://github.com/rodjek/puppet-lint/issues/857) - Create and publish a docker image for puppet-lint [\#794](https://github.com/rodjek/puppet-lint/issues/794) **Merged pull requests:** - Select parameter tokens based on preceeding code token [\#934](https://github.com/rodjek/puppet-lint/pull/934) ([rodjek](https://github.com/rodjek)) - Move most CI to GH actions [\#933](https://github.com/rodjek/puppet-lint/pull/933) ([rodjek](https://github.com/rodjek)) - Correctly lex non-keyword type tokens in interpolation [\#932](https://github.com/rodjek/puppet-lint/pull/932) ([rodjek](https://github.com/rodjek)) - Disallow empty lines between docs and class/define [\#931](https://github.com/rodjek/puppet-lint/pull/931) ([ekohl](https://github.com/ekohl)) - Improve Rake task [\#919](https://github.com/rodjek/puppet-lint/pull/919) ([raphink](https://github.com/raphink)) - \(\#912\) Count consumed chars not bytes when slurping strings [\#915](https://github.com/rodjek/puppet-lint/pull/915) ([rodjek](https://github.com/rodjek)) - Do not rely on tokens array positioning when fixing ensure\_first\_param problems [\#914](https://github.com/rodjek/puppet-lint/pull/914) ([rodjek](https://github.com/rodjek)) - Only run test coverage once [\#913](https://github.com/rodjek/puppet-lint/pull/913) ([rodjek](https://github.com/rodjek)) - add MIT license to gemspec [\#910](https://github.com/rodjek/puppet-lint/pull/910) ([bastelfreak](https://github.com/bastelfreak)) - Improve spelling for some tests [\#909](https://github.com/rodjek/puppet-lint/pull/909) ([usev6](https://github.com/usev6)) - \(\#851\) Ensure heredoc ending tag is on its own line [\#903](https://github.com/rodjek/puppet-lint/pull/903) ([rodjek](https://github.com/rodjek)) - \(\#794\) Dockerfile for puppet-lint [\#901](https://github.com/rodjek/puppet-lint/pull/901) ([rodjek](https://github.com/rodjek)) ## [2.4.2](https://github.com/rodjek/puppet-lint/tree/2.4.2) (2019-10-31) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.4.1...2.4.2) **Fixed bugs:** - `ERROR: Syntax error (unterminated string)` with 2.4.1 [\#899](https://github.com/rodjek/puppet-lint/issues/899) - Double quoted string containing variable named "node" mis-tokenized [\#897](https://github.com/rodjek/puppet-lint/issues/897) - 2.4.1 says Syntax error, but code runs fine [\#891](https://github.com/rodjek/puppet-lint/issues/891) - Error with regex variable with multiple `|`s. [\#859](https://github.com/rodjek/puppet-lint/issues/859) **Closed issues:** - WARNING: double quoted string containing no variables [\#895](https://github.com/rodjek/puppet-lint/issues/895) **Merged pull requests:** - Fix regression in tokenization in double-quoted strings [\#898](https://github.com/rodjek/puppet-lint/pull/898) ([seanmil](https://github.com/seanmil)) - Speed up calculation of resource indexes [\#893](https://github.com/rodjek/puppet-lint/pull/893) ([usev6](https://github.com/usev6)) - Search end of string before assuming escaped quote [\#892](https://github.com/rodjek/puppet-lint/pull/892) ([usev6](https://github.com/usev6)) - Allow parsing of regexes as rvalues [\#882](https://github.com/rodjek/puppet-lint/pull/882) ([usev6](https://github.com/usev6)) ## [2.4.1](https://github.com/rodjek/puppet-lint/tree/2.4.1) (2019-10-09) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.4.0...2.4.1) **Fixed bugs:** - Puppet-lint 2.4.0 throws misleading warning on double-quoted strings with escaped variables [\#886](https://github.com/rodjek/puppet-lint/issues/886) - Puppet-lint 2.4.0 - ERROR: Syntax error on line x [\#887](https://github.com/rodjek/puppet-lint/issues/887) - Breaks after 2.4.0 upgrade [\#885](https://github.com/rodjek/puppet-lint/issues/885) **Merged pull requests:** - Fix escaped ${} enclosure handling when slurping double quoted strings [\#889](https://github.com/rodjek/puppet-lint/pull/889) ([rodjek](https://github.com/rodjek)) - Fix non-indented heredoc parsing [\#888](https://github.com/rodjek/puppet-lint/pull/888) ([rodjek](https://github.com/rodjek)) ## [2.4.0](https://github.com/rodjek/puppet-lint/tree/2.4.0) (2019-10-08) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.3.6...2.4.0) **Fixed bugs:** - Syntax error on Pattern data type [\#833](https://github.com/rodjek/puppet-lint/issues/833) - Command line options do not override options from config files [\#879](https://github.com/rodjek/puppet-lint/issues/879) - Fix for variables\_not\_enclosed incorrectly handles variables followed by a dash [\#836](https://github.com/rodjek/puppet-lint/issues/836) - Error with puppet-lint --fix: NoMethodError: undefined method `next\_token' for nil:NilClass [\#831](https://github.com/rodjek/puppet-lint/issues/831) - TypeError: no implicit conversion of nil into String [\#830](https://github.com/rodjek/puppet-lint/issues/830) - Selector with 'default' case disables check for missing default in outer case statement [\#829](https://github.com/rodjek/puppet-lint/issues/829) - undefined method `next\_token' for nil:NilClass [\#824](https://github.com/rodjek/puppet-lint/issues/824) - NoMethodError: undefined method `next\_token' for nil:NilClass [\#790](https://github.com/rodjek/puppet-lint/issues/790) - Puppet-lint --fix silently removes necessary $ inside double quoted strings [\#773](https://github.com/rodjek/puppet-lint/issues/773) - It looks like puppet-lint has encountered an error that it doesn't know how to handle [\#768](https://github.com/rodjek/puppet-lint/issues/768) - puppet-lint lexer string interpolation needs to be updated to match PUP-5887 changes [\#747](https://github.com/rodjek/puppet-lint/issues/747) - Syntax error causes 'Whoops!' [\#740](https://github.com/rodjek/puppet-lint/issues/740) - "quoted boolean value found" in hash value should not raise a warning. [\#474](https://github.com/rodjek/puppet-lint/issues/474) **Closed issues:** - Error when running puppet-lint [\#862](https://github.com/rodjek/puppet-lint/issues/862) - puppet-lint crashes with mispelled namespace seperators [\#853](https://github.com/rodjek/puppet-lint/issues/853) - NoMethodError: undefined method `prev\_token' for nil:NilClass [\#845](https://github.com/rodjek/puppet-lint/issues/845) - Lint incorrectly errors on quoted bool [\#844](https://github.com/rodjek/puppet-lint/issues/844) - Type\[\]\] raises NoMethodError [\#843](https://github.com/rodjek/puppet-lint/issues/843) - Whoops! It looks like puppet-lint has encountered an error that it doesn't know how to handle. [\#842](https://github.com/rodjek/puppet-lint/issues/842) - Whoops! It looks like puppet-lint has encountered an error that it doesn't [\#838](https://github.com/rodjek/puppet-lint/issues/838) - Incorrectly wrapped hash variable inside double quotes [\#826](https://github.com/rodjek/puppet-lint/issues/826) - Test puppet-lint against Ruby 2.5.x [\#818](https://github.com/rodjek/puppet-lint/issues/818) - nested ensure misdetected as not coming first. [\#410](https://github.com/rodjek/puppet-lint/issues/410) **Merged pull requests:** - README - Add GitHub Actions action [\#868](https://github.com/rodjek/puppet-lint/pull/868) ([ScottBrenner](https://github.com/ScottBrenner)) - Update TravisCI config to use trusty image [\#867](https://github.com/rodjek/puppet-lint/pull/867) ([rodjek](https://github.com/rodjek)) - Use the default travis rubygems & bundler [\#860](https://github.com/rodjek/puppet-lint/pull/860) ([rodjek](https://github.com/rodjek)) - Add `Sensitive` to the list of KNOWN\_TOKEN TYPES [\#858](https://github.com/rodjek/puppet-lint/pull/858) ([alexjfisher](https://github.com/alexjfisher)) - Avoid internal error for typoed namespace [\#855](https://github.com/rodjek/puppet-lint/pull/855) ([usev6](https://github.com/usev6)) - Use lookahead assertion for matching function name [\#854](https://github.com/rodjek/puppet-lint/pull/854) ([usev6](https://github.com/usev6)) - Resource: fix nested ensure error. [\#848](https://github.com/rodjek/puppet-lint/pull/848) ([keur](https://github.com/keur)) - Rewrite double quoted string handling for nested interpolation [\#846](https://github.com/rodjek/puppet-lint/pull/846) ([rodjek](https://github.com/rodjek)) - Allow for spaces in the heredoc tag [\#841](https://github.com/rodjek/puppet-lint/pull/841) ([jarretlavallee](https://github.com/jarretlavallee)) - Recognizes multiline regexes [\#835](https://github.com/rodjek/puppet-lint/pull/835) ([jcbollinger](https://github.com/jcbollinger)) - Handle unenclosed variables followed by dashes when fixing [\#881](https://github.com/rodjek/puppet-lint/pull/881) ([rodjek](https://github.com/rodjek)) - Let command line args override config from files [\#880](https://github.com/rodjek/puppet-lint/pull/880) ([usev6](https://github.com/usev6)) - Ignore hash keys when checking resource parameter order [\#877](https://github.com/rodjek/puppet-lint/pull/877) ([rodjek](https://github.com/rodjek)) - Only look for 'default' at first level of 'case' statement [\#876](https://github.com/rodjek/puppet-lint/pull/876) ([usev6](https://github.com/usev6)) - Report syntax error on unbalanced braces [\#875](https://github.com/rodjek/puppet-lint/pull/875) ([rodjek](https://github.com/rodjek)) - Include hash/array references when enclosing variables [\#874](https://github.com/rodjek/puppet-lint/pull/874) ([rodjek](https://github.com/rodjek)) - Disable quoted\_booleans check by default [\#873](https://github.com/rodjek/puppet-lint/pull/873) ([rodjek](https://github.com/rodjek)) - Test against Ruby 2.5 & 2.6 [\#872](https://github.com/rodjek/puppet-lint/pull/872) ([rodjek](https://github.com/rodjek)) ## [2.3.6](https://github.com/rodjek/puppet-lint/tree/2.3.6) (2018-07-09) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.3.5...2.3.6) **Fixed bugs:** - --fix does not work with require arrows in certain situations [\#799](https://github.com/rodjek/puppet-lint/issues/799) - Error with --fix when no whitespace before hashrocket in resource attribute list [\#798](https://github.com/rodjek/puppet-lint/issues/798) - puppet-lint --fix strips comments when fixing arrow\_on\_right\_operand\_line [\#792](https://github.com/rodjek/puppet-lint/issues/792) - Crash report, reason unclear [\#781](https://github.com/rodjek/puppet-lint/issues/781) - crash in fix mode with multiple trailing arrows [\#776](https://github.com/rodjek/puppet-lint/issues/776) - Error negative argument if opening brace on the same line and following element longer [\#771](https://github.com/rodjek/puppet-lint/issues/771) - ArgumentError: negative argument [\#723](https://github.com/rodjek/puppet-lint/issues/723) **Merged pull requests:** - \(\#771\) Handle arrow alignment when arrow column \< opening brace column... [\#819](https://github.com/rodjek/puppet-lint/pull/819) ([rodjek](https://github.com/rodjek)) - Less aggressive fix method for arrow\_on\_right\_operand\_line [\#817](https://github.com/rodjek/puppet-lint/pull/817) ([rodjek](https://github.com/rodjek)) - Check if token still exists before fixing trailing\_whitespace [\#816](https://github.com/rodjek/puppet-lint/pull/816) ([rodjek](https://github.com/rodjek)) - Run all the checks before fixing problems [\#815](https://github.com/rodjek/puppet-lint/pull/815) ([rodjek](https://github.com/rodjek)) ## [2.3.5](https://github.com/rodjek/puppet-lint/tree/2.3.5) (2018-03-27) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.3.4...2.3.5) **Fixed bugs:** - v2.3.4 breakage - 'wrong number of arguments' when using Rake task [\#812](https://github.com/rodjek/puppet-lint/issues/812) **Merged pull requests:** - Make PuppetLint::OptParser.build argument optional [\#813](https://github.com/rodjek/puppet-lint/pull/813) ([rodjek](https://github.com/rodjek)) ## [2.3.4](https://github.com/rodjek/puppet-lint/tree/2.3.4) (2018-03-26) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.3.3...2.3.4) **Implemented enhancements:** - Allow ignoring default configurations files on the command line [\#787](https://github.com/rodjek/puppet-lint/issues/787) - Implement --list-checks feature, to list the names of all available checks from the cli. [\#804](https://github.com/rodjek/puppet-lint/pull/804) ([xraystyle](https://github.com/xraystyle)) - Option to disable loading default configurations files [\#789](https://github.com/rodjek/puppet-lint/pull/789) ([dioni21](https://github.com/dioni21)) - Allow passing ignore\_paths from cli [\#783](https://github.com/rodjek/puppet-lint/pull/783) ([keymone](https://github.com/keymone)) **Fixed bugs:** - Bad value for range [\#801](https://github.com/rodjek/puppet-lint/issues/801) - puppet-lint doesn't handle CRLFs very well [\#778](https://github.com/rodjek/puppet-lint/issues/778) - Configuration's ignore\_paths is not respected [\#774](https://github.com/rodjek/puppet-lint/issues/774) - Error when including class and missing a colon [\#507](https://github.com/rodjek/puppet-lint/issues/507) **Merged pull requests:** - Handle single colon in resource name syntax error [\#809](https://github.com/rodjek/puppet-lint/pull/809) ([rodjek](https://github.com/rodjek)) - \(\#778\) Don't include line ending in single line comment token values [\#782](https://github.com/rodjek/puppet-lint/pull/782) ([rodjek](https://github.com/rodjek)) - Fix setting ignore\_paths in Rake task [\#777](https://github.com/rodjek/puppet-lint/pull/777) ([alzabo](https://github.com/alzabo)) - Add support for passing backslash separated paths to puppet-lint [\#769](https://github.com/rodjek/puppet-lint/pull/769) ([rodjek](https://github.com/rodjek)) ## [2.3.3](https://github.com/rodjek/puppet-lint/tree/2.3.3) (2017-09-28) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.3.2...2.3.3) **Closed issues:** - 2.3.2 - Rakefile's ignore\_paths not respected [\#760](https://github.com/rodjek/puppet-lint/issues/760) - 2.3.1 - Puppet lint fails with 1.8.7-p371 and Puppet 3.8.0 [\#759](https://github.com/rodjek/puppet-lint/issues/759) **Merged pull requests:** - Add some basic acceptance tests [\#764](https://github.com/rodjek/puppet-lint/pull/764) ([rodjek](https://github.com/rodjek)) - Change acceptance tests to work with Ruby 1.8.7 [\#767](https://github.com/rodjek/puppet-lint/pull/767) ([rodjek](https://github.com/rodjek)) - Restore Ruby 1.8.7 support [\#763](https://github.com/rodjek/puppet-lint/pull/763) ([rodjek](https://github.com/rodjek)) - Don't override ignore\_paths set in rake task with default value [\#762](https://github.com/rodjek/puppet-lint/pull/762) ([rodjek](https://github.com/rodjek)) - Add spec for issue raised in \#754 \#756 [\#761](https://github.com/rodjek/puppet-lint/pull/761) ([rodjek](https://github.com/rodjek)) - Fix setup of default log\_format in PuppetLink.configuration when it is empty. [\#757](https://github.com/rodjek/puppet-lint/pull/757) ([zekefast](https://github.com/zekefast)) ## [2.3.2](https://github.com/rodjek/puppet-lint/tree/2.3.2) (2017-09-27) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.3.1...2.3.2) **Closed issues:** - rake task now failing [\#754](https://github.com/rodjek/puppet-lint/issues/754) **Merged pull requests:** - 2.3.2 release [\#758](https://github.com/rodjek/puppet-lint/pull/758) ([tphoney](https://github.com/tphoney)) - fix logic in method\_missing [\#755](https://github.com/rodjek/puppet-lint/pull/755) ([tphoney](https://github.com/tphoney)) ## [2.3.1](https://github.com/rodjek/puppet-lint/tree/2.3.1) (2017-09-27) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.3.0...2.3.1) **Fixed bugs:** - `incompatible encoding regexp match` for non-printing characters in place of space [\#693](https://github.com/rodjek/puppet-lint/issues/693) - Unhandled error case [\#691](https://github.com/rodjek/puppet-lint/issues/691) - NoMethodError: undefined method `type' for nil:NilClass [\#732](https://github.com/rodjek/puppet-lint/issues/732) - NoMethodError: undefined method `end\_with?' for nil:NilClass [\#727](https://github.com/rodjek/puppet-lint/issues/727) - puppet-lint not applying some lint:ignore statements when there are more then 2 on the same line [\#726](https://github.com/rodjek/puppet-lint/issues/726) - optional paramter warning false positve when inheriting params [\#716](https://github.com/rodjek/puppet-lint/issues/716) - invalid byte sequence in UTF-8 in selmodule-example.pp [\#714](https://github.com/rodjek/puppet-lint/issues/714) - puppet-lint --fix encountered an error that it doesn't know how to handle [\#706](https://github.com/rodjek/puppet-lint/issues/706) - Mangled file after running puppet-lint due to chained function call [\#703](https://github.com/rodjek/puppet-lint/issues/703) **Closed issues:** - puppet-lint has encountered an error that it doesn't know how to handle [\#750](https://github.com/rodjek/puppet-lint/issues/750) - Puppet lint syntax error - puppet parser validate no issues [\#746](https://github.com/rodjek/puppet-lint/issues/746) - Whoops, not sure why. ArgumentError: bad value for range [\#742](https://github.com/rodjek/puppet-lint/issues/742) - ArgumentError: bad value for range [\#741](https://github.com/rodjek/puppet-lint/issues/741) - Whoops! It looks like puppet-lint has encountered an error [\#729](https://github.com/rodjek/puppet-lint/issues/729) - puppet lint config log\_format not working [\#725](https://github.com/rodjek/puppet-lint/issues/725) - Chaining arrow syntax fix introduces trailing whitespaces [\#695](https://github.com/rodjek/puppet-lint/issues/695) - Refactor check\_comments.rb [\#587](https://github.com/rodjek/puppet-lint/issues/587) - Puppethack 12/2016 Issues [\#583](https://github.com/rodjek/puppet-lint/issues/583) - Allow multiple block-level ignore comments [\#498](https://github.com/rodjek/puppet-lint/issues/498) - puppet-lint crashes with "invalid byte sequence in UTF-8 \(ArgumentError\)" [\#458](https://github.com/rodjek/puppet-lint/issues/458) - Variable use like "a+1 = ${$a + 1}" isn't reported but silently changed by --fix to "a+1 = ${a} + 1" [\#749](https://github.com/rodjek/puppet-lint/issues/749) - using --fix changes line endings [\#748](https://github.com/rodjek/puppet-lint/issues/748) - Error not handled [\#745](https://github.com/rodjek/puppet-lint/issues/745) - Line numbers off after multi-line strings with variables [\#736](https://github.com/rodjek/puppet-lint/issues/736) - Quoted booleans in Puppet5 for Enum type declarations. [\#720](https://github.com/rodjek/puppet-lint/issues/720) - Plugins reorganization: One file per check [\#657](https://github.com/rodjek/puppet-lint/issues/657) **Merged pull requests:** - Remove monkeypatches to implement String\#% [\#744](https://github.com/rodjek/puppet-lint/pull/744) ([rodjek](https://github.com/rodjek)) - Add unit tests for PuppetLint::Checks [\#743](https://github.com/rodjek/puppet-lint/pull/743) ([rodjek](https://github.com/rodjek)) - Update CI configuration [\#739](https://github.com/rodjek/puppet-lint/pull/739) ([rodjek](https://github.com/rodjek)) - Rubocop compliance [\#738](https://github.com/rodjek/puppet-lint/pull/738) ([rodjek](https://github.com/rodjek)) - Fix line numbers being off with multi-line strings containing variables [\#737](https://github.com/rodjek/puppet-lint/pull/737) ([cbowman0](https://github.com/cbowman0)) - Split control comments into words before parsing [\#735](https://github.com/rodjek/puppet-lint/pull/735) ([rodjek](https://github.com/rodjek)) - Handle unicode spaces in the tokeniser [\#734](https://github.com/rodjek/puppet-lint/pull/734) ([rodjek](https://github.com/rodjek)) - Handle SE Linux policy package files [\#733](https://github.com/rodjek/puppet-lint/pull/733) ([rodjek](https://github.com/rodjek)) - Chaining arrow syntax fix introduces trailing whitespaces [\#708](https://github.com/rodjek/puppet-lint/pull/708) ([rnelson0](https://github.com/rnelson0)) - Plugins: Improve code readability [\#658](https://github.com/rodjek/puppet-lint/pull/658) ([Darhazer](https://github.com/Darhazer)) - Render the ${} enclosures as part of the string tokens [\#752](https://github.com/rodjek/puppet-lint/pull/752) ([rodjek](https://github.com/rodjek)) - Open manifest as binary when writing fixed manifest [\#751](https://github.com/rodjek/puppet-lint/pull/751) ([rodjek](https://github.com/rodjek)) - Take into account Optional data type when checking parameter order [\#731](https://github.com/rodjek/puppet-lint/pull/731) ([rodjek](https://github.com/rodjek)) - Read the manifest files as UTF-8 [\#730](https://github.com/rodjek/puppet-lint/pull/730) ([rodjek](https://github.com/rodjek)) - Improve handling of unterminated double quoted strings [\#728](https://github.com/rodjek/puppet-lint/pull/728) ([rodjek](https://github.com/rodjek)) - Add helper methods to add and remove tokens while maintaining the token links [\#694](https://github.com/rodjek/puppet-lint/pull/694) ([Darhazer](https://github.com/Darhazer)) - Check that arrow is on the line of right operand [\#672](https://github.com/rodjek/puppet-lint/pull/672) ([Darhazer](https://github.com/Darhazer)) - One file per plugin. Fixes \#657 [\#671](https://github.com/rodjek/puppet-lint/pull/671) ([Darhazer](https://github.com/Darhazer)) - Code style improvements [\#661](https://github.com/rodjek/puppet-lint/pull/661) ([Darhazer](https://github.com/Darhazer)) ## [2.3.0](https://github.com/rodjek/puppet-lint/tree/2.3.0) (2017-07-12) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.2.1...2.3.0) **Closed issues:** - Inappropriate =\> Indentation Warning in Hash [\#698](https://github.com/rodjek/puppet-lint/issues/698) - Regression: arrow\_alignment check broken between 2.1.1 and 2.2.x releases when left side contains text after variable interpolation [\#697](https://github.com/rodjek/puppet-lint/issues/697) - Check `arrow_on_right_operand_line` is undocumented. [\#688](https://github.com/rodjek/puppet-lint/issues/688) **Merged pull requests:** - \(maint\) Fixes puppet-lint json formatting to output valid json to stdout [\#719](https://github.com/rodjek/puppet-lint/pull/719) ([bmjen](https://github.com/bmjen)) - Permit puppet-lint to load "prerelease" gems [\#718](https://github.com/rodjek/puppet-lint/pull/718) ([kpaulisse](https://github.com/kpaulisse)) - Document the configuration file better [\#713](https://github.com/rodjek/puppet-lint/pull/713) ([binford2k](https://github.com/binford2k)) - Readme formatting fixes [\#709](https://github.com/rodjek/puppet-lint/pull/709) ([dbeckham](https://github.com/dbeckham)) - Readme edit [\#707](https://github.com/rodjek/puppet-lint/pull/707) ([jbondpdx](https://github.com/jbondpdx)) - Take into account length of DQPOST token when updating column number [\#701](https://github.com/rodjek/puppet-lint/pull/701) ([dbeckham](https://github.com/dbeckham)) - Add pattern support to rake task [\#700](https://github.com/rodjek/puppet-lint/pull/700) ([dbeckham](https://github.com/dbeckham)) - Note arrow\_on\_right\_operand\_line in the README [\#690](https://github.com/rodjek/puppet-lint/pull/690) ([rodjek](https://github.com/rodjek)) ## [2.2.1](https://github.com/rodjek/puppet-lint/tree/2.2.1) (2017-03-29) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.2.0...2.2.1) **Closed issues:** - Error on whitespace with 2.2.0 [\#683](https://github.com/rodjek/puppet-lint/issues/683) - "undefined method `map' for nil:NilClass" when running check\_whitespace [\#681](https://github.com/rodjek/puppet-lint/issues/681) - "undefined method `next\_token='" when fixing with check\_whitespace [\#680](https://github.com/rodjek/puppet-lint/issues/680) - Release 2.2.0 planning and discussion [\#668](https://github.com/rodjek/puppet-lint/issues/668) **Merged pull requests:** - restore the links between tokens after arrow\_on\_right\_operand\_line\#fix [\#684](https://github.com/rodjek/puppet-lint/pull/684) ([rodjek](https://github.com/rodjek)) - level\_tokens\[0\] can be nil if there is no params in the top level block [\#682](https://github.com/rodjek/puppet-lint/pull/682) ([rodjek](https://github.com/rodjek)) ## [2.2.0](https://github.com/rodjek/puppet-lint/tree/2.2.0) (2017-03-29) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.1.1...2.2.0) **Closed issues:** - 2.1.1 git tag [\#652](https://github.com/rodjek/puppet-lint/issues/652) - Quoted boolean triggers on the command 'true' [\#646](https://github.com/rodjek/puppet-lint/issues/646) - Namevars detected as optional parameters [\#633](https://github.com/rodjek/puppet-lint/issues/633) - 'Duplicate Parameter' warning on dynamic class parameter [\#627](https://github.com/rodjek/puppet-lint/issues/627) - arrow\_alignment should only check the alignment of the first arrow on each line [\#609](https://github.com/rodjek/puppet-lint/issues/609) - Top-scope variable warning on inline lambda [\#549](https://github.com/rodjek/puppet-lint/issues/549) - Puppet-lint crash with new puppet 4 syntax [\#516](https://github.com/rodjek/puppet-lint/issues/516) - Top-scope warning when looping though an array of hashes [\#464](https://github.com/rodjek/puppet-lint/issues/464) - Array of hashes one-liner throws a "Indentation of =\> is not properly aligned" [\#446](https://github.com/rodjek/puppet-lint/issues/446) - Missed bad file modes in file with multiple resource bodies [\#663](https://github.com/rodjek/puppet-lint/issues/663) - Provide helper methods to search for specific tokens [\#660](https://github.com/rodjek/puppet-lint/issues/660) - ensure\_first\_param fix can create invalid syntax [\#659](https://github.com/rodjek/puppet-lint/issues/659) - puppet-lint dies with inline\_template syntax [\#656](https://github.com/rodjek/puppet-lint/issues/656) - Variable use like "${$a}" isn't reported as an error and is changed with no message when run with --fix [\#655](https://github.com/rodjek/puppet-lint/issues/655) - Linter gets confused with arrays of hashes [\#654](https://github.com/rodjek/puppet-lint/issues/654) - heredoc throws unhandled exception [\#649](https://github.com/rodjek/puppet-lint/issues/649) - Match function breaks puppet-lint [\#645](https://github.com/rodjek/puppet-lint/issues/645) - top-scope variable being used without an explicit namespace in a string with a lookup [\#635](https://github.com/rodjek/puppet-lint/issues/635) - unquoted file mode & mode should be represented as a 4 digit when file mode is done by a lookup [\#634](https://github.com/rodjek/puppet-lint/issues/634) - double\_quoted\_strings-check issue with escaped character in the string [\#625](https://github.com/rodjek/puppet-lint/issues/625) - unable to disable 140chars check with control comments "block" [\#622](https://github.com/rodjek/puppet-lint/issues/622) - unquoted\_node\_name crash when curly braces missing [\#582](https://github.com/rodjek/puppet-lint/issues/582) - Heredoc triggers exception in arrow\_alignment check [\#578](https://github.com/rodjek/puppet-lint/issues/578) - Each + With = Fake positive top-scope variable detection [\#576](https://github.com/rodjek/puppet-lint/issues/576) - Top-scope variable warning on nested each loops [\#548](https://github.com/rodjek/puppet-lint/issues/548) - `arrow_alignment --fix` doesn't indent keys when introducing line breaks; erroneously reports success [\#506](https://github.com/rodjek/puppet-lint/issues/506) - heredoc escape gives syntax error [\#430](https://github.com/rodjek/puppet-lint/issues/430) - NoMethodError when multiple heredocs are used [\#395](https://github.com/rodjek/puppet-lint/issues/395) **Merged pull requests:** - Support double quoted strings inside interpolated values in double quoted strings [\#676](https://github.com/rodjek/puppet-lint/pull/676) ([rodjek](https://github.com/rodjek)) - Deal with ruby 1.8.7 gem issues [\#630](https://github.com/rodjek/puppet-lint/pull/630) ([mterzo](https://github.com/mterzo)) - Ignore selectors when finding resource type [\#678](https://github.com/rodjek/puppet-lint/pull/678) ([rodjek](https://github.com/rodjek)) - Fix for arrow\_alignment bugs in \#506 [\#677](https://github.com/rodjek/puppet-lint/pull/677) ([rodjek](https://github.com/rodjek)) - Don't silently remove unnecessary $ from enclosed variables [\#674](https://github.com/rodjek/puppet-lint/pull/674) ([rodjek](https://github.com/rodjek)) - Fix ensure\_first\_param fix method to retrieve the full value of the ensure parameter [\#673](https://github.com/rodjek/puppet-lint/pull/673) ([rodjek](https://github.com/rodjek)) - Restrict appveyor testing to Ruby versions that appveyor supports [\#670](https://github.com/rodjek/puppet-lint/pull/670) ([james-stocks](https://github.com/james-stocks)) - Clear expected parameter column after processing each block when checking arrow alignment [\#669](https://github.com/rodjek/puppet-lint/pull/669) ([rodjek](https://github.com/rodjek)) - Allow regexps to used as function arguments [\#665](https://github.com/rodjek/puppet-lint/pull/665) ([rodjek](https://github.com/rodjek)) - Catch unhandled exception and provide debug info for issue [\#664](https://github.com/rodjek/puppet-lint/pull/664) ([rodjek](https://github.com/rodjek)) - Fix showing of a failure [\#662](https://github.com/rodjek/puppet-lint/pull/662) ([Darhazer](https://github.com/Darhazer)) - \(SDK-115\) Enable appveyor testing [\#653](https://github.com/rodjek/puppet-lint/pull/653) ([james-stocks](https://github.com/james-stocks)) - Heredoc support [\#650](https://github.com/rodjek/puppet-lint/pull/650) ([rodjek](https://github.com/rodjek)) - Warn when control comment blocks are not properly terminated [\#648](https://github.com/rodjek/puppet-lint/pull/648) ([rodjek](https://github.com/rodjek)) - Prevent incomplete node blocks from crashing puppet-lint [\#642](https://github.com/rodjek/puppet-lint/pull/642) ([rodjek](https://github.com/rodjek)) - Update the tokeniser to differentiate between unquoted strings and function names [\#640](https://github.com/rodjek/puppet-lint/pull/640) ([rodjek](https://github.com/rodjek)) - Check for escaped backslashes too [\#639](https://github.com/rodjek/puppet-lint/pull/639) ([binford2k](https://github.com/binford2k)) - Correctly handle function calls inside string interpolation [\#638](https://github.com/rodjek/puppet-lint/pull/638) ([hanazuki](https://github.com/hanazuki)) - Correctly handle nested lambdas [\#637](https://github.com/rodjek/puppet-lint/pull/637) ([hanazuki](https://github.com/hanazuki)) - Support for nested multiple-variable assignments [\#636](https://github.com/rodjek/puppet-lint/pull/636) ([hanazuki](https://github.com/hanazuki)) - Add LoadError to fix broken tests [\#631](https://github.com/rodjek/puppet-lint/pull/631) ([davidmogar](https://github.com/davidmogar)) ## [2.1.1](https://github.com/rodjek/puppet-lint/tree/2.1.1) (2017-02-15) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.1.0...2.1.1) **Closed issues:** - False positive detection in double quoted string containing no variables [\#618](https://github.com/rodjek/puppet-lint/issues/618) - Warning and error classification [\#614](https://github.com/rodjek/puppet-lint/issues/614) - Top-scope with multiple assignment using split [\#550](https://github.com/rodjek/puppet-lint/issues/550) - Strange error about indent with comments [\#475](https://github.com/rodjek/puppet-lint/issues/475) - Hash of hashes with long keys causes irrational warnings and crashes --fix [\#424](https://github.com/rodjek/puppet-lint/issues/424) - Wrong arrow alignment when key has interpolated variable [\#416](https://github.com/rodjek/puppet-lint/issues/416) - indentation of =\> is not properly aligned in hash within array [\#333](https://github.com/rodjek/puppet-lint/issues/333) **Merged pull requests:** - Correctly handle strings-with-variables as hash keys in arrow\_alignment check [\#621](https://github.com/rodjek/puppet-lint/pull/621) ([rodjek](https://github.com/rodjek)) - Support array of variables on left side of an assign operation [\#617](https://github.com/rodjek/puppet-lint/pull/617) ([rodjek](https://github.com/rodjek)) - Test against Ruby 2.4.0 [\#616](https://github.com/rodjek/puppet-lint/pull/616) ([rodjek](https://github.com/rodjek)) - Calculate arrow column from first parameter position, not the start of the line [\#615](https://github.com/rodjek/puppet-lint/pull/615) ([rodjek](https://github.com/rodjek)) - Do not test against Ruby 2.2 [\#613](https://github.com/rodjek/puppet-lint/pull/613) ([ghoneycutt](https://github.com/ghoneycutt)) ## [2.1.0](https://github.com/rodjek/puppet-lint/tree/2.1.0) (2016-12-30) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.0.2...2.1.0) **Closed issues:** - Excessive number of warnings from code\_on\_top\_scope [\#579](https://github.com/rodjek/puppet-lint/issues/579) - Syntax error for references starting with Regexp [\#566](https://github.com/rodjek/puppet-lint/issues/566) - Module names must only contain lowercase letters [\#554](https://github.com/rodjek/puppet-lint/issues/554) - Remove formatting with `linenumber` [\#539](https://github.com/rodjek/puppet-lint/issues/539) - names\_containing\_dash is broken and unignorable [\#534](https://github.com/rodjek/puppet-lint/issues/534) - Puppet-lint 2.0 fails on unquoted string starting with underscore. [\#531](https://github.com/rodjek/puppet-lint/issues/531) - puppet-lint reports incorrect line numbers [\#403](https://github.com/rodjek/puppet-lint/issues/403) - Release version 2.1.0 [\#610](https://github.com/rodjek/puppet-lint/issues/610) - incorrect error on inline template [\#545](https://github.com/rodjek/puppet-lint/issues/545) - parameter\_order check does not work default hash is added in parameter [\#544](https://github.com/rodjek/puppet-lint/issues/544) - Incorrect warning of required parameter when using array that includes variable. [\#537](https://github.com/rodjek/puppet-lint/issues/537) - syntax error on valid file when: if /regex/ in array [\#517](https://github.com/rodjek/puppet-lint/issues/517) - crashes if there is a \# line:endignore with no begining. [\#509](https://github.com/rodjek/puppet-lint/issues/509) - Wrong behaviour of variable\_contains\_dash [\#504](https://github.com/rodjek/puppet-lint/issues/504) - Start a CHANGELOG, make updates part of the build workflow [\#479](https://github.com/rodjek/puppet-lint/issues/479) - Nested future scope blocks lose local variables from parent scopes. [\#456](https://github.com/rodjek/puppet-lint/issues/456) - block-local variables \(|$x|\) don't properly get recognized when used as arrays or hashes [\#450](https://github.com/rodjek/puppet-lint/issues/450) **Merged pull requests:** - Ignore \*.pp files at the top level [\#597](https://github.com/rodjek/puppet-lint/pull/597) ([rnelson0](https://github.com/rnelson0)) - Show logs in rspec tests [\#596](https://github.com/rodjek/puppet-lint/pull/596) ([ghoneycutt](https://github.com/ghoneycutt)) - Count lines in comments and double quoted strings [\#577](https://github.com/rodjek/puppet-lint/pull/577) ([paran1](https://github.com/paran1)) - Handle mismatched control comments gracefully [\#573](https://github.com/rodjek/puppet-lint/pull/573) ([rodjek](https://github.com/rodjek)) - Reimplementation of --fix support for unenclosed variables delimited by dashes [\#572](https://github.com/rodjek/puppet-lint/pull/572) ([rodjek](https://github.com/rodjek)) - Anchor the end of the :TYPE token regexp [\#571](https://github.com/rodjek/puppet-lint/pull/571) ([rodjek](https://github.com/rodjek)) - Multi line strings [\#570](https://github.com/rodjek/puppet-lint/pull/570) ([jiuka](https://github.com/jiuka)) - @node\_indexes should be reset too. [\#569](https://github.com/rodjek/puppet-lint/pull/569) ([jiuka](https://github.com/jiuka)) - True up reserved keywords [\#564](https://github.com/rodjek/puppet-lint/pull/564) ([rnelson0](https://github.com/rnelson0)) - Implement a linter for uppercase class names [\#558](https://github.com/rodjek/puppet-lint/pull/558) ([arrdem](https://github.com/arrdem)) - Include --fix usage instructions [\#557](https://github.com/rodjek/puppet-lint/pull/557) ([QuinnyPig](https://github.com/QuinnyPig)) - Updates PR for \#223 [\#552](https://github.com/rodjek/puppet-lint/pull/552) ([binford2k](https://github.com/binford2k)) - Remove formatting with `linenumber` [\#540](https://github.com/rodjek/puppet-lint/pull/540) ([rski](https://github.com/rski)) - Potential README changes [\#420](https://github.com/rodjek/puppet-lint/pull/420) ([rothsa](https://github.com/rothsa)) - Add fix to "ensure found on line but it's not the first attribute" [\#375](https://github.com/rodjek/puppet-lint/pull/375) ([sathieu](https://github.com/sathieu)) - Checks for code outside class/define block [\#223](https://github.com/rodjek/puppet-lint/pull/223) ([dLobatog](https://github.com/dLobatog)) - \(\#369\) Document existence of control comments [\#600](https://github.com/rodjek/puppet-lint/pull/600) ([rnelson0](https://github.com/rnelson0)) - \(\#517\) Update the allowed tokens prior to a regex [\#594](https://github.com/rodjek/puppet-lint/pull/594) ([rnelson0](https://github.com/rnelson0)) - \(\#531\) Treat barewords beginning with an underscore as :NAME tokens [\#593](https://github.com/rodjek/puppet-lint/pull/593) ([rnelson0](https://github.com/rnelson0)) - \(\#544, \#537\) Skip hash contents when checking optional parameters [\#592](https://github.com/rodjek/puppet-lint/pull/592) ([rnelson0](https://github.com/rnelson0)) - \(\#545\) Exempt inline\_epp and inline\_template from single quoted strin… [\#591](https://github.com/rodjek/puppet-lint/pull/591) ([rnelson0](https://github.com/rnelson0)) - Disable code\_on\_top\_scope by default until the noise can be reduced \(… [\#590](https://github.com/rodjek/puppet-lint/pull/590) ([rnelson0](https://github.com/rnelson0)) - Changelog generator task [\#589](https://github.com/rodjek/puppet-lint/pull/589) ([rnelson0](https://github.com/rnelson0)) - Adding support for logging to STDOUT as JSON [\#487](https://github.com/rodjek/puppet-lint/pull/487) ([binford2k](https://github.com/binford2k)) ## [2.0.2](https://github.com/rodjek/puppet-lint/tree/2.0.2) (2016-08-19) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.0.1...2.0.2) **Implemented enhancements:** - Option to choose version of the puppet style guide [\#190](https://github.com/rodjek/puppet-lint/issues/190) **Merged pull requests:** - Revert "Bugfix: properly handling $gronk-$grouik with --fix \(fix \#442\)" [\#535](https://github.com/rodjek/puppet-lint/pull/535) ([rnelson0](https://github.com/rnelson0)) ## [2.0.1](https://github.com/rodjek/puppet-lint/tree/2.0.1) (2016-08-18) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2.0.0...2.0.1) **Implemented enhancements:** - Allow specifying the default enable status of a check [\#484](https://github.com/rodjek/puppet-lint/issues/484) **Closed issues:** - Changelog on Github pages is out of date [\#520](https://github.com/rodjek/puppet-lint/issues/520) - 80char --\> 140char transition incomplete [\#514](https://github.com/rodjek/puppet-lint/issues/514) - ensure\_first\_param-check should not consider hashes [\#512](https://github.com/rodjek/puppet-lint/issues/512) - RFE: Provide a way to selectively disable checks in puppet source [\#508](https://github.com/rodjek/puppet-lint/issues/508) - question: 1.1.0 --\> 2.0.0 new checks [\#499](https://github.com/rodjek/puppet-lint/issues/499) - \[\#puppethack\] disable\_char\_check doesn't work [\#493](https://github.com/rodjek/puppet-lint/issues/493) - Error fixing indent in possion 0 [\#489](https://github.com/rodjek/puppet-lint/issues/489) - Empty lines with trailing whitespace triggers redundant soft tabs error. [\#478](https://github.com/rodjek/puppet-lint/issues/478) - Little problem with =\> when variables are used as key [\#472](https://github.com/rodjek/puppet-lint/issues/472) - Question: using config file, with custom path [\#466](https://github.com/rodjek/puppet-lint/issues/466) - Error: "Variable in single quoted string" or "Double quoted string without variable" - syntax? [\#463](https://github.com/rodjek/puppet-lint/issues/463) - Critical error on Atom initialization [\#460](https://github.com/rodjek/puppet-lint/issues/460) - print warning for code that will result in logging or backups of secrets [\#455](https://github.com/rodjek/puppet-lint/issues/455) - Linter gets upset with Regexp in type [\#452](https://github.com/rodjek/puppet-lint/issues/452) - Single whitespace in file replaced with \[\] [\#444](https://github.com/rodjek/puppet-lint/issues/444) - Time for a new release! [\#443](https://github.com/rodjek/puppet-lint/issues/443) - Bug with --fix and warning "variable not enclosed in {}" [\#442](https://github.com/rodjek/puppet-lint/issues/442) - Linter should not warn about inheriting from params class [\#441](https://github.com/rodjek/puppet-lint/issues/441) - Variable not enclosed in {} AND single quoted string containing a variable [\#434](https://github.com/rodjek/puppet-lint/issues/434) - Quoted string issue due to structured data [\#433](https://github.com/rodjek/puppet-lint/issues/433) - allow for arrow alignment with more than one space before [\#432](https://github.com/rodjek/puppet-lint/issues/432) - 3 digit modes are incorrectly flagged [\#431](https://github.com/rodjek/puppet-lint/issues/431) - url\_without\_modules adding paths? [\#428](https://github.com/rodjek/puppet-lint/issues/428) - Check for unbalanced parenthesis [\#427](https://github.com/rodjek/puppet-lint/issues/427) - puppet-lint crash [\#422](https://github.com/rodjek/puppet-lint/issues/422) - PuppetLint.configuration.ignore\_paths ignored by puppet-lint [\#417](https://github.com/rodjek/puppet-lint/issues/417) - Quoted boolean check should only check values [\#415](https://github.com/rodjek/puppet-lint/issues/415) - tabs before code issue [\#402](https://github.com/rodjek/puppet-lint/issues/402) - Disabled checks aren't actually disabled, output is merely ignored. [\#400](https://github.com/rodjek/puppet-lint/issues/400) - file modes doesn't have to be 4 digit octal [\#394](https://github.com/rodjek/puppet-lint/issues/394) - Option to disable top-scope variable warning for $facts and $trusted hashes [\#382](https://github.com/rodjek/puppet-lint/issues/382) - top-scope variable check incorrectly warning on second parameter in block [\#380](https://github.com/rodjek/puppet-lint/issues/380) - Looking for a tool that shows the output of puppet-lint and rspec-puppet on a screen like jenkins [\#374](https://github.com/rodjek/puppet-lint/issues/374) - Puppet lint should warn on semi colon usage when used without compression [\#367](https://github.com/rodjek/puppet-lint/issues/367) - "indentation of =\> is not properly aligned" and "ensure found on line but it's not the first attribute" weirdness [\#365](https://github.com/rodjek/puppet-lint/issues/365) - Run via jenkins complains about autoload module layout [\#361](https://github.com/rodjek/puppet-lint/issues/361) - Installing gems / puppet-lint may break puppet-enterprise [\#358](https://github.com/rodjek/puppet-lint/issues/358) - Double arrow after "symlink target specified in ensure attr" fix [\#341](https://github.com/rodjek/puppet-lint/issues/341) - "puppet:// URL without modules/" - in the style guide? Custom mount points? [\#307](https://github.com/rodjek/puppet-lint/issues/307) - Autoloader layout test fails inside a \(custom named\) module directory [\#265](https://github.com/rodjek/puppet-lint/issues/265) - Check for trailing comma in last line of a attribute/value list [\#237](https://github.com/rodjek/puppet-lint/issues/237) - Catch code outside of class or define block. [\#220](https://github.com/rodjek/puppet-lint/issues/220) - Catch global code outside of node blocks [\#160](https://github.com/rodjek/puppet-lint/issues/160) - Add a warning for resources outside of a class [\#69](https://github.com/rodjek/puppet-lint/issues/69) - Release a new build, 2.0.1 [\#519](https://github.com/rodjek/puppet-lint/issues/519) - Puppet-Lint 1.1.0 unhandled issue causing exit during -f [\#366](https://github.com/rodjek/puppet-lint/issues/366) **Merged pull requests:** - \(GH462\) Multi-line comments can now be fixed. [\#525](https://github.com/rodjek/puppet-lint/pull/525) ([rnelson0](https://github.com/rnelson0)) - New additions of protected variables [\#524](https://github.com/rodjek/puppet-lint/pull/524) ([rnelson0](https://github.com/rnelson0)) - \(GH366\) Arrow Alignment fix crashes with tabs [\#515](https://github.com/rodjek/puppet-lint/pull/515) ([rnelson0](https://github.com/rnelson0)) - Make params disabled [\#511](https://github.com/rodjek/puppet-lint/pull/511) ([binford2k](https://github.com/binford2k)) - Removing params class check [\#510](https://github.com/rodjek/puppet-lint/pull/510) ([cvquesty](https://github.com/cvquesty)) - Tweak travis a bit for better patterns. [\#505](https://github.com/rodjek/puppet-lint/pull/505) ([rnelson0](https://github.com/rnelson0)) - Bugfix: properly handling $gronk-$grouik with --fix \(fix \#442\) [\#500](https://github.com/rodjek/puppet-lint/pull/500) ([Lucas-C](https://github.com/Lucas-C)) - Improve look of rspec [\#496](https://github.com/rodjek/puppet-lint/pull/496) ([rnelson0](https://github.com/rnelson0)) - This adds a disabled-by-default 80chars check [\#495](https://github.com/rodjek/puppet-lint/pull/495) ([binford2k](https://github.com/binford2k)) - Add better description of the problem in arrow\_alignment check [\#492](https://github.com/rodjek/puppet-lint/pull/492) ([rnelson0](https://github.com/rnelson0)) - \(GH410\) Limit ensure\_first\_param check to certain resources [\#490](https://github.com/rodjek/puppet-lint/pull/490) ([rnelson0](https://github.com/rnelson0)) - Regression from 418: duplicate constant [\#483](https://github.com/rodjek/puppet-lint/pull/483) ([rnelson0](https://github.com/rnelson0)) - Add fully-detailed CHANGELOG [\#481](https://github.com/rodjek/puppet-lint/pull/481) ([petems](https://github.com/petems)) - Add a CHANGELOG [\#480](https://github.com/rodjek/puppet-lint/pull/480) ([rnelson0](https://github.com/rnelson0)) - Add file mode checks for concat module [\#473](https://github.com/rodjek/puppet-lint/pull/473) ([danieljamesscott](https://github.com/danieljamesscott)) - Fix handling of empty code [\#469](https://github.com/rodjek/puppet-lint/pull/469) ([hanazuki](https://github.com/hanazuki)) - Allow regex params for puppet data types [\#468](https://github.com/rodjek/puppet-lint/pull/468) ([thejandroman](https://github.com/thejandroman)) - Support automatic fixing in Rake task as described in README [\#465](https://github.com/rodjek/puppet-lint/pull/465) ([hanazuki](https://github.com/hanazuki)) - Fix double arrow issue when adding target to ensure symlink [\#454](https://github.com/rodjek/puppet-lint/pull/454) ([mterzo](https://github.com/mterzo)) - Add future parser's Puppet Types token type [\#435](https://github.com/rodjek/puppet-lint/pull/435) ([mcanevet](https://github.com/mcanevet)) - Parameters ordering was only checked on defined types [\#429](https://github.com/rodjek/puppet-lint/pull/429) ([ctoa](https://github.com/ctoa)) - Check that variables are lowercase [\#418](https://github.com/rodjek/puppet-lint/pull/418) ([rothsa](https://github.com/rothsa)) ## [2.0.0](https://github.com/rodjek/puppet-lint/tree/2.0.0) (2016-06-22) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/1.1.0...2.0.0) **Closed issues:** - Current package [\#471](https://github.com/rodjek/puppet-lint/issues/471) - Arrow alignment check not working with semicolons in a \(potential\) multiple resources declaration [\#470](https://github.com/rodjek/puppet-lint/issues/470) - puppet-lint --fix ".../puppet-lint/plugins/check\_comments.rb:55:in `block in fix': undefined method `value' for nil:NilClass \(NoMethodError\)" [\#461](https://github.com/rodjek/puppet-lint/issues/461) - WARNING: indentation of =\> is not properly aligned [\#447](https://github.com/rodjek/puppet-lint/issues/447) - Inheritance check [\#436](https://github.com/rodjek/puppet-lint/issues/436) - puppet-lint still checks for lines with more than 80 character [\#425](https://github.com/rodjek/puppet-lint/issues/425) - puppet-lint --help does not work [\#423](https://github.com/rodjek/puppet-lint/issues/423) - Test that "ensure" non-filename attributes are barewords [\#412](https://github.com/rodjek/puppet-lint/issues/412) - crashing puppet-lint 1.1.0 [\#409](https://github.com/rodjek/puppet-lint/issues/409) - Small Documentation Typo [\#408](https://github.com/rodjek/puppet-lint/issues/408) - Create v1.1.1 [\#401](https://github.com/rodjek/puppet-lint/issues/401) - TypeError running on seemingly-sane puppet file [\#399](https://github.com/rodjek/puppet-lint/issues/399) - Warning for line-length should be at 140 chars [\#396](https://github.com/rodjek/puppet-lint/issues/396) - Add fix for puppet\_url\_without\_modules check [\#390](https://github.com/rodjek/puppet-lint/issues/390) - How to disable some fix ? [\#383](https://github.com/rodjek/puppet-lint/issues/383) - indentation of =\> is not properly aligned [\#381](https://github.com/rodjek/puppet-lint/issues/381) - parser error on modulo operator [\#379](https://github.com/rodjek/puppet-lint/issues/379) - Trailing blank lines discarded in PuppetLinter::Data.manifest\_lines [\#378](https://github.com/rodjek/puppet-lint/issues/378) - nasty bug leading to --no-star\_comments-check to not being honored with --fix [\#373](https://github.com/rodjek/puppet-lint/issues/373) - Puppet-lint for EPEL7 [\#372](https://github.com/rodjek/puppet-lint/issues/372) - puppet-lint failure for resource declarations with colons followed by non-whitespaces [\#370](https://github.com/rodjek/puppet-lint/issues/370) - Issue with puppet-lint 1.1.0 binary on lucid [\#364](https://github.com/rodjek/puppet-lint/issues/364) - Immediate action required: custom Pages domain pointed to a legacy IP address [\#363](https://github.com/rodjek/puppet-lint/issues/363) - 1.1.0 ignores trailing white spaces on lines without text [\#359](https://github.com/rodjek/puppet-lint/issues/359) - alignment warning on commented code [\#357](https://github.com/rodjek/puppet-lint/issues/357) - gem missing when installing with Puppet [\#356](https://github.com/rodjek/puppet-lint/issues/356) - --fix ignores control comment\(s\) and fixes anyway [\#347](https://github.com/rodjek/puppet-lint/issues/347) - colon after closing of class causing puppet-lint to crash. [\#344](https://github.com/rodjek/puppet-lint/issues/344) - New problem in unqouted\_node\_name check in 1.1.0 [\#343](https://github.com/rodjek/puppet-lint/issues/343) - whitespace check bug [\#339](https://github.com/rodjek/puppet-lint/issues/339) - 57fd065d0c2c116471cb16afec99631803496659 breaks indentation of =\> check [\#338](https://github.com/rodjek/puppet-lint/issues/338) - Error in Jenkins [\#337](https://github.com/rodjek/puppet-lint/issues/337) - Line numbers in developer tutorial documentation. [\#336](https://github.com/rodjek/puppet-lint/issues/336) - '--relative' option doesn't work with new RakeTask format introduced in 1.1.0 [\#335](https://github.com/rodjek/puppet-lint/issues/335) - Configuring RakeTask does not work anymore [\#331](https://github.com/rodjek/puppet-lint/issues/331) - "indentation of =\> is not properly aligned" for hash inside resource definition [\#327](https://github.com/rodjek/puppet-lint/issues/327) - --fix doesn't change "\$var" to single-quotes [\#313](https://github.com/rodjek/puppet-lint/issues/313) **Merged pull requests:** - \(GH443\) Release 2.0.0 PR [\#477](https://github.com/rodjek/puppet-lint/pull/477) ([rnelson0](https://github.com/rnelson0)) - Fix arrow aligment check in multiple resources declaration [\#476](https://github.com/rodjek/puppet-lint/pull/476) ([wybczu](https://github.com/wybczu)) - Fix issue \#450: block-local variables aren't recognized with subscripts [\#453](https://github.com/rodjek/puppet-lint/pull/453) ([jearls](https://github.com/jearls)) - Changed character width to 140. [\#419](https://github.com/rodjek/puppet-lint/pull/419) ([potto007](https://github.com/potto007)) - Fix arrow\_alignment check to not raise exception when line isn't indented [\#413](https://github.com/rodjek/puppet-lint/pull/413) ([rodjek](https://github.com/rodjek)) - Fix puppet:// url check to catch double quoted strings [\#407](https://github.com/rodjek/puppet-lint/pull/407) ([paulgeringer](https://github.com/paulgeringer)) - Load puppet-lint plugins from Puppet modules [\#404](https://github.com/rodjek/puppet-lint/pull/404) ([raphink](https://github.com/raphink)) - Get ignore\_paths from the configuration [\#397](https://github.com/rodjek/puppet-lint/pull/397) ([lazyfrosch](https://github.com/lazyfrosch)) - Skip checks on empty files [\#393](https://github.com/rodjek/puppet-lint/pull/393) ([vStone](https://github.com/vStone)) - Add the fix functionality to puppet\_url\_without\_modules [\#391](https://github.com/rodjek/puppet-lint/pull/391) ([someword](https://github.com/someword)) - Add various helper functions [\#389](https://github.com/rodjek/puppet-lint/pull/389) ([raphink](https://github.com/raphink)) - Support older 1.8.7 patch numbers Kernel\#caller output [\#387](https://github.com/rodjek/puppet-lint/pull/387) ([rodjek](https://github.com/rodjek)) - Detect trailing whitespace on lines with no code [\#386](https://github.com/rodjek/puppet-lint/pull/386) ([rodjek](https://github.com/rodjek)) - Save the raw value of MLCOMMENT tokens to use when rendering back to a manifest [\#385](https://github.com/rodjek/puppet-lint/pull/385) ([rodjek](https://github.com/rodjek)) - Don't suppress nil values in manifest\_lines [\#384](https://github.com/rodjek/puppet-lint/pull/384) ([rodjek](https://github.com/rodjek)) - Only clear task if it's already defined [\#376](https://github.com/rodjek/puppet-lint/pull/376) ([domcleal](https://github.com/domcleal)) - Nested cases [\#368](https://github.com/rodjek/puppet-lint/pull/368) ([jonnangle](https://github.com/jonnangle)) - rpearce: Allow the use of facts\[\] and trusted\[\] as per Puppet 3.5+ [\#362](https://github.com/rodjek/puppet-lint/pull/362) ([rjpearce](https://github.com/rjpearce)) - Add node\_indexes method [\#351](https://github.com/rodjek/puppet-lint/pull/351) ([mcanevet](https://github.com/mcanevet)) - Don't attempt to fix ignored problems [\#349](https://github.com/rodjek/puppet-lint/pull/349) ([rodjek](https://github.com/rodjek)) - Handle case where a colon is the last token in a file [\#346](https://github.com/rodjek/puppet-lint/pull/346) ([rodjek](https://github.com/rodjek)) - Fix bug in unquoted\_node\_name to support multiple node blocks [\#345](https://github.com/rodjek/puppet-lint/pull/345) ([rodjek](https://github.com/rodjek)) - Catch Errno::EACCES when reading a puppet-lint.rc out of HOME [\#342](https://github.com/rodjek/puppet-lint/pull/342) ([rodjek](https://github.com/rodjek)) - Add support for '--relative' option in new Rake::Task format. [\#334](https://github.com/rodjek/puppet-lint/pull/334) ([fatmcgav](https://github.com/fatmcgav)) - fix \#331 - clear any pre-\(auto-\)existing tasks [\#332](https://github.com/rodjek/puppet-lint/pull/332) ([duritong](https://github.com/duritong)) - Don't warn for arrow alignment for single-element hashes [\#330](https://github.com/rodjek/puppet-lint/pull/330) ([domcleal](https://github.com/domcleal)) - Alternative to \#289: :error on either class names and defines [\#290](https://github.com/rodjek/puppet-lint/pull/290) ([ppp0](https://github.com/ppp0)) ## [1.1.0](https://github.com/rodjek/puppet-lint/tree/1.1.0) (2014-09-23) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/1.0.1...1.1.0) **Closed issues:** - Allow overriding filename for autoloader\_layout [\#316](https://github.com/rodjek/puppet-lint/issues/316) - Alignment warning when =\> are all aligned. [\#309](https://github.com/rodjek/puppet-lint/issues/309) - Run with future parser? [\#306](https://github.com/rodjek/puppet-lint/issues/306) - Pull in variables defined from inherited classes for top\_scope\_variables check [\#304](https://github.com/rodjek/puppet-lint/issues/304) - puppet-lint unqouted\_node\_name only checks \(and fixes\) first entry [\#323](https://github.com/rodjek/puppet-lint/issues/323) - Class param\_tokens on unparameterised class returns function arguments [\#319](https://github.com/rodjek/puppet-lint/issues/319) - Performance on largeish files for 1.0.0 and 1.0.1 is much slower [\#315](https://github.com/rodjek/puppet-lint/issues/315) - Multiple ignores on one line [\#314](https://github.com/rodjek/puppet-lint/issues/314) - --fix doesn't handle multiple "=\>" on the same line properly [\#312](https://github.com/rodjek/puppet-lint/issues/312) - --fix converts "param=\>" to "=\>" [\#311](https://github.com/rodjek/puppet-lint/issues/311) - Make top scope variable check respect metaparameters for defined types [\#310](https://github.com/rodjek/puppet-lint/issues/310) - Installation instructions on front page should include how to install it with puppet [\#308](https://github.com/rodjek/puppet-lint/issues/308) - Make rake task accept optional list of files to check [\#305](https://github.com/rodjek/puppet-lint/issues/305) **Merged pull requests:** - Extend the rake task to support setting configuration options in the block [\#326](https://github.com/rodjek/puppet-lint/pull/326) ([rodjek](https://github.com/rodjek)) - Support multiple commands in a single control comment [\#325](https://github.com/rodjek/puppet-lint/pull/325) ([rodjek](https://github.com/rodjek)) - Support for multiple node names in unquoted\_node\_name [\#324](https://github.com/rodjek/puppet-lint/pull/324) ([rodjek](https://github.com/rodjek)) - Handle multiple parameters on a line when fixing arrow\_alignment problems [\#322](https://github.com/rodjek/puppet-lint/pull/322) ([rodjek](https://github.com/rodjek)) - Support of metaparameter variables in variable\_scope check [\#321](https://github.com/rodjek/puppet-lint/pull/321) ([rodjek](https://github.com/rodjek)) - Don't parse class body when searching for parameter tokens [\#320](https://github.com/rodjek/puppet-lint/pull/320) ([domcleal](https://github.com/domcleal)) - Insert :WHITESPACE token between :NAME and :FARROW if needed [\#318](https://github.com/rodjek/puppet-lint/pull/318) ([rodjek](https://github.com/rodjek)) - Cache parsing state in Lexer rather than recalculating [\#317](https://github.com/rodjek/puppet-lint/pull/317) ([rodjek](https://github.com/rodjek)) ## [1.0.1](https://github.com/rodjek/puppet-lint/tree/1.0.1) (2014-08-20) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/1.0.0...1.0.1) **Closed issues:** - Cut a new release. [\#259](https://github.com/rodjek/puppet-lint/issues/259) - Exception with PE 3.0 [\#231](https://github.com/rodjek/puppet-lint/issues/231) - Puppet-lint should warn on files that do not end with a trailing newline [\#188](https://github.com/rodjek/puppet-lint/issues/188) - Breaks if ressource collector is present [\#301](https://github.com/rodjek/puppet-lint/issues/301) - puppet-lint issues scope warnings for array/hash access [\#291](https://github.com/rodjek/puppet-lint/issues/291) **Merged pull requests:** - Handle empty blocks in arrow\_alignment [\#302](https://github.com/rodjek/puppet-lint/pull/302) ([rodjek](https://github.com/rodjek)) - \[Fixes \#291\] Ignore index braces for scope variables [\#303](https://github.com/rodjek/puppet-lint/pull/303) ([dcarley](https://github.com/dcarley)) ## [1.0.0](https://github.com/rodjek/puppet-lint/tree/1.0.0) (2014-08-18) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.4.0.pre1...1.0.0) **Implemented enhancements:** - Need a way to ignore a lint check for a particular line [\#247](https://github.com/rodjek/puppet-lint/issues/247) - Trailing line comment to disable check [\#214](https://github.com/rodjek/puppet-lint/issues/214) - disable tests on arbitrary lines or over blocks of code [\#68](https://github.com/rodjek/puppet-lint/issues/68) **Closed issues:** - Stop complaining about things unsupported versions of Puppet won't support. [\#281](https://github.com/rodjek/puppet-lint/issues/281) - some ERROR checks shouldn't fire inside comments [\#272](https://github.com/rodjek/puppet-lint/issues/272) - quoted boolean should not trigger off of a variable value in a conditional [\#268](https://github.com/rodjek/puppet-lint/issues/268) - Fails when parsing a Puppet file with Windows line endings on Linux. [\#262](https://github.com/rodjek/puppet-lint/issues/262) - Whitelist variables [\#260](https://github.com/rodjek/puppet-lint/issues/260) - Syntax error not detected [\#257](https://github.com/rodjek/puppet-lint/issues/257) - "\$ escape sequence" throws out puppet lint error [\#256](https://github.com/rodjek/puppet-lint/issues/256) - Incorrect ensure not first attribute warning [\#254](https://github.com/rodjek/puppet-lint/issues/254) - lint task breaks, command line works [\#253](https://github.com/rodjek/puppet-lint/issues/253) - Boolean quotation [\#251](https://github.com/rodjek/puppet-lint/issues/251) - Closing bracket from classes not "linting" [\#250](https://github.com/rodjek/puppet-lint/issues/250) - Node variables being detected as a top-scope variable [\#246](https://github.com/rodjek/puppet-lint/issues/246) - autoloader\_layout test overly dependant on the name of the current directory [\#245](https://github.com/rodjek/puppet-lint/issues/245) - Bamboo plugin published [\#242](https://github.com/rodjek/puppet-lint/issues/242) - puppet-lint says syntax error, puppet parser says ok [\#230](https://github.com/rodjek/puppet-lint/issues/230) - warn when variable or parameter is not used [\#225](https://github.com/rodjek/puppet-lint/issues/225) - Parser fails on arithmetic expressions [\#222](https://github.com/rodjek/puppet-lint/issues/222) - Linting errors should be sent to stderr [\#218](https://github.com/rodjek/puppet-lint/issues/218) - 2 space softabs does not always make sense when aligning array endings [\#213](https://github.com/rodjek/puppet-lint/issues/213) - Ignore cron commands over 80 characters long [\#198](https://github.com/rodjek/puppet-lint/issues/198) - facter fact selinux; WARNING: quoted boolean value found on line [\#197](https://github.com/rodjek/puppet-lint/issues/197) - Recursive check [\#196](https://github.com/rodjek/puppet-lint/issues/196) - emits ERROR when garbage outside the class definition. [\#193](https://github.com/rodjek/puppet-lint/issues/193) - variables\_not\_enclosed sometimes fires where it shouldn't. [\#191](https://github.com/rodjek/puppet-lint/issues/191) - Doesn't detect syntax error [\#187](https://github.com/rodjek/puppet-lint/issues/187) - Puppet-lint doesn't fail on unbalanced curly braces [\#185](https://github.com/rodjek/puppet-lint/issues/185) - Optionally fixing simple stuff instead of complaining [\#162](https://github.com/rodjek/puppet-lint/issues/162) - Feature: Print the name of the file being linted [\#283](https://github.com/rodjek/puppet-lint/issues/283) - Allow specifying a configuration file on the command line [\#267](https://github.com/rodjek/puppet-lint/issues/267) - Future parser loop should allow for inline variable declaration without scoping [\#264](https://github.com/rodjek/puppet-lint/issues/264) - Double Quoted Strings - should allow for strings containing single quotes [\#263](https://github.com/rodjek/puppet-lint/issues/263) - puppet-lint should not warn "string containing only a variable" when it's used to create a hash [\#261](https://github.com/rodjek/puppet-lint/issues/261) - ERROR: Syntax error \(try running `puppet parser validate `\) on line 15 [\#258](https://github.com/rodjek/puppet-lint/issues/258) - Variables in each incorrectly idenentified as top scope. [\#249](https://github.com/rodjek/puppet-lint/issues/249) - puppet-lint -f makes a mess of double-quoted strings that contain single quotes [\#248](https://github.com/rodjek/puppet-lint/issues/248) - Puppetlint should ignore template lines \> 80 characters [\#233](https://github.com/rodjek/puppet-lint/issues/233) - Syntax error when parser future features used [\#232](https://github.com/rodjek/puppet-lint/issues/232) - Issue with puppet-lint -f and trailing whitespace [\#224](https://github.com/rodjek/puppet-lint/issues/224) - escape a variable interpolation to skip checking [\#219](https://github.com/rodjek/puppet-lint/issues/219) - wrong title for \>80char per line check site [\#209](https://github.com/rodjek/puppet-lint/issues/209) - `rake lint` should respect .puppet-lint.rc in root of module [\#202](https://github.com/rodjek/puppet-lint/issues/202) - lint analyzes inlined ruby code [\#201](https://github.com/rodjek/puppet-lint/issues/201) - --with-context causes error [\#200](https://github.com/rodjek/puppet-lint/issues/200) - Different results on Windows and Mac [\#195](https://github.com/rodjek/puppet-lint/issues/195) - Fixing of double quoted strings doesn't escape single quote inside [\#182](https://github.com/rodjek/puppet-lint/issues/182) - Fixing of string with array addressing wrong [\#181](https://github.com/rodjek/puppet-lint/issues/181) - Puppet lint seems to ignore --no-class\_parameter\_defaults-check when inheriting the params class [\#173](https://github.com/rodjek/puppet-lint/issues/173) - Quoting top level variable in class parameter cause false warning [\#170](https://github.com/rodjek/puppet-lint/issues/170) - exec and Bash vars, false-postive "single quoted string containing a variable found on line" [\#113](https://github.com/rodjek/puppet-lint/issues/113) **Merged pull requests:** - explains in README that puppet-lint is not for checking syntax [\#186](https://github.com/rodjek/puppet-lint/pull/186) ([ghoneycutt](https://github.com/ghoneycutt)) - Use the current workdir as reference to calculate the expanded\_path of a filename [\#175](https://github.com/rodjek/puppet-lint/pull/175) ([vStone](https://github.com/vStone)) - Update code documentation [\#298](https://github.com/rodjek/puppet-lint/pull/298) ([rodjek](https://github.com/rodjek)) - Add option to load config from specified file [\#297](https://github.com/rodjek/puppet-lint/pull/297) ([rodjek](https://github.com/rodjek)) - Ensure check methods can't modify tokens array [\#296](https://github.com/rodjek/puppet-lint/pull/296) ([rodjek](https://github.com/rodjek)) - Allow single quoted strings in double quoted strings [\#295](https://github.com/rodjek/puppet-lint/pull/295) ([rodjek](https://github.com/rodjek)) - Move dependency info into gemspec [\#294](https://github.com/rodjek/puppet-lint/pull/294) ([rodjek](https://github.com/rodjek)) - Support future parser loop local scope variables [\#293](https://github.com/rodjek/puppet-lint/pull/293) ([rodjek](https://github.com/rodjek)) - Fix problems after all checks have finished [\#292](https://github.com/rodjek/puppet-lint/pull/292) ([rodjek](https://github.com/rodjek)) - Enable --with-filename by default if checking multiple files [\#287](https://github.com/rodjek/puppet-lint/pull/287) ([rodjek](https://github.com/rodjek)) - Automatically convert multiline comments into many single line comments [\#286](https://github.com/rodjek/puppet-lint/pull/286) ([rodjek](https://github.com/rodjek)) - Move to rspec3 [\#285](https://github.com/rodjek/puppet-lint/pull/285) ([rodjek](https://github.com/rodjek)) - Automatically fix ensure\_not\_symlink\_target problems [\#284](https://github.com/rodjek/puppet-lint/pull/284) ([rodjek](https://github.com/rodjek)) - Allow strings containing only a variable if they're used as hash keys [\#280](https://github.com/rodjek/puppet-lint/pull/280) ([rodjek](https://github.com/rodjek)) - Compressed arrow\_alignment [\#279](https://github.com/rodjek/puppet-lint/pull/279) ([rodjek](https://github.com/rodjek)) - Array ref variables [\#278](https://github.com/rodjek/puppet-lint/pull/278) ([rodjek](https://github.com/rodjek)) - Add docs badge to README [\#277](https://github.com/rodjek/puppet-lint/pull/277) ([rrrene](https://github.com/rrrene)) - Make array refs part of the variable name [\#276](https://github.com/rodjek/puppet-lint/pull/276) ([rodjek](https://github.com/rodjek)) - Don't automatically pad comment content with whitespace [\#275](https://github.com/rodjek/puppet-lint/pull/275) ([rodjek](https://github.com/rodjek)) - Use \#write instead of \#puts when writing fixed manifest [\#274](https://github.com/rodjek/puppet-lint/pull/274) ([rodjek](https://github.com/rodjek)) - Add --fix back to optionparser [\#273](https://github.com/rodjek/puppet-lint/pull/273) ([rodjek](https://github.com/rodjek)) - Initial spike of control comment logic [\#266](https://github.com/rodjek/puppet-lint/pull/266) ([rodjek](https://github.com/rodjek)) - Abort rake on lint error [\#255](https://github.com/rodjek/puppet-lint/pull/255) ([rodjek](https://github.com/rodjek)) - Add --relative command line argument for autoload structure testing [\#252](https://github.com/rodjek/puppet-lint/pull/252) ([ryanuber](https://github.com/ryanuber)) - DRY up the checks [\#244](https://github.com/rodjek/puppet-lint/pull/244) ([rodjek](https://github.com/rodjek)) - Refactor out linenumber in problems [\#243](https://github.com/rodjek/puppet-lint/pull/243) ([rodjek](https://github.com/rodjek)) - Ignore 80chars on lines that have long template\(\) paths [\#241](https://github.com/rodjek/puppet-lint/pull/241) ([rodjek](https://github.com/rodjek)) - Have the rake task read options from .puppet-lint.rc [\#240](https://github.com/rodjek/puppet-lint/pull/240) ([rodjek](https://github.com/rodjek)) - Support pipe char \(used in the "future" parser\) [\#239](https://github.com/rodjek/puppet-lint/pull/239) ([rodjek](https://github.com/rodjek)) - Rejig tests [\#238](https://github.com/rodjek/puppet-lint/pull/238) ([rodjek](https://github.com/rodjek)) - Allow double quotes for puppet supported escape sequences [\#234](https://github.com/rodjek/puppet-lint/pull/234) ([xarses](https://github.com/xarses)) - Allow specifying a list of checks that should run [\#228](https://github.com/rodjek/puppet-lint/pull/228) ([rodjek](https://github.com/rodjek)) - Split checking and reporting logic [\#227](https://github.com/rodjek/puppet-lint/pull/227) ([rodjek](https://github.com/rodjek)) - Refactor check plugins to have slightly less awful magic [\#226](https://github.com/rodjek/puppet-lint/pull/226) ([rodjek](https://github.com/rodjek)) - Add %{column} to help text of --log-format [\#221](https://github.com/rodjek/puppet-lint/pull/221) ([bdd](https://github.com/bdd)) - Bad hash indenting with --fix where members declared on a single line [\#217](https://github.com/rodjek/puppet-lint/pull/217) ([aelse](https://github.com/aelse)) - Handle variables with array & hash references [\#212](https://github.com/rodjek/puppet-lint/pull/212) ([rodjek](https://github.com/rodjek)) - Add Modulo token [\#207](https://github.com/rodjek/puppet-lint/pull/207) ([dalen](https://github.com/dalen)) - incorrect top-scope variable warning for define [\#205](https://github.com/rodjek/puppet-lint/pull/205) ([blalor](https://github.com/blalor)) - --fix doesn't modify my file [\#203](https://github.com/rodjek/puppet-lint/pull/203) ([BillWeiss](https://github.com/BillWeiss)) - Don't warn about 'mode' format when it's an 'audit' value [\#199](https://github.com/rodjek/puppet-lint/pull/199) ([bitfield](https://github.com/bitfield)) - Doesn't recognize paramater containing default value if value is double quoted. [\#194](https://github.com/rodjek/puppet-lint/pull/194) ([jcray](https://github.com/jcray)) - Running with --fix deletes all code for files containing invalid syntax [\#184](https://github.com/rodjek/puppet-lint/pull/184) ([devicenull](https://github.com/devicenull)) - Puppet-lint fails to handle mac line endings [\#183](https://github.com/rodjek/puppet-lint/pull/183) ([devicenull](https://github.com/devicenull)) - Lone dollar sign should not be removed [\#180](https://github.com/rodjek/puppet-lint/pull/180) ([Seldaek](https://github.com/Seldaek)) - Warn about unquoted node names [\#177](https://github.com/rodjek/puppet-lint/pull/177) ([bitfield](https://github.com/bitfield)) - Fix the check\_classes check for certain cases. [\#176](https://github.com/rodjek/puppet-lint/pull/176) ([vStone](https://github.com/vStone)) - Invalid warning about mandatory class parameters without defaults [\#167](https://github.com/rodjek/puppet-lint/pull/167) ([svend](https://github.com/svend)) - Add check for puppet:/// URIs without modules/ [\#166](https://github.com/rodjek/puppet-lint/pull/166) ([rodjek](https://github.com/rodjek)) ## [0.4.0.pre1](https://github.com/rodjek/puppet-lint/tree/0.4.0.pre1) (2013-01-28) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.3.2...0.4.0.pre1) **Closed issues:** - error installing puppet-lint [\#172](https://github.com/rodjek/puppet-lint/issues/172) - puppet-lint seems to miss obvious syntax error [\#171](https://github.com/rodjek/puppet-lint/issues/171) - ERROR with file containing DOS EOL character [\#165](https://github.com/rodjek/puppet-lint/issues/165) - ssh key parameter will always be longer than 80 chars [\#70](https://github.com/rodjek/puppet-lint/issues/70) **Merged pull requests:** - Fix where . is located in docs [\#169](https://github.com/rodjek/puppet-lint/pull/169) ([gmjosack](https://github.com/gmjosack)) - Update README.md [\#168](https://github.com/rodjek/puppet-lint/pull/168) ([levpaul](https://github.com/levpaul)) ## [0.3.2](https://github.com/rodjek/puppet-lint/tree/0.3.2) (2012-10-19) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.3.1...0.3.2) **Closed issues:** - Check "string containing only a variable" performs invalid suggestion. [\#164](https://github.com/rodjek/puppet-lint/issues/164) - puppet-lint/lexer.rb:184:in `tokenise': ' } \(PuppetLint::LexerError\) on Ruby 1.8.7 [\#161](https://github.com/rodjek/puppet-lint/issues/161) - Warning for 'more than 80 characters on line' is not catching all instances [\#159](https://github.com/rodjek/puppet-lint/issues/159) - captilised variables error on puppet not with lint [\#158](https://github.com/rodjek/puppet-lint/issues/158) - warning for 'class param without default' is not catching all instances in a file [\#157](https://github.com/rodjek/puppet-lint/issues/157) - puppet-lint crashes if HOME environment is not set [\#156](https://github.com/rodjek/puppet-lint/issues/156) - String monkeypatch breaks Facter under Ruby 1.8 [\#154](https://github.com/rodjek/puppet-lint/issues/154) - Crash on string with \\ and variable [\#152](https://github.com/rodjek/puppet-lint/issues/152) **Merged pull requests:** - \(\#152\) Fix crash on string with \\ and variable [\#163](https://github.com/rodjek/puppet-lint/pull/163) ([dalen](https://github.com/dalen)) - fixes \#154 string monkeypatch failure [\#155](https://github.com/rodjek/puppet-lint/pull/155) ([vStone](https://github.com/vStone)) ## [0.3.1](https://github.com/rodjek/puppet-lint/tree/0.3.1) (2012-09-26) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.3.0...0.3.1) **Closed issues:** - class\_inherits\_from\_params\_class throws exception in 0.3.0 [\#150](https://github.com/rodjek/puppet-lint/issues/150) **Merged pull requests:** - Fixes \#150 class inherits from params class exception [\#151](https://github.com/rodjek/puppet-lint/pull/151) ([vStone](https://github.com/vStone)) ## [0.3.0](https://github.com/rodjek/puppet-lint/tree/0.3.0) (2012-09-25) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.2.1...0.3.0) **Implemented enhancements:** - Provide context for the problems [\#130](https://github.com/rodjek/puppet-lint/issues/130) **Closed issues:** - False positive unquoted resource title for colons in resource parameters [\#146](https://github.com/rodjek/puppet-lint/issues/146) - should exit with non 0 exit code on error [\#140](https://github.com/rodjek/puppet-lint/issues/140) - using fully qualified class names in inheritance is wrongly reported as inheritance across namespaces [\#148](https://github.com/rodjek/puppet-lint/issues/148) - False positive on duplicate parameter checks [\#145](https://github.com/rodjek/puppet-lint/issues/145) - Crash on \\ at end of single quoted string [\#144](https://github.com/rodjek/puppet-lint/issues/144) - Strings ending in backslash cause exceptions [\#142](https://github.com/rodjek/puppet-lint/issues/142) - --no-class\_parameter\_defaults-check [\#139](https://github.com/rodjek/puppet-lint/issues/139) **Merged pull requests:** - Fixes \#145: False positive on duplicate parameter. [\#147](https://github.com/rodjek/puppet-lint/pull/147) ([vStone](https://github.com/vStone)) - Pass exit value to the shell [\#141](https://github.com/rodjek/puppet-lint/pull/141) ([vStone](https://github.com/vStone)) - \(\#148\) Allow class inheritance within the same module [\#149](https://github.com/rodjek/puppet-lint/pull/149) ([dcarley](https://github.com/dcarley)) - use .puppet-lint.rc, as .puppet-lintrc is deprecated [\#143](https://github.com/rodjek/puppet-lint/pull/143) ([ghoneycutt](https://github.com/ghoneycutt)) ## [0.2.1](https://github.com/rodjek/puppet-lint/tree/0.2.1) (2012-08-27) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.2.0...0.2.1) **Closed issues:** - Rake task breaks in 0.2.0 [\#138](https://github.com/rodjek/puppet-lint/issues/138) - False warning : parameterised class parameter without a default value [\#137](https://github.com/rodjek/puppet-lint/issues/137) ## [0.2.0](https://github.com/rodjek/puppet-lint/tree/0.2.0) (2012-08-23) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.2.0.pre1...0.2.0) **Implemented enhancements:** - Variables standing by themselves should not be quoted [\#20](https://github.com/rodjek/puppet-lint/issues/20) - write class\_parameter\_defaults check [\#134](https://github.com/rodjek/puppet-lint/issues/134) - duplicate parameter detection [\#122](https://github.com/rodjek/puppet-lint/issues/122) **Closed issues:** - `require': iconv will be deprecated in the future, use String\#encode instead. [\#133](https://github.com/rodjek/puppet-lint/issues/133) - False positive in "optional parameter listed before required parameter"? [\#126](https://github.com/rodjek/puppet-lint/issues/126) - There's a puppet-lint 0.13.1 gem on rubygems.org but no 0.13.1 tag here [\#99](https://github.com/rodjek/puppet-lint/issues/99) - Introduce a way to tweak warning/error level for checks [\#91](https://github.com/rodjek/puppet-lint/issues/91) - Didn't pick up $ipaddress\_bond0 as a fact [\#61](https://github.com/rodjek/puppet-lint/issues/61) - False positive when using function call for parameter default [\#132](https://github.com/rodjek/puppet-lint/issues/132) - Fix up the website [\#131](https://github.com/rodjek/puppet-lint/issues/131) - Linked list style functionality for tokens [\#129](https://github.com/rodjek/puppet-lint/issues/129) - False positive unquoted resource title in case statements [\#128](https://github.com/rodjek/puppet-lint/issues/128) - Crash on arrow alignment check [\#127](https://github.com/rodjek/puppet-lint/issues/127) - Does not work on ruby 1.9.3 [\#120](https://github.com/rodjek/puppet-lint/issues/120) - Bad class format causes exception [\#118](https://github.com/rodjek/puppet-lint/issues/118) - case statement in inline\_template false warning [\#117](https://github.com/rodjek/puppet-lint/issues/117) - False warning with puppet-lint-0.2 [\#116](https://github.com/rodjek/puppet-lint/issues/116) - :lint rake tasks should not print "Evaluating" lines [\#114](https://github.com/rodjek/puppet-lint/issues/114) - when content is specified directly, double quotes are needed to get newlines [\#109](https://github.com/rodjek/puppet-lint/issues/109) - Incorrect variable count in string parsing [\#104](https://github.com/rodjek/puppet-lint/issues/104) - misparses empty hash in defined resource prototype [\#101](https://github.com/rodjek/puppet-lint/issues/101) - Allow file modes to be 'undef' [\#100](https://github.com/rodjek/puppet-lint/issues/100) - Arrow alignment check shouldn't span over several resources [\#78](https://github.com/rodjek/puppet-lint/issues/78) - Ignore commented lines for arrow alignment [\#77](https://github.com/rodjek/puppet-lint/issues/77) - /etc/puppet-lint.rc please! [\#71](https://github.com/rodjek/puppet-lint/issues/71) - checking of correct docs format [\#59](https://github.com/rodjek/puppet-lint/issues/59) - Multiline string should not be checked for double quotes [\#51](https://github.com/rodjek/puppet-lint/issues/51) ## [0.2.0.pre1](https://github.com/rodjek/puppet-lint/tree/0.2.0.pre1) (2012-07-11) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.13...0.2.0.pre1) **Closed issues:** - Getting double quote warning with Augeas [\#111](https://github.com/rodjek/puppet-lint/issues/111) - NoMethodError with Ruby 1.9.2 [\#103](https://github.com/rodjek/puppet-lint/issues/103) - new to the lint [\#97](https://github.com/rodjek/puppet-lint/issues/97) - inline\_templates only evaluate in double quotes, yet lint warns of no vars. [\#94](https://github.com/rodjek/puppet-lint/issues/94) - Stop duplicate output [\#93](https://github.com/rodjek/puppet-lint/issues/93) - add noop to variables\_in\_scope list [\#92](https://github.com/rodjek/puppet-lint/issues/92) - Can't handle single quotes? \(slurpstring\) [\#90](https://github.com/rodjek/puppet-lint/issues/90) - Detect missing commas [\#89](https://github.com/rodjek/puppet-lint/issues/89) - Weird \(probably UTF-8\) problem gives false positives on 80char limit. [\#84](https://github.com/rodjek/puppet-lint/issues/84) - Autoload module check and JenkinsCI [\#83](https://github.com/rodjek/puppet-lint/issues/83) - "Should align arrows within blocks of attributes" check doesn't seem to work [\#75](https://github.com/rodjek/puppet-lint/issues/75) - puppet-lintrc is ignored when running "rake lint" [\#74](https://github.com/rodjek/puppet-lint/issues/74) - docs mention --disable-XXX, should be --no-XXX [\#73](https://github.com/rodjek/puppet-lint/issues/73) - Added support for detecting bad string interpolation [\#40](https://github.com/rodjek/puppet-lint/issues/40) **Merged pull requests:** - Make rake task respect PuppetLint.configuration.fail\_on\_warnings [\#115](https://github.com/rodjek/puppet-lint/pull/115) ([wfarr](https://github.com/wfarr)) - fixes spelling and typo errors in README [\#112](https://github.com/rodjek/puppet-lint/pull/112) ([ghoneycutt](https://github.com/ghoneycutt)) - This fixes the build on Travis CI for ruby1.9 [\#110](https://github.com/rodjek/puppet-lint/pull/110) ([vStone](https://github.com/vStone)) - Fix utf8 char issues: see bug \#84 [\#108](https://github.com/rodjek/puppet-lint/pull/108) ([vStone](https://github.com/vStone)) - Add support for ignoring certain globs in the rake task [\#106](https://github.com/rodjek/puppet-lint/pull/106) ([wfarr](https://github.com/wfarr)) - Fix bug introduced in \#81 [\#98](https://github.com/rodjek/puppet-lint/pull/98) ([deizel](https://github.com/deizel)) - Fixup the variable not enclosed in {} test [\#66](https://github.com/rodjek/puppet-lint/pull/66) ([richardc](https://github.com/richardc)) ## [0.1.13](https://github.com/rodjek/puppet-lint/tree/0.1.13) (2012-03-26) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.12...0.1.13) **Closed issues:** - Getting `warning: class variable access from toplevel` with bundler [\#85](https://github.com/rodjek/puppet-lint/issues/85) - Suppress "string containing only a variable" warnings on defines? [\#79](https://github.com/rodjek/puppet-lint/issues/79) - puppet-lint equivalent to rakefile's require 'puppet-lint/tasks/puppet-lint' [\#72](https://github.com/rodjek/puppet-lint/issues/72) - Support symbolic file modes for \>= 2.7.10 [\#60](https://github.com/rodjek/puppet-lint/issues/60) **Merged pull requests:** - Update readme to reflect the current names of the flags for disabling checks [\#88](https://github.com/rodjek/puppet-lint/pull/88) ([garethr](https://github.com/garethr)) - Add additional puppet variables. [\#82](https://github.com/rodjek/puppet-lint/pull/82) ([nanliu](https://github.com/nanliu)) - Add support run puppet-lint on directory. [\#81](https://github.com/rodjek/puppet-lint/pull/81) ([nanliu](https://github.com/nanliu)) - Update travis support for multiple puppet version. [\#80](https://github.com/rodjek/puppet-lint/pull/80) ([nanliu](https://github.com/nanliu)) - Find booleans in double quoted strings [\#67](https://github.com/rodjek/puppet-lint/pull/67) ([richardc](https://github.com/richardc)) - Feature/symbolic filemodes \(cfr ticket \#60\) [\#62](https://github.com/rodjek/puppet-lint/pull/62) ([vStone](https://github.com/vStone)) ## [0.1.12](https://github.com/rodjek/puppet-lint/tree/0.1.12) (2012-01-27) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.11...0.1.12) **Closed issues:** - ssh\_key can't be broken up by \ [\#58](https://github.com/rodjek/puppet-lint/issues/58) - Autoload module check doesn't seem to work [\#57](https://github.com/rodjek/puppet-lint/issues/57) - included parameterized classes check does not work [\#56](https://github.com/rodjek/puppet-lint/issues/56) - invalid quoted string warning on resource titles [\#44](https://github.com/rodjek/puppet-lint/issues/44) - turn off particular tests? .puppet-lintrc? [\#34](https://github.com/rodjek/puppet-lint/issues/34) ## [0.1.11](https://github.com/rodjek/puppet-lint/tree/0.1.11) (2012-01-11) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.10...0.1.11) ## [0.1.10](https://github.com/rodjek/puppet-lint/tree/0.1.10) (2012-01-11) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.9...0.1.10) **Closed issues:** - Alert when more than one class/define is present in a .pp file [\#54](https://github.com/rodjek/puppet-lint/issues/54) - Invalid top-scope variable warning in definitions. [\#50](https://github.com/rodjek/puppet-lint/issues/50) - Regex capture variables [\#49](https://github.com/rodjek/puppet-lint/issues/49) **Merged pull requests:** - Feature/unified problems [\#52](https://github.com/rodjek/puppet-lint/pull/52) ([vStone](https://github.com/vStone)) ## [0.1.9](https://github.com/rodjek/puppet-lint/tree/0.1.9) (2011-12-27) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.8...0.1.9) **Merged pull requests:** - Consolidated option checking logic [\#48](https://github.com/rodjek/puppet-lint/pull/48) ([jamtur01](https://github.com/jamtur01)) ## [0.1.8](https://github.com/rodjek/puppet-lint/tree/0.1.8) (2011-12-27) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.7...0.1.8) **Closed issues:** - Add option to control which error level is returned [\#45](https://github.com/rodjek/puppet-lint/issues/45) - "false" != false \(ditto for true\) [\#43](https://github.com/rodjek/puppet-lint/issues/43) - Facter variables are seen as unnamespaced top-level variables [\#42](https://github.com/rodjek/puppet-lint/issues/42) - WARNING: =\> on line 13 isn't aligned with the previous line [\#37](https://github.com/rodjek/puppet-lint/issues/37) - single quotes in a manifest causes an exception [\#36](https://github.com/rodjek/puppet-lint/issues/36) - Invalid "optional parameter listed before required parameter" warning. [\#35](https://github.com/rodjek/puppet-lint/issues/35) - Resource types containing only a variable [\#30](https://github.com/rodjek/puppet-lint/issues/30) **Merged pull requests:** - \[\#9\] add stack to allow nested hashes [\#47](https://github.com/rodjek/puppet-lint/pull/47) ([zsprackett](https://github.com/zsprackett)) - Fixed \#45 - Added selective error level reporting [\#46](https://github.com/rodjek/puppet-lint/pull/46) ([jamtur01](https://github.com/jamtur01)) - Added check for dashes in variables [\#41](https://github.com/rodjek/puppet-lint/pull/41) ([jamtur01](https://github.com/jamtur01)) - Add filename as first test\(\) argument so plugins can use that too [\#39](https://github.com/rodjek/puppet-lint/pull/39) ([vStone](https://github.com/vStone)) ## [0.1.7](https://github.com/rodjek/puppet-lint/tree/0.1.7) (2011-10-18) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.4...0.1.7) **Closed issues:** - missing dependency on "puppet" gem [\#33](https://github.com/rodjek/puppet-lint/issues/33) - "class defined inside a class" even when class is a resource \(parameterized Class\) [\#32](https://github.com/rodjek/puppet-lint/issues/32) - Classes inside classes should be allowed when order matters [\#31](https://github.com/rodjek/puppet-lint/issues/31) - doesn't work...at all [\#29](https://github.com/rodjek/puppet-lint/issues/29) - "mode should be represented as a 4 digit octal value" when variable [\#28](https://github.com/rodjek/puppet-lint/issues/28) ## [0.1.4](https://github.com/rodjek/puppet-lint/tree/0.1.4) (2011-09-09) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.3...0.1.4) **Closed issues:** - String containing escape char \(and no var\) incorrectly flagged [\#26](https://github.com/rodjek/puppet-lint/issues/26) - False alignment positives [\#21](https://github.com/rodjek/puppet-lint/issues/21) ## [0.1.3](https://github.com/rodjek/puppet-lint/tree/0.1.3) (2011-09-09) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.2...0.1.3) ## [0.1.2](https://github.com/rodjek/puppet-lint/tree/0.1.2) (2011-09-09) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.1...0.1.2) **Closed issues:** - double quote within single quote [\#24](https://github.com/rodjek/puppet-lint/issues/24) - False positive in commented line [\#22](https://github.com/rodjek/puppet-lint/issues/22) ## [0.1.1](https://github.com/rodjek/puppet-lint/tree/0.1.1) (2011-09-07) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.1.0...0.1.1) **Closed issues:** - $name is detected as a top-scope variable [\#23](https://github.com/rodjek/puppet-lint/issues/23) - Not detecting comma and semicolon being mixed up [\#13](https://github.com/rodjek/puppet-lint/issues/13) ## [0.1.0](https://github.com/rodjek/puppet-lint/tree/0.1.0) (2011-08-23) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.0.7...0.1.0) **Implemented enhancements:** - display order of class/define parameters [\#19](https://github.com/rodjek/puppet-lint/issues/19) - class inheritance [\#18](https://github.com/rodjek/puppet-lint/issues/18) - classes and defined types within classes [\#17](https://github.com/rodjek/puppet-lint/issues/17) - relationship declarations [\#16](https://github.com/rodjek/puppet-lint/issues/16) - defaults for case statements and selectors [\#15](https://github.com/rodjek/puppet-lint/issues/15) - namespacing variables [\#14](https://github.com/rodjek/puppet-lint/issues/14) **Closed issues:** - =\> alignment warnings in selectors is broken [\#11](https://github.com/rodjek/puppet-lint/issues/11) ## [0.0.7](https://github.com/rodjek/puppet-lint/tree/0.0.7) (2011-08-21) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.0.6...0.0.7) ## [0.0.6](https://github.com/rodjek/puppet-lint/tree/0.0.6) (2011-08-19) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.0.5...0.0.6) **Implemented enhancements:** - Please add logic to the \>80 chars check [\#12](https://github.com/rodjek/puppet-lint/issues/12) ## [0.0.5](https://github.com/rodjek/puppet-lint/tree/0.0.5) (2011-08-19) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.0.4...0.0.5) **Closed issues:** - When ensure is the only attribute it is the first one too. [\#10](https://github.com/rodjek/puppet-lint/issues/10) - Shell commands with curly brackets \(e.g. awk\) [\#9](https://github.com/rodjek/puppet-lint/issues/9) - "single quoted string containing a variable" should check for nested quotes [\#7](https://github.com/rodjek/puppet-lint/issues/7) ## [0.0.4](https://github.com/rodjek/puppet-lint/tree/0.0.4) (2011-08-18) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.0.3...0.0.4) **Closed issues:** - "ensure is not the first attribute" does not check for aggregated resources [\#8](https://github.com/rodjek/puppet-lint/issues/8) - Square brackets trigger "WARNING: unquoted resource title" [\#5](https://github.com/rodjek/puppet-lint/issues/5) - Nasty stacktrace when trying to run lint against a non existance file [\#4](https://github.com/rodjek/puppet-lint/issues/4) ## [0.0.3](https://github.com/rodjek/puppet-lint/tree/0.0.3) (2011-08-17) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.0.2...0.0.3) **Closed issues:** - Invalid "ensure is not the first attribute" [\#3](https://github.com/rodjek/puppet-lint/issues/3) - Empty variables break check\_strings plugin [\#2](https://github.com/rodjek/puppet-lint/issues/2) ## [0.0.2](https://github.com/rodjek/puppet-lint/tree/0.0.2) (2011-08-17) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/0.0.1...0.0.2) **Merged pull requests:** - Here, have some Rake support [\#1](https://github.com/rodjek/puppet-lint/pull/1) ([builddoctor](https://github.com/builddoctor)) ## [0.0.1](https://github.com/rodjek/puppet-lint/tree/0.0.1) (2011-08-15) [Full Changelog](https://github.com/rodjek/puppet-lint/compare/2dd42b803a4dfc3a2398a509d26f285c9427ba41...0.0.1) \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* puppetlabs-puppet-lint-f1a29d8/LICENSE000066400000000000000000000020361510314671100175750ustar00rootroot00000000000000Copyright (c) 2011 Tim Sharpe Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. puppetlabs-puppet-lint-f1a29d8/README.md000066400000000000000000000335321510314671100200540ustar00rootroot00000000000000# Puppet Lint [![Code Owners](https://img.shields.io/badge/owners-DevX--team-blue)](https://github.com/puppetlabs/puppet-lint/blob/main/CODEOWNERS) ![ci](https://github.com/puppetlabs/puppet-lint/actions/workflows/ci.yml/badge.svg) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/puppetlabs/puppet-lint) Puppet Lint tests Puppet code against the recommended [Puppet language style guide](http://puppet.com/docs/puppet/latest/style_guide.html). Puppet Lint validates only code style; it does not validate syntax. To test syntax, use Puppet's `puppet parser validate` command. ## Compatibility warning This tool is only supported on Puppet 7 & 8 environments. In cases where Puppet Lint is required in an environment with Puppet 6, we recommend pinning to version 2.5.2. ## Installation Install the Puppet Lint gem by running: ``` gem install puppet-lint ``` ## Testing with Puppet Lint To test manifests for correct Puppet style, run the `puppet-lint` command with the path to the files you want to test. For example: ``` puppet-lint ~/modules/puppetlabs-java/manifests/init.pp ``` ``` puppet-lint ~/modules/puppetlabs-mysql/manifests ``` ### Fix issues automatically To instruct Lint to automatically fix any issues that it detects, use the `--fix` flag: ``` puppet-lint --fix /modules ``` Note: The auto-fix functionality is available for Puppet manifest files only. ### Modify which checks to run Puppet Lint options allow you to modify which checks to run. You can disable any of the checks temporarily or permanently, or you can limit testing to specific checks. #### List all available checks To list all available checks along with basic usage documentation, use the `--list-checks` option. #### Run specific checks To run only specific checks, use the `--only-checks` option, with a comma-separated list of arguments specifying which checks to make: ``` puppet-lint --only-checks trailing_whitespace,140chars modules/ ``` To avoid enormous patch sets when using the `--fix` flag, use the `--only-checks` option to limit which checks Puppet Lint makes: ``` puppet-lint --only-checks trailing_whitespace --fix modules/ ``` ### Disable Lint checks You can disable specific Lint checks on the command line, disable them permanently with a configuration file, or disable them with control comments within your Puppet code. #### Disable checks on the command line To disable any of the checks when running the `puppet-lint` command, add a `--no--check` flag to the command. For example, to skip the 140-character check, run: ``` puppet-lint --no-140chars-check modules/ ``` #### Disable checks within Puppet code To disable checks from within your Puppet code itself, use [control comments](http://puppet-lint.com/controlcomments/). Disable checks on either a per-line or per-block basis using `#lint:ignore:`. For example: ```puppet class foo { $bar = 'bar' # This ignores the double_quoted_strings check over multiple lines # lint:ignore:double_quoted_strings $baz = "baz" $gronk = "gronk" # lint:endignore # This ignores the 140chars check on a single line $this_line_has_a_really_long_name_and_value_that_is_much_longer_than_the_style_guide_recommends = "I mean, a really, really long line like you can't believe" # lint:ignore:140chars } ``` ## Configuration file Each time Puppet Lint starts up, it loads configuration from three files in order: 1. `/etc/puppet-lint.rc` 1. `~/.puppet-lint.rc` 1. `.puppet-lint.rc` This means that a flag in the local `.puppet-lint.rc` will take precedence over a flag in the global `/etc/puppet-lint.rc`, for example. Flags specified on the command line take final precedence and override all config file options. Any flag that can be specified on the command line can also be specified in the configuration file. For example, to always skip the hard tab character check, create `~/.puppet-lint.rc` and include the line: ``` --no-hard_tabs-check ``` Or to specify an allowlist of allowed checks, include a line like: ``` --only-checks=trailing_whitespace,hard_tabs,duplicate_params,double_quoted_strings,unquoted_file_mode,only_variable_string,variables_not_enclosed,single_quote_string_with_variables,variable_contains_dash,ensure_not_symlink_target,unquoted_resource_title,relative_classname_inclusion,file_mode,resource_reference_without_title_capital,leading_zero,arrow_alignment,space_before_arrow,variable_is_lowercase,ensure_first_param,resource_reference_without_whitespace,file_ensure,trailing_comma,leading_zero ``` Please note that there is an important difference between reading options from the command line and reading options from a configuration file: In the former case the shell interprets one level of quotes. That does not happen in the latter case. So, it would make sense to quote some configuration values on the command line, like so: ``` $ puppet-lint --ignore-paths 'modules/stdlib/*' modules/ ``` When reading from a configuration file those quotes would be passed on to the option parser -- probably not giving the expected result. Instead the line should read ``` --ignore-paths=modules/stdlib/* ``` ## Testing with Puppet Lint as a Rake task To test your entire Puppet manifest directory, add `require 'puppet-lint/tasks/puppet-lint'` to your Rakefile and then run: ``` rake lint ``` To modify the default behaviour of the Rake task, modify the Puppet Lint configuration by defining the task yourself. For example: ```ruby PuppetLint::RakeTask.new :lint do |config| # Pattern of files to check, defaults to `**/*.pp` config.pattern = 'modules' # Pattern of files to ignore config.ignore_paths = ['modules/apt', 'modules/stdlib'] # List of checks to disable config.disable_checks = ['documentation', '140chars'] # Should puppet-lint prefix it's output with the file being checked, # defaults to true config.with_filename = false # Should the task fail if there were any warnings, defaults to false config.fail_on_warnings = true # Format string for puppet-lint's output (see the puppet-lint help output # for details config.log_format = '%{filename} - %{message}' # Print out the context for the problem, defaults to false config.with_context = true # Enable automatic fixing of problems, defaults to false config.fix = true # Show ignored problems in the output, defaults to false config.show_ignored = true # Compare module layout relative to the module root config.relative = true end ``` ### Disable checks in the Lint Rake task You can also disable checks when running Puppet Lint through the supplied Rake task by modifying your `Rakefile`. * To disable a check, add the following line after the `require` statement in your `Rakefile`: ```ruby PuppetLint.configuration.send("disable_") ``` For example, to disable the 140-character check, add: ```ruby PuppetLint.configuration.send("disable_140chars") ``` * To set the Lint Rake task to ignore certain paths: ```ruby PuppetLint.configuration.ignore_paths = ["vendor/**/*.pp"] ``` * To set a pattern of files that Lint should check: ```ruby # Defaults to `**/*.pp` PuppetLint.configuration.pattern = "modules" ``` ## Testing with Puppet Lint as a GitHub Action There is a GitHub Actions action available to get linter feedback in workflows: * [puppet-lint-action](https://github.com/marketplace/actions/puppet-lint-action) ## Integration with GitLab Code Quality [GitLab](https://gitlab.com/) users can use the `--codeclimate-report-file` configuration option to generate a report for use with the [Code Quality](https://docs.gitlab.com/ee/ci/testing/code_quality.html) feature. The easiest way to set this option, (and without having to modify rake tasks), is with the `CODECLIMATE_REPORT_FILE` environment variable. For example, the following GitLab job sets the environment variable and [archives the report](https://docs.gitlab.com/ee/ci/yaml/artifacts_reports.html#artifactsreportscodequality) produced. ```yaml validate lint check rubocop-Ruby 2.7.2-Puppet ~> 7: stage: syntax image: ruby:2.7.2 script: - bundle exec rake validate lint check rubocop variables: PUPPET_GEM_VERSION: '~> 7' CODECLIMATE_REPORT_FILE: 'gl-code-quality-report.json' artifacts: reports: codequality: gl-code-quality-report.json expire_in: 1 week ``` ## Options See `puppet-lint --help` for a full list of command line options and checks. ## Checks For a complete list of checks, and how to resolve errors on each check, see the Puppet Lint [checks](http://puppet-lint.com/checks/) page. ### YAML Checks Puppet Lint can check Hiera YAML files for legacy facts. For example, the following YAML would trigger warnings: ```yaml hierarchy: - name: "Legacy Facts Example" paths: - "os/%{facts.hostname}.yaml" - "/var/www/%{::hostname}.yaml" - "%{::bios_vendor}.yaml" ``` Refer to the [Puppet Core Facts documentation](https://www.puppet.com/docs/puppet/8/core_facts.html) for a complete list of available core facts. ### Spacing, Indentation, and Whitespace * Must use two-space soft tabs. * Must not use literal tab characters. * Must not contain trailing white space. * Should not exceed an 140-character line width. * An exception has been made for `source => 'puppet://...'` lines as splitting these over multiple lines decreases the readability of the manifests. * Should align arrows (`=>`) within blocks of attributes. * Should contain at most a single space before an arrows(`=>`) where the parameter block contains exactly one parameter. ### Quoting * All strings that do not contain variables should be enclosed in single quotes. * An exception has been made for double-quoted strings containing \n or \t. * All strings that contain variables must be enclosed in double quotes. * All variables should be enclosed in braces when interpolated in a string. * Variables standing by themselves should not be quoted. ### Capitalization * All variables should be in lowercase. ### Resources * All resource titles should be quoted. * An exception has been made for resource titles that consist of only a variable standing by itself. * If a resource declaration includes an `ensure` attribute, it should be the first attribute specified. * Symbolic links should be declared by using an ensure value of `link` and explicitly specifying a value for the `target` attribute. * File modes should be represented as a 4-digit string enclosed in single quotes or use symbolic file modes. ### Conditionals * You should not intermingle conditionals inside resource declarations (that is, selectors inside resources). * Case statements should have a default case. ### Classes * Relationship declarations with the chaining syntax should only be used in the 'left to right' direction. * Classes should not be defined inside a class. * Defines should not be defined inside a class. * Classes should not inherit between namespaces. * Required parameters in class & defined type definitions should be listed before optional parameters. * When using top-scope variables, including facts, Puppet modules should explicitly specify the empty namespace. * Chaining operators should appear on the same line as the right hand operand. ## Reporting bugs or incorrect results If you find a bug in Puppet Lint or its results, please create an issue in the [repo issues tracker](https://github.com/puppetlabs/puppet-lint/issues/). Bonus points will be awarded if you also include a patch that fixes the issue. ## Development Acceptance tests for this tool leverage [puppet_litmus](https://github.com/puppetlabs/puppet_litmus). To run the acceptance tests follow the instructions [here](https://github.com/puppetlabs/puppet_litmus/wiki/Tutorial:-use-Litmus-to-execute-acceptance-tests-with-a-sample-module-(MoTD)#install-the-necessary-gems-for-the-module). You can also find a tutorial and walkthrough of using Litmus and the PDK on [YouTube](https://www.youtube.com/watch?v=FYfR7ZEGHoE). If you run into an issue with this tool or would like to request a feature you can [raise a PR](https://github.com/puppetlabs/puppet-lint/pulls) with your suggested changes. Alternatively, you can [raise a Github issue](https://github.com/puppetlabs/puppet-lint/issues) with a feature request or to report any bugs. Every other Tuesday the DevX team holds [office hours](https://puppet.com/community/office-hours) in the [Puppet Community Slack](http://slack.puppet.com/), where you can ask questions about this and any other supported tools. This session runs at 15:00 (GMT) for about an hour. If you have problems getting this tool up and running, please [contact Support](http://puppetlabs.com/services/customer-support). ## Thank you Many thanks to the following people for contributing to puppet-lint * James Turnbull (@kartar) * Jan Vansteenkiste (@vStone) * Julian Simpson (@simpsonjulian) * S. Zachariah Sprackett (@zsprackett) As well as the many people who have reported the issues they've had! ## License Copyright (c) 2011-2016 Tim Sharpe Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. puppetlabs-puppet-lint-f1a29d8/Rakefile000066400000000000000000000021651510314671100202400ustar00rootroot00000000000000require 'bundler/gem_tasks' require 'rubocop/rake_task' require 'github_changelog_generator/task' require 'puppet-lint/version' require 'rspec/core/rake_task' require 'puppetlabs_spec_helper/tasks/fixtures' begin require 'github_changelog_generator/task' rescue LoadError # Gem not present else GitHubChangelogGenerator::RakeTask.new(:changelog) do |config| version = PuppetLint::VERSION config.user = 'puppetlabs' config.project = 'puppet-lint' config.since_tag = '2.5.0' config.future_release = version.to_s config.exclude_labels = %w[duplicate question invalid wontfix release-pr documentation] config.enhancement_labels = %w[feature] end end begin require 'puppet_litmus/rake_tasks' rescue LoadError # Gem not present end namespace :spec do desc 'Run RSpec code examples with coverage collection' task :coverage do ENV['COVERAGE'] = 'yes' Rake::Task['spec'].execute end end RSpec::Core::RakeTask.new(:spec) do |t| t.exclude_pattern = 'spec/acceptance/**/*_spec.rb' end desc 'Run acceptance tests' task :acceptance do Rake::Task['litmus:acceptance:localhost'].invoke end puppetlabs-puppet-lint-f1a29d8/bin/000077500000000000000000000000001510314671100173375ustar00rootroot00000000000000puppetlabs-puppet-lint-f1a29d8/bin/puppet-lint000077500000000000000000000002231510314671100215430ustar00rootroot00000000000000#!/usr/bin/env ruby $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'puppet-lint' exit PuppetLint::Bin.new(ARGV).run puppetlabs-puppet-lint-f1a29d8/lib/000077500000000000000000000000001510314671100173355ustar00rootroot00000000000000puppetlabs-puppet-lint-f1a29d8/lib/puppet-lint.rb000066400000000000000000000212201510314671100221400ustar00rootroot00000000000000# rubocop:disable Naming/FileName # encoding: utf-8 require 'set' require 'json' require 'puppet-lint/version' require 'puppet-lint/lexer' require 'puppet-lint/configuration' require 'puppet-lint/data' require 'puppet-lint/checks' require 'puppet-lint/report/github' require 'puppet-lint/bin' class PuppetLint::NoCodeError < StandardError; end class PuppetLint::NoFix < StandardError; end # Parser Syntax Errors class PuppetLint::SyntaxError < StandardError attr_reader :token def initialize(token) @token = token super end end # Public: The public interface to puppet-lint. class PuppetLint # Public: Gets/Sets the String manifest code to be checked. attr_accessor :code # Public: Gets the String manifest with the errors fixed. attr_reader :manifest # 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. attr_reader :problems # Public: Gets/Sets the String path to the manifest to be checked. attr_accessor :path # 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. attr_reader :statistics # Public: Initialise a new PuppetLint object. def initialize @code = nil @statistics = { error: 0, warning: 0, fixed: 0, ignored: 0 } @manifest = '' end # Public: Access PuppetLint's configuration from outside the class. # # Returns a PuppetLint::Configuration object. def self.configuration @configuration ||= PuppetLint::Configuration.new end # Public: Access PuppetLint's configuration from inside the class. # # Returns a PuppetLint::Configuration object. def configuration self.class.configuration end # Public: Set the path of the manifest file to be tested and read the # contents of the file. # # Returns nothing. def file=(path) return unless File.exist?(path) @path = path File.open(path, 'rb:UTF-8') do |f| @code = f.read end # Check if the input is an SE Linux policy package file (which also use # the .pp extension), which all have the first 4 bytes 0xf97cff8f. @code = '' if @code[0..3].unpack1('V') == 0xf97cff8f end # Internal: Retrieve the format string to be used when writing problems to # STDOUT. If the user has not specified a custom log format, build one for # them. # # Returns a format String to be used with String#%. def log_format if configuration.log_format.nil? || configuration.log_format.empty? format = '%{KIND}: %{message} on line %{line}' format.prepend('%{path} - ') if configuration.with_filename format.concat(' (check: %{check})') configuration.log_format = format end configuration.log_format end # Internal: Format a problem message and print it to STDOUT. # # message - A Hash containing all the information about a problem. # # Returns nothing. def format_message(message) format = log_format puts format % message puts " #{message[:reason]}" if message[:kind] == :ignored && !message[:reason].nil? print_context(message) end # Internal: Format a problem message and print it to STDOUT so GitHub Actions # recognizes it as an annotation. # # message - A Hash containing all the information about a problem. # # Returns nothing. def print_github_annotation(message) puts PuppetLint::Report::GitHubActionsReporter.format_problem(path, message) end # Internal: Get the line of the manifest on which the problem was found # # message - A Hash containing all the information about a problem. # # Returns the problematic line as a string. def get_context(message) PuppetLint::Data.manifest_lines[message[:line] - 1].strip end # 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. def print_context(message) return if message[:check] == 'documentation' return if message[:kind] == :fixed line = message[:context] return unless line offset = line.index(%r{\S}) || 1 puts "\n #{line.strip}" printf("%#{message[:column] + 2 - offset}s\n\n", '^') end # Internal: Print the reported problems with a manifest to stdout. # # problems - An Array of problem Hashes as returned by # PuppetLint::Checks#run. # # Returns array of problem. def report(problems) json = [] print_stdout = !(configuration.json || configuration.sarif) problems.each do |message| next if message[:kind] == :ignored && !PuppetLint.configuration.show_ignored message[:KIND] = message[:kind].to_s.upcase next unless message[:kind] == :fixed || [message[:kind], :all].include?(configuration.error_level) message[:context] = get_context(message) if configuration.with_context json << message if print_stdout format_message(message) print_github_annotation(message) if configuration.github_actions end end warn 'Try running `puppet parser validate `' if problems.any? { |p| p[:check] == :syntax } json end # Public: Determine if PuppetLint found any errors in the manifest. # # Returns true if errors were found, otherwise returns false. def errors? @statistics[:error] != 0 end # Public: Determine if PuppetLint found any warnings in the manifest. # # Returns true if warnings were found, otherwise returns false. def warnings? @statistics[:warning] != 0 end # 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. def run raise PuppetLint::NoCodeError if @code.nil? if @code.empty? @problems = [] @manifest = '' return end linter = PuppetLint::Checks.new @problems = linter.run(@path, @code) @problems.each { |problem| @statistics[problem[:kind]] += 1 } @manifest = linter.manifest if PuppetLint.configuration.fix end # Public: Print any problems that were found out to stdout. # # Returns an array of problems. def print_problems report(@problems) end # Public: Write fixes back to the file if this file type supports fixes. # # Returns nothing. def write_fixes return unless should_write_fixes? File.binwrite(@path, @manifest) end # Internal: Determine if fixes should be written for this file. # # Returns true if all conditions are met for writing fixes, false otherwise. def should_write_fixes? # Don't write if file type doesn't support fixes return false unless supports_fixes? # Don't write if there are syntax errors (can't safely fix) return false if @problems&.any? { |r| r[:check] == :syntax } # Don't write if there's no manifest content return false if @manifest.nil? || @manifest.empty? true end # Public: Determine if this file type supports automatic fixes. # # Returns true if fixes are supported for this file type, false otherwise. def supports_fixes? return false if @path.nil? # Only .pp files support fixes currently # YAML files and other types may support fixes in the future File.extname(@path).match?(%r{\.pp$}i) end # 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 def self.new_check(name, &) class_name = name.to_s.split('_').map(&:capitalize).join klass = PuppetLint.const_set(:"Check#{class_name}", Class.new(PuppetLint::CheckPlugin)) klass.const_set(:NAME, name) klass.class_exec(&) PuppetLint.configuration.add_check(name, klass) PuppetLint::Data.ignore_overrides[name] ||= {} end end # Default configuration options PuppetLint.configuration.defaults require 'puppet-lint/plugins' puppetlabs-puppet-lint-f1a29d8/lib/puppet-lint/000077500000000000000000000000001510314671100216165ustar00rootroot00000000000000puppetlabs-puppet-lint-f1a29d8/lib/puppet-lint/bin.rb000066400000000000000000000127411510314671100227200ustar00rootroot00000000000000require 'pathname' require 'uri' require 'puppet-lint/optparser' require 'puppet-lint/report/codeclimate' # Internal: The logic of the puppet-lint bin script, contained in a class for # ease of testing. class PuppetLint::Bin # Public: Initialise a new PuppetLint::Bin. # # args - An Array of command line argument Strings to be passed to the option # parser. # # Examples # # PuppetLint::Bin.new(ARGV).run def initialize(args) @args = args end # Public: Run puppet-lint as a command line tool. # # Returns an Integer exit code to be passed back to the shell. def run begin opts = PuppetLint::OptParser.build(@args) opts.parse!(@args) rescue OptionParser::InvalidOption => e puts "puppet-lint: #{e.message}" puts "puppet-lint: try 'puppet-lint --help' for more information" return 1 end if PuppetLint.configuration.display_version puts "puppet-lint #{PuppetLint::VERSION}" return 0 end if PuppetLint.configuration.list_checks puts PuppetLint.configuration.checks return 0 end if @args[0].nil? puts 'puppet-lint: no file specified' puts "puppet-lint: try 'puppet-lint --help' for more information" return 1 end begin path = @args[0] full_path = File.expand_path(path, ENV.fetch('PWD', nil)) full_base_path = if File.directory?(full_path) full_path else File.dirname(full_path) end full_base_path_uri = if full_base_path.start_with?('/') 'file://' + full_base_path else 'file:///' + full_base_path end full_base_path_uri += '/' unless full_base_path_uri.end_with?('/') path = path.gsub(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR path = if File.directory?(path) Dir.glob([ "#{path}/**/*.pp", "#{path}/**/*.{yaml,yml}", ]) else @args end PuppetLint.configuration.with_filename = true if path.length > 1 return_val = 0 ignore_paths = PuppetLint.configuration.ignore_paths all_problems = [] path.each do |f| next if ignore_paths.any? { |p| File.fnmatch(p, f) } l = PuppetLint.new l.file = f l.run all_problems << l.print_problems return_val = 1 if l.errors? || (l.warnings? && PuppetLint.configuration.fail_on_warnings) l.write_fixes if PuppetLint.configuration.fix end if PuppetLint.configuration.sarif report_sarif(all_problems, full_base_path, full_base_path_uri) elsif PuppetLint.configuration.json all_problems.each do |problems| problems.each do |problem| problem.delete_if { |key, _| [:description, :help_uri].include?(key) } end end puts JSON.pretty_generate(all_problems) end PuppetLint::Report::CodeClimateReporter.write_report_file(all_problems, PuppetLint.configuration.codeclimate_report_file) if PuppetLint.configuration.codeclimate_report_file return_val rescue PuppetLint::NoCodeError puts 'puppet-lint: no file specified or specified file does not exist' puts "puppet-lint: try 'puppet-lint --help' for more information" 1 end end # Internal: Print the reported problems in SARIF format to stdout. # # problems - An Array of problem Hashes as returned by # PuppetLint::Checks#run. # # Returns nothing. def report_sarif(problems, base_path, base_path_uri) sarif_file = File.read(File.join(__dir__, 'report', 'sarif_template.json')) sarif = JSON.parse(sarif_file) sarif['runs'][0]['originalUriBaseIds']['ROOTPATH']['uri'] = base_path_uri rules = sarif['runs'][0]['tool']['driver']['rules'] = [] results = sarif['runs'][0]['results'] = [] problems.each do |messages| messages.each do |message| relative_path = Pathname.new(message[:fullpath]).relative_path_from(Pathname.new(base_path)) rules = sarif['runs'][0]['tool']['driver']['rules'] rule_exists = rules.any? { |r| r['id'] == message[:check] } unless rule_exists new_rule = { 'id' => message[:check] } new_rule['fullDescription'] = { 'text' => message[:description] } unless message[:description].nil? new_rule['fullDescription'] = { 'text' => 'Check for any syntax error and record an error of each instance found.' } if new_rule['fullDescription'].nil? && message[:check] == :syntax new_rule['defaultConfiguration'] = { 'level' => message[:KIND].downcase } if ['error', 'warning'].include?(message[:KIND].downcase) new_rule['helpUri'] = message[:help_uri] unless message[:help_uri].nil? rules << new_rule end rule_index = rules.index { |r| r['id'] == message[:check] } result = { 'ruleId' => message[:check], 'ruleIndex' => rule_index, 'message' => { 'text' => message[:message] }, 'locations' => [{ 'physicalLocation' => { 'artifactLocation' => { 'uri' => relative_path, 'uriBaseId' => 'ROOTPATH' }, 'region' => { 'startLine' => message[:line], 'startColumn' => message[:column] } } }] } results << result end end puts JSON.pretty_generate(sarif) end end puppetlabs-puppet-lint-f1a29d8/lib/puppet-lint/checkplugin.rb000066400000000000000000000142351510314671100244440ustar00rootroot00000000000000# Public: A class that contains and provides information for the puppet-lint # checks. # # This class should not be used directly, but instead should be inherited. # # Examples # # class PuppetLint::Plugin::CheckFoo < PuppetLint::CheckPlugin # end class PuppetLint::CheckPlugin # Internal: Initialise a new PuppetLint::CheckPlugin. def initialize @problems = [] end # Internal: Check the manifest for problems and filter out any problems that # should be ignored. # # Returns an Array of problem Hashes. def run check @problems.each do |problem| next if problem[:check] == :syntax next unless PuppetLint::Data.ignore_overrides[problem[:check]].key?(problem[:line]) problem[:kind] = :ignored problem[:reason] = PuppetLint::Data.ignore_overrides[problem[:check]][problem[:line]] end @problems end # Internal: Fix any problems the check plugin has detected. # # Returns an Array of problem Hashes. def fix_problems @problems.reject { |problem| problem[:kind] == :ignored || problem[:check] == :syntax }.each do |problem| next unless respond_to?(:fix) begin fix(problem) problem[:kind] = :fixed rescue PuppetLint::NoFix # noop end end @problems end private # Public: Provides the tokenised manifest to the check plugins. # # Returns an Array of PuppetLint::Lexer::Token objects. def tokens # When called from a plugins `check` method, the tokens array returned should be a (shallow) copy called_from_check = (caller_locations(1..1).first.base_label == 'check') PuppetLint::Data.tokens(duplicate: called_from_check) end def add_token(index, token) PuppetLint::Data.insert(index, token) end def remove_token(token) PuppetLint::Data.delete(token) end # Public: Provides the resource titles to the check plugins. # # Returns an Array of PuppetLint::Lexer::Token objects. def title_tokens PuppetLint::Data.title_tokens end # Public: Provides positional information for any resource declarations in # the tokens array to the check plugins. # # Returns an Array of Hashes containing the position information. def resource_indexes PuppetLint::Data.resource_indexes end # Public: Provides positional information for any class definitions in the # tokens array to the check plugins. # # Returns an Array of Hashes containing the position information. def class_indexes PuppetLint::Data.class_indexes end # Public: Provides positional information for any defined type definitions in # the tokens array to the check plugins. # # Returns an Array of Hashes containing the position information. def defined_type_indexes PuppetLint::Data.defined_type_indexes end # Public: Provides positional information for any node definitions in the # tokens array to the check plugins. # # Returns an Array of Hashes containing the position information. def node_indexes PuppetLint::Data.node_indexes end # Public: Provides positional information for any array definitions in the # tokens array to the check plugins. # # Returns an array of hashes containing the position information. def array_indexes PuppetLint::Data.array_indexes end # Public: Provides positional information for any hash definitions in the # tokens array to the check plugins. # # Returns an array of hashes containing the position information. def hash_indexes PuppetLint::Data.hash_indexes end # Public: Provides positional information for any default definitions in the # tokens array to the check plugins. # # Returns an Array of Hashes containing the position information. def defaults_indexes PuppetLint::Data.defaults_indexes end # Public: Provides positional information for any function definition in the # tokens array to the check plugins. # # Returns an Array of Hashes containing the position information. def function_indexes PuppetLint::Data.function_indexes end # Public: Provides the expanded path of the file being analysed to check # plugins. # # Returns the String path. def fullpath PuppetLint::Data.fullpath end # Public: Provides the path of the file being analysed as it was provided to # puppet-lint to the check plugins. # # Returns the String path. def path PuppetLint::Data.path end # Public: Provides the name of the file being analysed to the check plugins. # # Returns the String file name. def filename PuppetLint::Data.filename end # Public: Provides a list of formatting tokens to the check plugins. # # Returns an Array of Symbol token types. def formatting_tokens PuppetLint::Data.formatting_tokens end # Public: Provides a list of manifest lines to the check plugins. # # Returns an Array of manifest lines. def manifest_lines PuppetLint::Data.manifest_lines end # Internal: Prepare default problem report information. # # Returns a Hash of default problem information. def default_info @default_info ||= { check: self.class.const_get(:NAME), fullpath:, path:, filename: } end # Public: Report a problem with the manifest being checked. # # kind - The Symbol problem type (:warning or :error). # problem - A Hash containing the attributes of the problem # :message - The String message describing the problem. # :line - The Integer line number of the location of the problem. # :column - The Integer column number of the location of the problem. # :check - The Symbol name of the check that detected the problem. # :description - The description of the check that detected the problem. # :help_uri - The help web page of the check that detected the problem. # # Returns nothing. def notify(kind, problem) problem[:kind] = kind problem.merge!(default_info) { |_key, v1, _v2| v1 } raise ArgumentError, 'unknown value passed for kind' unless [:warning, :error, :fixed].include?(kind) [:message, :line, :column, :check].each do |attr| raise ArgumentError, "problem hash must contain #{attr.inspect}" unless problem.key?(attr) end @problems << problem end end puppetlabs-puppet-lint-f1a29d8/lib/puppet-lint/checks.rb000066400000000000000000000101361510314671100234040ustar00rootroot00000000000000require 'puppet-lint/checkplugin' # Internal: Various methods that orchestrate the actions of the puppet-lint # check plugins. class PuppetLint::Checks # Public: Get an Array of problem Hashes. attr_accessor :problems YAML_COMPATIBLE_CHECKS = [:legacy_facts].freeze # Public: Initialise a new PuppetLint::Checks object. def initialize @problems = [] end # Internal: Tokenise the manifest code and prepare it for checking. # # path - The path to the file as passed to puppet-lint as a String. # content - The String manifest code to be checked. # # Returns nothing. def load_data(path, content) lexer = PuppetLint::Lexer.new PuppetLint::Data.path = path PuppetLint::Data.manifest_lines = content.split("\n", -1) begin PuppetLint::Data.tokens = lexer.tokenise(content) PuppetLint::Data.parse_control_comments rescue PuppetLint::LexerError => e message = if e.reason.nil? 'Syntax error' else "Syntax error (#{e.reason})" end problems << { kind: :error, check: :syntax, message:, line: e.line_no, column: e.column, fullpath: PuppetLint::Data.fullpath, path: PuppetLint::Data.path, filename: PuppetLint::Data.filename } PuppetLint::Data.tokens = [] end end # Internal: Run the lint checks over the manifest or YAML code. # # fileinfo - The path to the file as passed to puppet-lint as a String. # data - The String manifest or YAML code to be checked. # # Returns an Array of problem Hashes. def run(fileinfo, data) checks_run = [] if File.extname(fileinfo).downcase.match?(%r{\.ya?ml$}) PuppetLint::Data.path = fileinfo PuppetLint::Data.manifest_lines = data.split("\n", -1) enabled_checks.select { |check| YAML_COMPATIBLE_CHECKS.include?(check) }.each do |check| klass = PuppetLint.configuration.check_object[check].new # FIXME: shadowing #problems problems = klass.run checks_run << [klass, problems] end else load_data(fileinfo, data) enabled_checks.each do |check| klass = PuppetLint.configuration.check_object[check].new # FIXME: shadowing #problems problems = klass.run checks_run << [klass, problems] end end checks_run.each do |klass, problems| if PuppetLint.configuration.fix @problems.concat(klass.fix_problems) else @problems.concat(problems) end end @problems rescue PuppetLint::SyntaxError => e @problems << { kind: :error, check: :syntax, message: 'Syntax error', fullpath: File.expand_path(fileinfo, ENV.fetch('PWD', nil)), filename: File.basename(fileinfo), path: fileinfo, line: e.token.line, column: e.token.column } @problems rescue StandardError => e $stdout.puts <<-END.gsub(%r{^ {6}}, '') Whoops! It looks like puppet-lint has encountered an error that it doesn't know how to handle. Please open an issue at https://github.com/puppetlabs/puppet-lint and paste the following output into the issue description. --- puppet-lint version: #{PuppetLint::VERSION} ruby version: #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} platform: #{RUBY_PLATFORM} file path: #{fileinfo} END if File.readable?(fileinfo) $stdout.puts [ 'file contents:', '```', File.read(fileinfo), '```', ].join("\n") end $stdout.puts [ 'error:', '```', "#{e.class}: #{e.message}", e.backtrace.join("\n"), '```', ].join("\n") exit 1 end # Internal: Get a list of checks that have not been disabled. # # Returns an Array of String check names. def enabled_checks @enabled_checks ||= PuppetLint.configuration.checks.select do |check| PuppetLint.configuration.send(:"#{check}_enabled?") end end # Internal: Render the fixed manifest. # # Returns the manifest as a String. def manifest PuppetLint::Data.tokens.map(&:to_manifest).join end end puppetlabs-puppet-lint-f1a29d8/lib/puppet-lint/configuration.rb000066400000000000000000000073701510314671100250210ustar00rootroot00000000000000# Public: A singleton class to store the running configuration of # puppet-lint. class PuppetLint::Configuration # Internal: Add helper methods for a new check to the # PuppetLint::Configuration object. # # check - The String name of the check. # # Returns nothing. # # Signature # # _enabled? # disable_ # enable_ def self.add_check(check) # Public: Determine if the named check is enabled. # # Returns true if the check is enabled, otherwise return false. define_method(:"#{check}_enabled?") do settings["#{check}_disabled"] != true end # Public: Disable the named check. # # Returns nothing. define_method(:"disable_#{check}") do settings["#{check}_disabled"] = true end # Public: Enable the named check. # # Returns nothing. define_method(:"enable_#{check}") do settings["#{check}_disabled"] = false end end # Public: Catch situations where options are being set for the first time # and create the necessary methods to get & set the option in the future. # # args - An Array of values to set the option to. # method - The String name of the option. # block - Unused. # # Returns nothing. # # Signature # #