Analyzer: Remove check for hook without description (#33528)
Remove check for hook without description
This commit is contained in:
parent
c8cb9877a2
commit
c617c70d46
|
@ -274,7 +274,8 @@ export default class Analyzer extends Command {
|
||||||
return null;
|
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 );
|
const match = databaseUpdatePatch.match( updateFunctionRegex );
|
||||||
|
|
||||||
if ( ! match ) {
|
if ( ! match ) {
|
||||||
|
@ -376,19 +377,12 @@ export default class Analyzer extends Command {
|
||||||
for ( const p in patches ) {
|
for ( const p in patches ) {
|
||||||
const patch = patches[ p ];
|
const patch = patches[ p ];
|
||||||
const results = patch.match( newRegEx );
|
const results = patch.match( newRegEx );
|
||||||
const hasHookRegex = /apply_filters|do_action/g;
|
|
||||||
const hasHook = patch.match( hasHookRegex );
|
|
||||||
const hooksList: Map< string, string[] > = new Map<
|
const hooksList: Map< string, string[] > = new Map<
|
||||||
string,
|
string,
|
||||||
string[]
|
string[]
|
||||||
>();
|
>();
|
||||||
|
|
||||||
if ( ! results ) {
|
if ( ! results ) {
|
||||||
if ( hasHook ) {
|
|
||||||
this.error(
|
|
||||||
'A hook has been introduced or updated without a docBlock. Please add a docBlock.'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue