C2026-041-invisible-position-changes-as-differences #807

Merged
jjenko merged 14 commits from C2026-041-invisible-position-changes-as-differences into Development 2026-09-03 08:56:33 -04:00
3 changed files with 47 additions and 25 deletions
Showing only changes of commit 213b8d18f7 - Show all commits

No files matched your search

+1 -1
View File
@@ -277,7 +277,7 @@
this.lbProcedures.FormattingEnabled = true;
this.lbProcedures.Location = new System.Drawing.Point(0, 0);
this.lbProcedures.Name = "lbProcedures";
this.lbProcedures.Size = new System.Drawing.Size(150, 46);
this.lbProcedures.Size = new System.Drawing.Size(707, 25);
mschill marked this conversation as resolved Outdated
Outdated
Review

was changing the size of this intentional?

was changing the size of this intentional?
this.lbProcedures.TabIndex = 1;
this.tt.SetToolTip(this.lbProcedures, "Procedures withDifferences or Search Text");
this.lbProcedures.SelectedIndexChanged += new System.EventHandler(this.lbProcedures_SelectedIndexChanged);
+46 -19
View File
@@ -46,7 +46,6 @@ using System.Data;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Text;
mschill marked this conversation as resolved
Review

Is this using used?

Is this using used?
using System.Text.RegularExpressions;
using System.Windows.Forms;
10
@@ -849,12 +848,9 @@ namespace Baseline
public partial class FindFiles : List<FindFile>
{
private readonly string _FileName;
private object _fileName;
public string FileName => _FileName;
mschill marked this conversation as resolved
Review

This should not have been added / I believe this is not used.

This should not have been added / I believe this is not used.
//public bool TruncatedDataFg { get; set; } = false;
/// <summary>
/// Build list of DocVersion Folders with differences
/// </summary>
2
@@ -974,35 +970,66 @@ namespace Baseline
}
return false;
}
Outdated
Review

foundFileFg is an added paramater but it is not used - if not used it shoul be removed.

foundFileFg is an added paramater but it is not used - if not used it shoul be removed.
Outdated
Review

I removed foundFileFg

I removed foundFileFg
private void FillByCompare(DirectoryInfo di1, DirectoryInfo di2, string fileName, IgnoreLines myIgnore, bool TruncatedDataFg = false, bool foundFileFg = false)
private void FillByCompare(DirectoryInfo di1, DirectoryInfo di2, string fileName, IgnoreLines myIgnore, bool isTruncatedChecked = false, bool foundFileFg = false)
{
if (TruncatedDataFg) // C2026-041 is the "Use Truncated Data" checked
{
if (!foundFileFg) // flag to indicate if the correct DebugMeta file has been found.
{
fileName = getDebubMetaFile(di1, di2, ref foundFileFg); // C2026-041 Check if the DebugMeta_Truncate.txt file is found in the baseline bench mark and the new release being tested.
}
}
//if (isTruncatedChecked) // C2026-041 is the "Use Truncated Data" checked
mschill marked this conversation as resolved Outdated
Outdated
Review

Commented out code should be removed

Commented out code should be removed
Outdated
Review

I cleaned this up

I cleaned this up
//{
// if (!foundFileFg) // flag to indicate if the correct DebugMeta file has been found.
// {
// fileName = getDebubMetaFile(di1, di2, ref foundFileFg); // C2026-041 Check if the DebugMeta_Truncate.txt file is found in the baseline bench mark and the new release being tested.
// }
//}
foreach (DirectoryInfo diChild1 in di1.GetDirectories())
mschill marked this conversation as resolved Outdated
Outdated
Review

It looks like this still assumes that either both files are truncated or neither is.

It looks like this still assumes that either both files are truncated or neither is.
{
DirectoryInfo diChild2 = new DirectoryInfo(Path.Combine(di2.FullName + "\\" + diChild1.Name));
DirectoryInfo diChild2 = new DirectoryInfo(Path.Combine(di2.FullName, diChild1.Name));
if (diChild2.Exists)
FillByCompare(diChild1, diChild2, fileName,myIgnore, TruncatedDataFg, foundFileFg);// Recursively work on Sub-Folders
FillByCompare(diChild1, diChild2, fileName,myIgnore, isTruncatedChecked, foundFileFg);// Recursively work on Sub-Folders
}
//foreach (FileInfo fiChild1 in di1.GetFiles(fileName))
mschill marked this conversation as resolved
Review

Commented out code should be removed

Commented out code should be removed
//{
// FileInfo fiChild2 = new FileInfo(Path.Combine(di2.FullName, fiChild1.Name));
// if (fiChild2.Exists)
// {
// if (CompareFile(fiChild1, fiChild2, myIgnore))
// Add(new FindFile(fiChild1.FullName, fiChild2.FullName));// Process Each File
// }
//}
foreach (FileInfo fiChild1 in di1.GetFiles(fileName))
{
FileInfo fiChild2 = new FileInfo(Path.Combine(di2.FullName, fiChild1.Name));
if (fiChild2.Exists)
FileInfo fiChild1_truncated = new FileInfo(fiChild1.FullName.Replace(".txt", "_Truncated.txt"));
FileInfo fiChild2_truncated = new FileInfo(fiChild2.FullName.Replace(".txt", "_Truncated.txt"));
//truncate checked and both files exist
if (isTruncatedChecked && fiChild1_truncated.Exists && fiChild2_truncated.Exists)
{
if (CompareFile(fiChild1, fiChild2,myIgnore))
Add(new FindFile(fiChild1.FullName, fiChild2.FullName));// Process Each File
if (CompareFile(fiChild1_truncated, fiChild2_truncated, myIgnore))
Add(new FindFile(fiChild1_truncated.FullName, fiChild2_truncated.FullName));
}
//truncate checked and only file 1 truncate files exist
else if (isTruncatedChecked && fiChild1_truncated.Exists && fiChild2.Exists)
{
if (CompareFile(fiChild1_truncated, fiChild2, myIgnore))
Add(new FindFile(fiChild1_truncated.FullName, fiChild2.FullName));
}
//truncate checked and only file 2 truncate files exist
else if (isTruncatedChecked && fiChild2_truncated.Exists)
{
if (CompareFile(fiChild1, fiChild2_truncated, myIgnore))
Add(new FindFile(fiChild1.FullName, fiChild2_truncated.FullName));
}
//truncated not checked or truncate files dont exist
else if (fiChild2.Exists)
{
if (CompareFile(fiChild1, fiChild2, myIgnore))
Add(new FindFile(fiChild1.FullName, fiChild2.FullName));
}
}
}
private string getDebubMetaFile(DirectoryInfo di1, DirectoryInfo di2, ref bool foundFileFg) // C2026-041
mschill marked this conversation as resolved Outdated
Outdated
Review

This function is not called so should be removed.

This function is not called so should be removed.
Outdated
Review

I removed it

I removed it
{
string flnm = "";
string flnm;
DirectoryInfo dr1 = di1.GetDirectories()[0]; // get first folder for test of which DebugMeta file to use. The DebugMeta files are found only ineach proc set folder.
if (!dr1.Name.Substring(0, 8).Contains("VEPROMS_") && !foundFileFg)
{
@@ -1025,7 +1052,7 @@ namespace Baseline
}
private bool CompareFile(FileInfo fiChild1, FileInfo fiChild2,IgnoreLines myIgnore)
{
if (fiChild1.Name == "DebugMeta.txt")
if (fiChild1.Name == "DebugMeta.txt" || fiChild1.Name == "DebugMeta_Truncated.txt")
{
IEnumerable<string> lines1 = ReadFilteredLines(fiChild1.FullName, false, myIgnore);//LINQ Read lines without ignored lines
IEnumerable<string> lines2 = ReadFilteredLines(fiChild2.FullName, false, myIgnore);//LINQ Read lines without ignored lines
-5
View File
7
@@ -158,11 +158,6 @@ namespace Volian.Base.Library
_MyDebugPrint.Close();
_MyDebugPrint_Truncated.Close();
}
public static void Write(string format, params object[] args)
{
_MyDebugPrint.Write(format, args);
}
public static void WriteLine(string format, params object[] args)
{
mschill marked this conversation as resolved
Review

Write should be removed - it is not called from anywhere.

Write should be removed - it is not called from anywhere.
_MyDebugPrint_Truncated.WriteLine(format, args);