C2026-041-invisible-position-changes-as-differences #807
No files matched your search
Generated
+1
-1
@@ -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
|
||||
this.lbProcedures.TabIndex = 1;
|
||||
this.tt.SetToolTip(this.lbProcedures, "Procedures withDifferences or Search Text");
|
||||
this.lbProcedures.SelectedIndexChanged += new System.EventHandler(this.lbProcedures_SelectedIndexChanged);
|
||||
|
||||
@@ -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
mschill
commented
Is this using used? Is this using used?
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
@@ -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
mschill
commented
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>
|
||||
@@ -974,35 +970,66 @@ namespace Baseline
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
mschill
commented
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.
plarsen
commented
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
mschill
commented
Commented out code should be removed Commented out code should be removed
plarsen
commented
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
mschill
commented
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
mschill
commented
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
mschill
commented
This function is not called so should be removed. This function is not called so should be removed.
plarsen
commented
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
|
||||
|
||||
@@ -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
mschill
commented
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);
|
||||
|
||||
Reference in new issue
Block a user
was changing the size of this intentional?