Skip to content

Commit ba3d17a

Browse files
authored
Fix #620 (#624)
* Fix #620 * Update Changelog.md
1 parent f3bfd4d commit ba3d17a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Changelog.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [1.0.39] - 20224-6-26
7+
## [1.0.40] - 2024-7-08
8+
## Fix
9+
Fixes extraneous printing of git errors when git ignore checking is enabled during analysis.
10+
11+
## [1.0.39] - 2024-6-26
812
### Pipelines
913
Pipeline maintenance.
1014

DevSkim-DotNet/Microsoft.DevSkim.CLI/Commands/AnalyzeCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ private static bool IsGitIgnored(string fp)
267267
{
268268
Arguments = $"check-ignore {fp}",
269269
WorkingDirectory = Directory.GetParent(fp)?.FullName,
270-
RedirectStandardOutput = true
270+
RedirectStandardOutput = true,
271+
RedirectStandardError = true // Suppress git errors being printed - particularly when not in a git work tree
271272
});
272273
process?.WaitForExit();
273274
string? stdOut = process?.StandardOutput.ReadToEnd();

0 commit comments

Comments
 (0)