Skip to content

Commit

Permalink
@W-14009441@: completely remove noViolationsDetected message
Browse files Browse the repository at this point in the history
  • Loading branch information
MrEminent42 committed Sep 5, 2023
1 parent d3035fe commit 4bd02ee
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion messages/RunOutputProcessor.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module.exports = {
"output": {
"engineSummaryTemplate": "Executed %s, found %s violation(s) across %s file(s).",
"noViolationsDetected": "Executed engines: %s. No rule violations found.",
"sevThresholdSummary": "Rule violations of severity %s or more severe were detected.",
"writtenToConsole": "Rule violations were logged to the console.",
"writtenToOutFile": "Rule violations were written to %s."
Expand Down
5 changes: 0 additions & 5 deletions test/commands/scanner/run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ describe('scanner:run', function () {
// Verify that the correct message is displayed to user
expect(ctx.stdout).to.contain(processorMessages.getMessage('output.engineSummaryTemplate', ['pmd', 2, 1]), 'Expected summary to be correct');
expect(ctx.stdout).to.contain(processorMessages.getMessage('output.writtenToOutFile', ['testout.csv']));
expect(ctx.stdout).to.not.contain(processorMessages.getMessage('output.noViolationsDetected', []));

// Verify that the file we wanted was actually created.
expect(fs.existsSync('testout.csv')).to.equal(true, 'The command should have created the expected output file');
Expand Down Expand Up @@ -371,7 +370,6 @@ describe('scanner:run', function () {
.it('Properly writes HTML to file', ctx => {
// Verify that the correct message is displayed to user
expect(ctx.stdout).to.contain(processorMessages.getMessage('output.writtenToOutFile', [outputFile]));
expect(ctx.stdout).to.not.contain(processorMessages.getMessage('output.noViolationsDetected', []));

// Verify that the file we wanted was actually created.
expect(fs.existsSync(outputFile)).to.equal(true, 'The command should have created the expected output file');
Expand Down Expand Up @@ -455,7 +453,6 @@ describe('scanner:run', function () {
// Verify that the correct message is displayed to user
expect(ctx.stdout).to.contain(processorMessages.getMessage('output.engineSummaryTemplate', ['pmd', 2, 1]), 'Expected summary to be correct');
expect(ctx.stdout).to.contain(processorMessages.getMessage('output.writtenToOutFile', ['testout.json']));
expect(ctx.stdout).to.not.contain(processorMessages.getMessage('output.noViolationsDetected', []));

// Verify that the file we wanted was actually created.
expect(fs.existsSync('testout.json')).to.equal(true, 'The command should have created the expected output file');
Expand Down Expand Up @@ -588,7 +585,6 @@ describe('scanner:run', function () {
expect(output.status).to.equal(0, 'Should finish properly');
const result = output.result;
expect(result).to.contain(processorMessages.getMessage('output.writtenToOutFile', ['testout.xml']));
expect(result).to.not.contain(processorMessages.getMessage('output.noViolationsDetected', []));
// Verify that the file we wanted was actually created.
expect(fs.existsSync('testout.xml')).to.equal(true, 'The command should have created the expected output file');
const fileContents = fs.readFileSync('testout.xml').toString();
Expand All @@ -612,7 +608,6 @@ describe('scanner:run', function () {
.it('--json flag wraps message about no violations occuring', ctx => {
const output = JSON.parse(ctx.stdout);
expect(output.status).to.equal(0, 'Should have finished properly');
expect(output.result).to.not.contain(processorMessages.getMessage('output.noViolationsDetected', ['pmd, retire-js']));
expect(output.result.length).to.equal(0, 'When no violations are present, JSON result should be empty array.')
});
});
Expand Down

0 comments on commit 4bd02ee

Please sign in to comment.