File tree Expand file tree Collapse file tree 4 files changed +26
-13
lines changed
src/Microsoft.DevSkim/Microsoft.DevSkim.CLI Expand file tree Collapse file tree 4 files changed +26
-13
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ public int Run()
140
140
Writer outputWriter = WriterFactory . GetWriter ( _fileFormat , _outputFormat ) ;
141
141
if ( string . IsNullOrEmpty ( _outputFile ) )
142
142
outputWriter . TextWriter = Console . Out ;
143
- else
143
+ else
144
144
outputWriter . TextWriter = File . CreateText ( _outputFile ) ;
145
145
146
146
int filesAnalyzed = 0 ;
Original file line number Diff line number Diff line change
1
+ // Copyright (C) Microsoft. All rights reserved.
2
+ // Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3
+
4
+ namespace Microsoft . DevSkim . CLI . Writers
5
+ {
6
+ public class DummyWriter : Writer
7
+ {
8
+ public override void WriteIssue ( IssueRecord issue )
9
+ {
10
+ // This is intentionaly empty
11
+ }
12
+
13
+ public override void FlushAndClose ( )
14
+ {
15
+ // This is intentionaly empty
16
+ }
17
+
18
+ }
19
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -9,8 +9,13 @@ public class WriterFactory
9
9
{
10
10
public static Writer GetWriter ( string writerName , string format = null )
11
11
{
12
+ if ( string . IsNullOrEmpty ( writerName ) )
13
+ writerName = "_dummy" ;
14
+
12
15
switch ( writerName . ToLowerInvariant ( ) )
13
- {
16
+ {
17
+ case "_dummy" :
18
+ return new DummyWriter ( ) ;
14
19
case "json" :
15
20
return new JsonWriter ( format ) ;
16
21
case "text" :
You can’t perform that action at this time.
0 commit comments