Skip to content

Commit

Permalink
fixing issue that was leading to false negatives on the validate func…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
pellicceama committed Oct 26, 2022
1 parent 48402dd commit a81e913
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/validate/rules/core/RepoStructureRules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ export const RepoStructureRules: ValidationRule[] = [

return new Promise((resolve, reject) => {

if(!repoPath.endsWith('/assets')) {
return resolve({ valid: true, errors: [] })
}
const errors = [];
let valid = true;

Expand Down
6 changes: 3 additions & 3 deletions src/validate/rules/network/NetworkDirectoryRules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const networkFiles = [

export const NetworkDirectoryRules: ValidationRule[] = [
{
name: `${baseName}:FileNamesRule`,
name: `${baseName}:NetworkDirectoryRules`,
network: 'all',
validate: async (network: string, repoPath: string): Promise<ValidationResult> => {

Expand All @@ -28,8 +28,8 @@ export const NetworkDirectoryRules: ValidationRule[] = [
if(!fs.existsSync(path.join(repoPath, 'info.json'))){
console.log('Error: info.json not found on ' + path.join(repoPath, 'info.json'));
errors.push({
source: `${repoPath}`,
message: `${network} info.json is missing`
source: `${baseName}:${path.join(repoPath, 'info.json')}`,
message: `${network} network info.json is missing`
});
valid = false;
}
Expand Down

0 comments on commit a81e913

Please sign in to comment.