Skip to content

Commit

Permalink
Merge pull request #236 from puppetlabs/yaml-docs
Browse files Browse the repository at this point in the history
Update puppet-lint documentation to reflect legacy_facts yaml check feature
  • Loading branch information
alex501212 authored Feb 24, 2025
2 parents c35705b + d86e8c9 commit 31a711e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ To instruct Lint to automatically fix any issues that it detects, use the `--fix
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.
Expand Down Expand Up @@ -245,6 +247,23 @@ See `puppet-lint --help` for a full list of command line options and 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.
Expand Down

0 comments on commit 31a711e

Please sign in to comment.