https://github.com/dodevops/puppet-lint-module_reference-check
An extensive, opinionated puppet lint check for valid module reference comments
https://github.com/dodevops/puppet-lint-module_reference-check
Last synced: 2 months ago
JSON representation
An extensive, opinionated puppet lint check for valid module reference comments
- Host: GitHub
- URL: https://github.com/dodevops/puppet-lint-module_reference-check
- Owner: dodevops
- License: mit
- Created: 2022-06-02T13:04:33.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-03T11:46:52.000Z (about 4 years ago)
- Last Synced: 2025-12-03T13:44:47.938Z (7 months ago)
- Language: Ruby
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Puppet lint module reference check
This checks whether used modules are properly referenced in the comments by these rules:
- All internal prefixed with profile:: or role:: based on the Puppet role/profile concept) modules have to be
referenced using a @see tag
- All component modules have to be referenced like the following
- All used classes and defined types need to be gathered in a comma-separated list of regexps in a @ref tag
- The full module name (vendor-module) has to be referenced in a @note tag
- At minimum one @see tag with a reference to the puppet forge page of the component module
- Example:
```
# @ref apache.*,a2mod
# @note puppetlabs-apache
# @see https://forge.puppet.com/modules/puppetlabs/apache
```
- Modules referenced by features (using our own role::include_features function) have to be referenced with @see
- The module references have to be sorted alphabetically and grouped by this:
- component module
- internal modules
- modules referenced by features
**Note**: This check can only detect component module usage with the `class` and `include` keywords, but supports
reference comments to undetectable components modules as well.
## Usage
To use the plugin, add the following line to the Gemfile:
gem 'puppet-lint-module_reference-check'