forked from puppetlabs/puppet-docs
-
Notifications
You must be signed in to change notification settings - Fork 1
Add section on Validating Quality Score #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lrnrthr
wants to merge
2
commits into
modulequality
Choose a base branch
from
fixes
base: modulequality
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ canonical: "/forge/assessingmodulequality.html" | |
|
||
#Assessing Module Quality | ||
|
||
The [Puppet Forge](forge) has both codified and crowd-sourced ways of gauging the quality of any module. | ||
The [Puppet Forge (Forge)](forge) has both codified and crowd-sourced ways of gauging the quality of any module. | ||
|
||
![module ratings][modulequality] | ||
|
||
|
@@ -34,22 +34,22 @@ Then scroll down the page and you will see information about the results of the | |
|
||
![Quality score details][qualityscoredetail] | ||
|
||
You can click **View full results...** for even more detailed information on the scores for each section. It is possible that a module will have a perfect Code Quality score, in which case there will not be additional results to view. Otherwise, you will see some combination of the below flags: | ||
You can click **View full results...** for even more detailed information on the scores for each section. It is possible that a module will have a perfect Code Quality score, in which case there may not be additional results to view. Otherwise, you will see some combination of the below flags: | ||
|
||
![Quality flags][qualityflags] | ||
|
||
###Quality Flags | ||
|
||
####Error | ||
#####Error | ||
An error flag indicates a severe problem with the module. The flag will be appended to the line causing the issue, which could be anything from a critical bug to a failure to follow a high-priority [best practice](styleguide). If you are the module's author, an error flag negatively impacts your score most heavily. | ||
|
||
####Warning | ||
#####Warning | ||
A warning flag notes a general problem with the module. The flag will be appended to the line in module causing the issue, which could be nonconformance with [best practices](styleguide) or other smaller issue in the module's structure or code. If you are the module's author, a warning flag will negatively impact your score, but is weighted less heavily than an error. | ||
|
||
####Notice | ||
#####Notice | ||
A notice flag indicates something in the module that warrants attention. The notice flag is used for both positive and negative things of note, and as such does not impact the module's score. | ||
|
||
####Success | ||
#####Success | ||
A success flag highlights information the module covers completely. This flag only applies to Puppet Compatibility and Metadata Quality. It can be used to assess whether the module covers things like listing operating system compatibility and having a verified source url. If you are the module's author, a success flag will positively impact your score. | ||
|
||
###Updates | ||
|
@@ -62,6 +62,47 @@ Or you will see that it has had no change. | |
|
||
![No quality change since release][noreleasechange] | ||
|
||
###Validating Your Module's Score | ||
|
||
If you have written a module and would like to know what its quality score will be before you upload it to the Forge, we designed the rating evaluations to be reproducible. | ||
|
||
####Code Quality | ||
To reproduce the Code Quality score, you will need to install and run puppet lint. | ||
|
||
~~~ | ||
gem install puppet-lint | ||
from the module root: | ||
puppet-lint `find ./manifests -name *.pp` | ||
~~~ | ||
|
||
####Puppet Compatibility | ||
To reproduce the Puppet Compatibility score, you will need to run `puppet parser` against the latest release for a specific version of Puppet. | ||
|
||
~~~ | ||
puppet >= 2.7: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This probably should be outside the code block |
||
puppet parser validate `find ./manifests -name *.pp` | ||
~~~ | ||
|
||
If you are using the future parser: | ||
|
||
~~~ | ||
puppet parser validate --parser future `find ./manifests -name *.pp` | ||
~~~ | ||
|
||
If you are using Puppet 2.6: | ||
|
||
~~~ | ||
puppet --parseonly --ignoreimports `find ./manifests -name *.pp` | ||
~~~ | ||
|
||
####Metadata Quality | ||
To reproduce the Metadata Quality score, you will need to install and run the metadata linter. | ||
|
||
~~~ | ||
gem install metadata-json-lint | ||
metadata-json-lint metadata.json | ||
~~~ | ||
|
||
##Community Rating | ||
A module's community rating is based on the average of user responses to the questions found on every module page on the Forge: | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the commands with find should be run from the module root