Skip to content

Commit

Permalink
adding --fail-on-eol-found
Browse files Browse the repository at this point in the history
Signed-off-by: Benji Visser <[email protected]>
  • Loading branch information
noqcks committed Jan 30, 2023
1 parent 943f9c6 commit f10cb5f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ async function runScan({
// Run the xeol analyzer
let cmdOutput = "";
let cmd = `${xeolBinary}`;
if (failBuild) {
cmdArgs.push("--fail-on-eol-found");
}
cmdArgs.push(source);

// This /dev/null writable stream is required so the entire Xeol output
Expand Down
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ async function runScan({
// Run the xeol analyzer
let cmdOutput = "";
let cmd = `${xeolBinary}`;
if (failBuild) {
cmdArgs.push("--fail-on-eol-found");
}
cmdArgs.push(source);

// This /dev/null writable stream is required so the entire Xeol output
Expand Down
10 changes: 10 additions & 0 deletions tests/xeol_command.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,14 @@ describe("Xeol command", () => {
});
expect(cmd).toBe("xeol -o json asdf");
});

it("is invoked with fail", async () => {
let cmd = await mockExec({
source: "asdf",
failBuild: "true",
outputFormat: "json",
version: "0.6.0",
});
expect(cmd).toBe("xeol -o json --fail-on-eol-found asdf");
});
});

0 comments on commit f10cb5f

Please sign in to comment.