You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not scan vendor folders in plugins. Fixed in 133a6fe.
Fix determining the fully qualified class name (FQCN) to validate hook name. We determined the FQCN from the file path, which doesn't work at all for classes not following the PSR-4 standard. I have created the FQCN extraction from analyzed file tokens. Fixed in f7eb077.
Reduce usage of @runInSeparateProcess in tests. Fixed in 05eb439.
Validation of the text domain has some issues: when the domain is not specified, last argument of the i18n function is not a string, i18n function contains nested parenthesis. Fixed in a59d5f5.
In hook expected names, convert class name from CamelCase to snake_case. Fixed in c60c67b.
Cannot detect the hook name when a hook is not a constant string. Fixed in ea81caf and d2300f2.
Allow the presence of comments inside the first argument (hook name). Fixed in 0f5577b.
Adding of the multi_domains setting to the phpcs.xml blocks detection of the WordPress.Security.NonceVerification.Recommended, For instance, in wp-content/plugins/wpforms/wpforms.php:217. Fixed by a commit above.
Message phpcs: WPForms.PHP.ValidateDomain.InvalidDomain: You are using invalid domain name. Use wpforms instead of wpforms-lite appears on many files. Fixed in d973e79.
Message Remove unneeded use statement (WPForms.PHP.UseStatement.UnusedUseStatement) is wrong when class is used in PHPDoc only. See TestCase,php as an example. The problem was in ignoring @throws statements. Fixed in 389b559.
Message phpcs: WPForms.Formatting.EmptyLineBeforeReturn.RemoveEmptyLineBeforeReturnStatement: Remove empty line before return statement in xxx line. occurs when if contains a comment line and the return statement only. Fixed in 3130c0c.
Endless loop in SinceTagHooksSniff.php. Fixed in e212b30.
Wrong detection of the text domain by the property in the ruleset. Fixed in 9ae857b.
Prevent endless loop in HooksMethoidSniff.php. Fixed in a055581.
Do not use HooksMethodSniff.php when not in the class file. Fixed in e7dcf55.
Fix wrong @param tag counting when a hook has no arguments. Fixed in 449b1e2.
In wpforms/includes/class-frontend.php the statement apply_filters( 'wpforms_amp_pro', wpforms()->is_pro() ) requires 3 @param tags. - Fixed in 72bbd67.
In \WPFormsSurveys\Loader::init we improperly claim WPForms.PHP.BackSlash.UseShortSyntax. Fixed in 66dd8ef.
Respect /** This action/filter is documented in... */ and do not count @param tags.. Fixed in 56a6c5d.
WPForms.Comments.PHPDocDefine.MissPHPDoc reported on test files, what is not expected
When @param uses [], like WP_Post[], the alignment error ParamTagHooks.InvalidAlign occurs
phpcs: WPForms.Formatting.Switch.AddEmptyLineBefore: You should add an empty line before on wp-content/plugins/wpforms/includes/admin/builder/functions.php:106 looks like incomplete message.
Hooks can only be added in the hooks method on wp-content/plugins/wpforms/includes/admin/builder/class-builder.php:92 is repeated several times in CLI mode.
Incorrectly calculating hook's arguments for the apply_filters_deprecated and do_action_deprecated functions.
Shouldn't be errors related to the Hooks Documentation when a hook has a comment /** This filter(action) is documented in path/to/file */
Hooks in addons should start with wpform_addon_name. Fixed in d64997f.
All namespace parts consisting of two or more words in hook names should be converted to snake case and has underscore symbol between words: e.g. WPForms\LongNameSpacePart\LongClassName -> wpforms_long_name_space_part_long_class_name_
If a namespace part the same as a class name we should collapse them: e.g. WPForms\Providers\Provides -> wpforms_providers_
Message Remove unneeded use statement (WPForms.PHP.UseStatement.UnusedUseStatement) is wrong when class is used in PHPDoc only. The problem was in ignoring @return statements.
Cannot define text domain in the same directory where phpcs.xml is located. So, <property name="wp-mail-smtp" value="." /> does not work. Fixed in 6ee0896.
Show an error if the i18n function doesn't have a domain at all.
Hook names should start with FQCN + method name. Currently, we validate only by FQCN.
The text was updated successfully, but these errors were encountered:
@kagg-design I would suggest making each individual unchecked checkbox as a separate GH issue. This way it will be easier to have relevant conversations separate plus easier to reference completed issues in commits.
Expected Behavior
There are several issues found upon commencement of repo usage with the WPForms plugins.
Current Behavior
@runInSeparateProcess
in tests. Fixed in 05eb439.multi_domains
setting to the phpcs.xml blocks detection of theWordPress.Security.NonceVerification.Recommended
, For instance, inwp-content/plugins/wpforms/wpforms.php:217
. Fixed by a commit above.phpcs: WPForms.PHP.ValidateDomain.InvalidDomain: You are using invalid domain name. Use wpforms instead of wpforms-lite
appears on many files. Fixed in d973e79.Remove unneeded
usestatement (WPForms.PHP.UseStatement.UnusedUseStatement)
is wrong when class is used in PHPDoc only. See TestCase,php as an example. The problem was in ignoring @throws statements. Fixed in 389b559.phpcs: WPForms.Formatting.EmptyLineBeforeReturn.RemoveEmptyLineBeforeReturnStatement: Remove empty line before return statement in xxx line.
occurs whenif
contains a comment line and the return statement only. Fixed in 3130c0c.@param
tag counting when a hook has no arguments. Fixed in 449b1e2.wpforms/includes/class-frontend.php
the statementapply_filters( 'wpforms_amp_pro', wpforms()->is_pro() )
requires 3@param
tags. - Fixed in 72bbd67.\WPFormsSurveys\Loader::init
we improperly claimWPForms.PHP.BackSlash.UseShortSyntax
. Fixed in 66dd8ef.@param
tags.. Fixed in 56a6c5d.@param
tags (screenshot)WPForms.Comments.PHPDocHooks.RequiredHookDocumentation
(screenshot1, screenshot2)phpcs: WPForms.Formatting.Switch.AddEmptyLineBefore: You should add an empty line before
on wp-content/plugins/wpforms/includes/admin/builder/functions.php:106 looks like incomplete message.Hooks can only be added in the
hooksmethod
on wp-content/plugins/wpforms/includes/admin/builder/class-builder.php:92 is repeated several times in CLI mode.apply_filters_deprecated
anddo_action_deprecated
functions./** This filter(action) is documented in path/to/file */
wpform_addon_name
. Fixed in d64997f.WPForms\LongNameSpacePart\LongClassName
->wpforms_long_name_space_part_long_class_name_
WPForms\Providers\Provides
->wpforms_providers_
Remove unneeded use statement
(WPForms.PHP.UseStatement.UnusedUseStatement
) is wrong when class is used in PHPDoc only. The problem was in ignoring@return
statements.<property name="wp-mail-smtp" value="." />
does not work. Fixed in 6ee0896.The text was updated successfully, but these errors were encountered: