From 02c6a1fcd10acb982f6b59a1cc4bf4cc0877c087 Mon Sep 17 00:00:00 2001 From: Lauren Rother Date: Tue, 3 Feb 2015 15:28:53 -0800 Subject: [PATCH 1/2] Add section on Validating Quality Score Left it out because I'm an idiot. --- source/forge/assessingmodulequality.md | 53 +++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/source/forge/assessingmodulequality.md b/source/forge/assessingmodulequality.md index b642ee79cc..3c01be2f2f 100644 --- a/source/forge/assessingmodulequality.md +++ b/source/forge/assessingmodulequality.md @@ -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: +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: From 1b2c8d774a9f93d8a1c232fc1dbd4d97a87c5b86 Mon Sep 17 00:00:00 2001 From: Lauren Rother Date: Tue, 3 Feb 2015 16:11:14 -0800 Subject: [PATCH 2/2] More fixes --- source/forge/assessingmodulequality.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/forge/assessingmodulequality.md b/source/forge/assessingmodulequality.md index 3c01be2f2f..0e125c02b0 100644 --- a/source/forge/assessingmodulequality.md +++ b/source/forge/assessingmodulequality.md @@ -67,7 +67,7 @@ Or you will see that it has had no change. 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. +To reproduce the Code Quality score, you will need to install and run puppet lint from the module's root. ~~~ gem install puppet-lint @@ -76,10 +76,11 @@ 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. +To reproduce the Puppet Compatibility score, you will need to run `puppet parser` from the module's root against the latest release for a specific version of Puppet. + +If you are using Puppet 2.7+: ~~~ -puppet >= 2.7: puppet parser validate `find ./manifests -name *.pp` ~~~ @@ -96,7 +97,7 @@ 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. +To reproduce the Metadata Quality score, you will need to install and run the metadata linter from the module's root. ~~~ gem install metadata-json-lint