Skip to content

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
wants to merge 2 commits into
base: modulequality
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 47 additions & 6 deletions source/forge/assessingmodulequality.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand All @@ -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
Expand All @@ -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:
Copy link

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

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:
Copy link

Choose a reason for hiding this comment

The 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:

Expand Down