Skip to content

Commit

Permalink
CHANGE @W-17100347@ Removed mentions of JUnit from CLI (#1675)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfeingold35 authored Nov 18, 2024
1 parent a132990 commit 676a2b8
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion messages/results-writer.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# error.unrecognized-file-format

The output file %s has an unsupported extension. Valid extensions include: .csv; .html/.htm; .json; .junit/.junit.xml; .sarif/.sarif.json; .xml.
The output file %s has an unsupported extension. Valid extensions include: .csv; .html/.htm; .json; .sarif/.sarif.json; .xml.
1 change: 0 additions & 1 deletion messages/run-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ If you don't specify this flag, the command outputs the results in the terminal.
- .csv
- .html or .htm
- .json
- .junit or .junit.xml
- .sarif or .sarif.json
- .xml

Expand Down
3 changes: 0 additions & 3 deletions src/lib/writers/ResultsWriter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ export class ResultsFileWriter implements ResultsWriter {
// Check for `.json` AFTER checking for `.sarif.json`!
} else if (ext === '.json') {
this.format = OutputFormat.JSON;
} else if (ext === '.junit' || file.toLowerCase().endsWith('.junit.xml')) {
throw new Error('TODO: Support JUNIT-type output');
// Check for `.xml` AFTER checking for `.junit.xml`!
} else if (ext === '.xml') {
this.format = OutputFormat.XML;
} else {
Expand Down
4 changes: 0 additions & 4 deletions test/lib/writers/ResultsWriter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ describe('ResultsWriter implementations', () => {
{ext: '.html', expectedOutput: `Results formatted as ${OutputFormat.HTML}`},
{ext: '.htm', expectedOutput: `Results formatted as ${OutputFormat.HTML}`},
{ext: '.json', expectedOutput: `Results formatted as ${OutputFormat.JSON}`},
//{ext: '.junit', expectedOutput: `Results formatted as ${OutputFormat.JUNIT}`},
//{ext: '.junit.xml', expectedOutput: `Results formatted as ${OutputFormat.JUNIT}`},
//{ext: '.sarif', expectedOutput: `Results formatted as ${OutputFormat.SARIF}`},
//{ext: '.sarif.json', expectedOutput: `Results formatted as ${OutputFormat.SARIF}`},
{ext: '.xml', expectedOutput: `Results formatted as ${OutputFormat.XML}`}
Expand All @@ -48,8 +46,6 @@ describe('ResultsWriter implementations', () => {
* in the case array for the valid format tests.
*/
it.each([
{ext: '.junit'},
{ext: '.junit.xml'},
{ext: '.sarif'},
{ext: '.sarif.json'}
])('Throws TODO error for not-yet-supported format: *$ext', ({ext}) => {
Expand Down

0 comments on commit 676a2b8

Please sign in to comment.