From e08ee424a83b98532f5e122ef37f670654721e0d Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Mon, 8 Jul 2024 10:22:03 -0700 Subject: [PATCH 1/2] Fix #620 --- .../Microsoft.DevSkim.CLI/Commands/AnalyzeCommand.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DevSkim-DotNet/Microsoft.DevSkim.CLI/Commands/AnalyzeCommand.cs b/DevSkim-DotNet/Microsoft.DevSkim.CLI/Commands/AnalyzeCommand.cs index 6f3626be..f0e381b8 100644 --- a/DevSkim-DotNet/Microsoft.DevSkim.CLI/Commands/AnalyzeCommand.cs +++ b/DevSkim-DotNet/Microsoft.DevSkim.CLI/Commands/AnalyzeCommand.cs @@ -267,7 +267,8 @@ private static bool IsGitIgnored(string fp) { Arguments = $"check-ignore {fp}", WorkingDirectory = Directory.GetParent(fp)?.FullName, - RedirectStandardOutput = true + RedirectStandardOutput = true, + RedirectStandardError = true // Suppress git errors being printed - particularly when not in a git work tree }); process?.WaitForExit(); string? stdOut = process?.StandardOutput.ReadToEnd(); From 6dbde30427ea14bc628ad8438fb5058742e06937 Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Mon, 8 Jul 2024 10:25:29 -0700 Subject: [PATCH 2/2] Update Changelog.md --- Changelog.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 301f315a..cd46c5bd 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.0.39] - 20224-6-26 +## [1.0.40] - 2024-7-08 +## Fix +Fixes extraneous printing of git errors when git ignore checking is enabled during analysis. + +## [1.0.39] - 2024-6-26 ### Pipelines Pipeline maintenance.