Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-mairose-sp authored Sep 19, 2024
1 parent c0f99fc commit 67fdcf1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ async function run() {
project.workspace,
inputs.fileGlob
);
const rootSpectral = await createSpectral(inputs.spectralRootRuleset);
const pathSpectral = await createSpectral(inputs.spectralPathRuleset);
const schemaSpectral = await createSpectral(inputs.spectralSchemaRuleset);

Expand All @@ -67,14 +68,13 @@ async function run() {

if (fileContents[i].file.includes(`sailpoint-api.`)) {
console.log(`Running root ruleset on ${fileContents[i].file}`);
const rootSpectral = await createSpectral(inputs.spectralRootRuleset);
pbs = await runSpectral(rootSpectral, fileContents[i].content, false);
pbs = await runSpectral(rootSpectral, fileContents[i].content.slice(0), false);
} else if (fileContents[i].file.includes(`paths`)) {
console.log(`Running path ruleset on ${fileContents[i].file}`);
pbs = await runSpectral(pathSpectral, fileContents[i].content, true);
pbs = await runSpectral(pathSpectral, fileContents[i].content.slice(0), true);
} else if (fileContents[i].file.includes(`schema`)) {
console.log(`Running schema ruleset on ${fileContents[i].file}`);
pbs = await runSpectral(schemaSpectral, fileContents[i].content, true);
pbs = await runSpectral(schemaSpectral, fileContents[i].content.slice(0), true);
}

//console.log(`Current Working Directory: ` + process.cwd());
Expand Down

0 comments on commit 67fdcf1

Please sign in to comment.