Skip to content

Commit

Permalink
Update checkDocs.js
Browse files Browse the repository at this point in the history
  • Loading branch information
spacevx committed Mar 7, 2024
1 parent 4f0f64b commit af75801
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/scripts/checkDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,12 @@ const checkFile = (filePath) => {
const nsValue = nsMatch[1].trim();
const folderName = path.basename(path.dirname(filePath));
if (nsValue !== folderName) {
errors.push(`The native \`${path.basename(filePath)}\` is located in the '${folderName}' directory but should be in '${nsValue}' (based on the ns).`);
return;
errors.push(`The file \`${path.basename(filePath)}\` is located in the '${folderName}' directory but should be in '${nsValue}' (based on the ns).`);
}

// Verify if the ns exists as a folder name in the project
if (!rootFolders.includes(nsValue)) {
errors.push(`The namespace '${nsValue}' specified in ${filePath} does not exist as a directory in the project.`);
errors.push(`The namespace '${nsValue}' specified in ${filePath} does not exist as a directory in the project. It should be one of ${rootFolders.join(', ')}.`);
return;
}
};
Expand Down

0 comments on commit af75801

Please sign in to comment.