diff --git a/src/common.ts b/src/common.ts index 88771293..f5e6ffa7 100644 --- a/src/common.ts +++ b/src/common.ts @@ -483,13 +483,28 @@ export function checkContributors(path: PathLike, packageJson: PackageJSON): voi * @param path Path to CI config */ export function checkCIConfig(rules: Rules, path: string): void { -// check CI config if it exists const pathToCiConfig = resolve(path, '.gitlab-ci.yml'); + + // check CI config if it exists if (existsSync(pathToCiConfig)) { // read CI config - const buffer = readFileSync(pathToCiConfig); + const content = readFileSync(pathToCiConfig) + .toString(); + + let ciConfigWithoutTemplates = ''; + + for (const line of content.split('\n')) { + const match = line + .trim() + .match(/^<