N°7331 - Fix cleanup script to remove all denied folders

This commit is contained in:
Molkobain
2024-03-22 11:38:02 +01:00
parent 3a990f46d3
commit e7a04e0e70
26 changed files with 2216 additions and 594 deletions

View File

@@ -33,7 +33,7 @@ abstract class AbstractFolderAnalyzer
* @since 3.2.0 N°7175 update regexp to also remove `examples` folder
* @link https://www.regular-expressions.info/alternation.html RegExp alternation reference
*/
public const QUESTIONNABLE_FOLDER_REGEXP = '/^(tests?|examples?|htdocs?|demos?|external)$/i';
public const QUESTIONNABLE_FOLDER_REGEXP = '/^(tests?|examples?|htdocs?|demos?)$/i';
/**
* @return string Relative path to the root folder of the dependencies (e.g. "lib" for composer, "node_modules" for npm, ...) from iTop app. root
@@ -134,7 +134,7 @@ abstract class AbstractFolderAnalyzer
public function ListDeniedButStillPresentFoldersAbsPaths(): array
{
$aDeniedTestDir = $this->ListDeniedFoldersAbsPaths();
$aAllTestDir = $this->ListAllowedFoldersAbsPaths();
$aAllTestDir = $this->ListAllFoldersAbsPaths();
return array_intersect($aDeniedTestDir, $aAllTestDir);
}
}