Skip to content

Commit

Permalink
Merge branch 'hotfix/2.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
JDGrimes committed May 23, 2015
2 parents 6ce25ef + 8ece7c7 commit 47c52a8
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
And as you can see, we [keep a CHANGELOG](http://keepachangelog.com/).

## [2.0.3] - 2015-05-23
### Added
- `WordPress-Extra` and `WordPress-Docs` to the PHPCS ruleset. #69
- `WordPoints_installables::*` and `WordPoints_Un_Installer_Base::map_shortcuts` to
the l10n validator ignores list. #68

### Changed
- WPCS version to latest commit on `develop`. #69

## [2.0.2] - 2015-05-01
### Fixed
- Failure of broken symlink sniff even when there were no broken symlinks. #66
Expand Down
2 changes: 1 addition & 1 deletion bin/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export PHPCS_GIT_TREE=master
# WPCS
export WPCS_DIR=/tmp/wpcs
export WPCS_GITHUB_SRC=WordPress-Coding-Standards/WordPress-Coding-Standards
export WPCS_GIT_TREE=e7464c59c730ec304ea8c4f74beeacdb3dc785ab
export WPCS_GIT_TREE=ec5ea0f31fdb1b354a427d31d53676227f1afdc3
export WPCS_STANDARD=$(if [ -e phpcs.ruleset.xml ]; then echo phpcs.ruleset.xml; else echo WordPress; fi)

# WP L10n Validator
Expand Down
5 changes: 5 additions & 0 deletions l10n-validator/wordpoints.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
'wordpoints_verify_nonce' => true,

// Class methods.
'WordPoints_Installables::get_installer' => true,
'WordPoints_Installables::install' => true,
'WordPoints_Installables::register' => true,
'WordPoints_Installables::uninstall' => true,
'WordPoints_Points_Hook::_set' => true,
'WordPoints_Points_Hook::get_description' => true,
'WordPoints_Points_Hook::get_field_id' => true,
Expand Down Expand Up @@ -71,6 +75,7 @@
'WordPoints_Points_Widget::get_field_name' => true,
'WordPoints_Shortcodes::register' => true,
'WordPoints_Un_Installer_Base::get_updates_for' => true,
'WordPoints_Un_Installer_Base::map_shortcuts' => true,
'WordPoints_Un_Installer_Base::map_uninstall_shortcut' => true,
'WordPoints_Un_Installer_Base::maybe_update_tables_to_utf8mb4' => true,
'WordPoints_Un_Installer_Base::set_component_version' => true,
Expand Down
31 changes: 30 additions & 1 deletion phpcs/WordPoints/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,32 @@
<ruleset name="WordPoints">
<description>Sniffs for the coding standards of the WordPoints plugin</description>

<rule ref="WordPress-Extra">
<exclude name="WordPress.Variables.GlobalVariables" />
</rule>

<rule ref="WordPress-Docs">
<!-- I usually put an empty line before the file comment -->
<exclude name="Squiz.Commenting.FileComment.SpacingAfterOpen" />
<!-- This conflicts with heading comments within classes and EOF comments -->
<exclude name="Squiz.Commenting.InlineComment" />
<!-- These conflict with just putting a @since on child class var/method -->
<exclude name="Generic.Commenting.DocComment.MissingShort" />
<exclude name="Squiz.Commenting.VariableComment.MissingVar" />
<!-- Forbids having a blank line before a block comment. -->
<exclude name="Squiz.Commenting.BlockComment.HasEmptyLineBefore" />
<!-- Conflicts with array hash notation. -->
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop" />
<!-- I like to leave out param docs on child methods and hooks. -->
<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag" />
<!-- https://github.com/squizlabs/PHP_CodeSniffer/issues/601 -->
<exclude name="Squiz.Commenting.FunctionComment.IncorrectTypeHint" />
</rule>
<!-- This will flag // Silence is golden index.php files. -->
<rule ref="Squiz.Commenting.FileComment.WrongStyle">
<exclude-pattern>*/index.php</exclude-pattern>
</rule>

<rule ref="WordPress-VIP">
<exclude name="WordPress.VIP.RestrictedFunctions.switch_to_blog" />
<exclude name="WordPress.VIP.SuperGlobalInputUsage" />
Expand All @@ -25,11 +51,14 @@
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.VIP.ValidatedSanitizedInput">
<properties>
<property name="customSanitizingFunctions" value="wordpoints_int,wordpoints_posint,wordpoints_negint,wordpoints_verify_nonce" type="array" />
</properties>
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.XSS.EscapeOutput">
<properties>
<property name="customSanitizingFunctions" value="wordpoints_int,wordpoints_posint,wordpoints_negint,wordpoints_verify_nonce,wordpoints_format_points,wordpoints_sanitize_wp_error" type="array" />
<property name="customEscapingFunctions" value="wordpoints_int,wordpoints_posint,wordpoints_negint,wordpoints_format_points,wordpoints_sanitize_wp_error" type="array" />
</properties>
<exclude-pattern>/tests/*</exclude-pattern>
</rule>
Expand Down

0 comments on commit 47c52a8

Please sign in to comment.