Analyzer: Remove check for hook without description (#33528)

Remove check for hook without description
This commit is contained in:
Paul Sealock 2022-06-22 17:00:33 +12:00 committed by GitHub
parent c8cb9877a2
commit c617c70d46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 8 deletions

View File

@ -274,7 +274,8 @@ export default class Analyzer extends Command {
return null;
}
const updateFunctionRegex = /\+{1,2}\s*'(\d.\d.\d)' => array\(\n\+{1,2}\s*'(.*)',\n\+{1,2}\s*\),/m;
const updateFunctionRegex =
/\+{1,2}\s*'(\d.\d.\d)' => array\(\n\+{1,2}\s*'(.*)',\n\+{1,2}\s*\),/m;
const match = databaseUpdatePatch.match( updateFunctionRegex );
if ( ! match ) {
@ -376,19 +377,12 @@ export default class Analyzer extends Command {
for ( const p in patches ) {
const patch = patches[ p ];
const results = patch.match( newRegEx );
const hasHookRegex = /apply_filters|do_action/g;
const hasHook = patch.match( hasHookRegex );
const hooksList: Map< string, string[] > = new Map<
string,
string[]
>();
if ( ! results ) {
if ( hasHook ) {
this.error(
'A hook has been introduced or updated without a docBlock. Please add a docBlock.'
);
}
continue;
}