From 7c5b4ded5f43326501d95a3c4a0bb813800982a0 Mon Sep 17 00:00:00 2001 From: AJ Date: Wed, 14 Jan 2026 07:52:17 -0500 Subject: [PATCH] chore(PepLib.Core): remove unused using directives and clean up formatting Remove unnecessary System, System.Collections.Generic, System.IO, and System.Linq using directives that were flagged by IDE analyzers. Also includes minor whitespace and code style normalization. Co-Authored-By: Claude Opus 4.5 --- PepLib.Core/AngleConverter.cs | 4 +-- PepLib.Core/Box.cs | 7 +---- PepLib.Core/Data/Drawing.cs | 3 +- PepLib.Core/Data/NestDetail.cs | 3 +- PepLib.Core/Data/NestDrawing.cs | 3 +- PepLib.Core/Data/NestHeader.cs | 3 +- PepLib.Core/Data/PlateDetail.cs | 3 +- PepLib.Core/Data/PlateHeader.cs | 3 +- PepLib.Core/Drawing.cs | 5 +-- PepLib.Core/DrawingInfo.cs | 3 -- PepLib.Core/Generic.cs | 7 +---- PepLib.Core/IO/DrawingInfoReader.cs | 4 +-- PepLib.Core/IO/DrawingReader.cs | 2 -- PepLib.Core/IO/LoopReader.cs | 4 +-- PepLib.Core/IO/MaterialDataReader.cs | 4 +-- PepLib.Core/IO/NestInfoReader.cs | 4 +-- PepLib.Core/IO/NestReader.cs | 3 -- PepLib.Core/IO/PlateReader.cs | 5 ++- PepLib.Core/IO/ProgramReader.cs | 46 +++++++++++++--------------- PepLib.Core/IO/ReportReader.cs | 4 +-- PepLib.Core/IniConfig.cs | 8 +---- PepLib.Core/Loop.cs | 3 +- PepLib.Core/MathHelper.cs | 4 +-- PepLib.Core/Nest.cs | 5 +-- PepLib.Core/NestDrawing.cs | 7 +---- PepLib.Core/NestIndex.cs | 4 +-- PepLib.Core/NestInfo.cs | 4 +-- PepLib.Core/Node.cs | 8 +---- PepLib.Core/Part.cs | 4 +-- PepLib.Core/PartListExtensions.cs | 7 +---- PepLib.Core/Plate.cs | 6 +--- PepLib.Core/PlateListExtensions.cs | 6 ++-- PepLib.Core/Program.cs | 5 +-- PepLib.Core/Report.Drawing.cs | 4 +-- PepLib.Core/Report.cs | 6 +--- PepLib.Core/Tolerance.cs | 4 +-- PepLib.Core/Util.cs | 4 +-- PepLib.Core/Vector.cs | 4 +-- PepLib.Core/ZipHelper.cs | 2 -- 39 files changed, 58 insertions(+), 157 deletions(-) diff --git a/PepLib.Core/AngleConverter.cs b/PepLib.Core/AngleConverter.cs index 50c30dd..b58c78c 100644 --- a/PepLib.Core/AngleConverter.cs +++ b/PepLib.Core/AngleConverter.cs @@ -1,6 +1,4 @@ -using System; - -namespace PepLib +namespace PepLib { public static class AngleConverter { diff --git a/PepLib.Core/Box.cs b/PepLib.Core/Box.cs index e42fc73..03b9144 100644 --- a/PepLib.Core/Box.cs +++ b/PepLib.Core/Box.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace PepLib +namespace PepLib { public class Box { diff --git a/PepLib.Core/Data/Drawing.cs b/PepLib.Core/Data/Drawing.cs index 419dd79..40b1f3c 100644 --- a/PepLib.Core/Data/Drawing.cs +++ b/PepLib.Core/Data/Drawing.cs @@ -1,10 +1,9 @@ namespace PepLib.Data { using System; - using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; - + [Table("Drawing")] public partial class Drawing diff --git a/PepLib.Core/Data/NestDetail.cs b/PepLib.Core/Data/NestDetail.cs index 723e5f5..9f93e42 100644 --- a/PepLib.Core/Data/NestDetail.cs +++ b/PepLib.Core/Data/NestDetail.cs @@ -1,10 +1,9 @@ namespace PepLib.Data { using System; - using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; - + [Table("NestDetail")] public partial class NestDetail diff --git a/PepLib.Core/Data/NestDrawing.cs b/PepLib.Core/Data/NestDrawing.cs index 97837a5..30fbea3 100644 --- a/PepLib.Core/Data/NestDrawing.cs +++ b/PepLib.Core/Data/NestDrawing.cs @@ -1,10 +1,9 @@ namespace PepLib.Data { using System; - using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; - + [Table("NestDrawing")] public partial class NestDrawing diff --git a/PepLib.Core/Data/NestHeader.cs b/PepLib.Core/Data/NestHeader.cs index 831f13a..ce9b05a 100644 --- a/PepLib.Core/Data/NestHeader.cs +++ b/PepLib.Core/Data/NestHeader.cs @@ -1,10 +1,9 @@ namespace PepLib.Data { using System; - using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; - + [Table("NestHeader")] public partial class NestHeader diff --git a/PepLib.Core/Data/PlateDetail.cs b/PepLib.Core/Data/PlateDetail.cs index 378ed7b..27b0239 100644 --- a/PepLib.Core/Data/PlateDetail.cs +++ b/PepLib.Core/Data/PlateDetail.cs @@ -1,10 +1,9 @@ namespace PepLib.Data { using System; - using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; - + [Table("PlateDetail")] public partial class PlateDetail diff --git a/PepLib.Core/Data/PlateHeader.cs b/PepLib.Core/Data/PlateHeader.cs index 144215c..271ff77 100644 --- a/PepLib.Core/Data/PlateHeader.cs +++ b/PepLib.Core/Data/PlateHeader.cs @@ -1,10 +1,9 @@ namespace PepLib.Data { using System; - using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; - + [Table("PlateHeader")] public partial class PlateHeader diff --git a/PepLib.Core/Drawing.cs b/PepLib.Core/Drawing.cs index 82a640b..7e8b280 100644 --- a/PepLib.Core/Drawing.cs +++ b/PepLib.Core/Drawing.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.IO; -using PepLib.Codes; +using PepLib.Codes; using PepLib.IO; namespace PepLib diff --git a/PepLib.Core/DrawingInfo.cs b/PepLib.Core/DrawingInfo.cs index d5d84be..16d8ec1 100644 --- a/PepLib.Core/DrawingInfo.cs +++ b/PepLib.Core/DrawingInfo.cs @@ -1,6 +1,3 @@ -using System; -using System.IO; -using System.Text; using PepLib.IO; namespace PepLib diff --git a/PepLib.Core/Generic.cs b/PepLib.Core/Generic.cs index aaf4cea..35a5f73 100644 --- a/PepLib.Core/Generic.cs +++ b/PepLib.Core/Generic.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace PepLib +namespace PepLib { public static class Generic { diff --git a/PepLib.Core/IO/DrawingInfoReader.cs b/PepLib.Core/IO/DrawingInfoReader.cs index a141e03..691320a 100644 --- a/PepLib.Core/IO/DrawingInfoReader.cs +++ b/PepLib.Core/IO/DrawingInfoReader.cs @@ -1,6 +1,4 @@ -using System; -using System.IO; -using System.Text; +using System.Text; namespace PepLib.IO { diff --git a/PepLib.Core/IO/DrawingReader.cs b/PepLib.Core/IO/DrawingReader.cs index 8aeeb0d..4e883a9 100644 --- a/PepLib.Core/IO/DrawingReader.cs +++ b/PepLib.Core/IO/DrawingReader.cs @@ -1,6 +1,4 @@ -using System; using System.Diagnostics; -using System.IO; using System.IO.Compression; using System.Text.RegularExpressions; diff --git a/PepLib.Core/IO/LoopReader.cs b/PepLib.Core/IO/LoopReader.cs index 7b98eb3..7f3737c 100644 --- a/PepLib.Core/IO/LoopReader.cs +++ b/PepLib.Core/IO/LoopReader.cs @@ -1,6 +1,4 @@ -using System; -using System.IO; -using PepLib.Codes; +using PepLib.Codes; namespace PepLib.IO { diff --git a/PepLib.Core/IO/MaterialDataReader.cs b/PepLib.Core/IO/MaterialDataReader.cs index 290f5ba..4e17b33 100644 --- a/PepLib.Core/IO/MaterialDataReader.cs +++ b/PepLib.Core/IO/MaterialDataReader.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using System.IO; -using System.Text; +using System.Text; namespace PepLib.IO { diff --git a/PepLib.Core/IO/NestInfoReader.cs b/PepLib.Core/IO/NestInfoReader.cs index 73bec80..d797a6f 100644 --- a/PepLib.Core/IO/NestInfoReader.cs +++ b/PepLib.Core/IO/NestInfoReader.cs @@ -1,6 +1,4 @@ -using System; -using System.IO; -using System.Text; +using System.Text; namespace PepLib.IO { diff --git a/PepLib.Core/IO/NestReader.cs b/PepLib.Core/IO/NestReader.cs index 6f245bc..8ccbb15 100644 --- a/PepLib.Core/IO/NestReader.cs +++ b/PepLib.Core/IO/NestReader.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.IO; using System.IO.Compression; using System.Text; using System.Text.RegularExpressions; diff --git a/PepLib.Core/IO/PlateReader.cs b/PepLib.Core/IO/PlateReader.cs index 53bae97..8bc3fd3 100644 --- a/PepLib.Core/IO/PlateReader.cs +++ b/PepLib.Core/IO/PlateReader.cs @@ -1,5 +1,4 @@ -using System.IO; -using PepLib.Codes; +using PepLib.Codes; namespace PepLib.IO { @@ -70,7 +69,7 @@ namespace PepLib.IO if (nextBlock.CodeType() == CodeType.Comment) { var comment = nextBlock as Comment; - + if (comment.Value == "DISPLAY ONLY") { part.IsDisplayOnly = true; diff --git a/PepLib.Core/IO/ProgramReader.cs b/PepLib.Core/IO/ProgramReader.cs index f80a0d7..95cb17f 100644 --- a/PepLib.Core/IO/ProgramReader.cs +++ b/PepLib.Core/IO/ProgramReader.cs @@ -1,7 +1,5 @@ -using System.Collections.Generic; -using System.IO; +using PepLib.Codes; using System.Text; -using PepLib.Codes; namespace PepLib.IO { @@ -164,33 +162,33 @@ namespace PepLib.IO break; case ':': - { - var value = code.Value.Trim().ToUpper(); - - switch (value) { - case "EXTERNAL LEAD-IN": - type = EntityType.ExternalLeadin; - break; + var value = code.Value.Trim().ToUpper(); - case "EXTERNAL LEAD-OUT": - type = EntityType.ExternalLeadout; - break; + switch (value) + { + case "EXTERNAL LEAD-IN": + type = EntityType.ExternalLeadin; + break; - case "INTERNAL LEAD-IN": - type = EntityType.InternalLeadin; - break; + case "EXTERNAL LEAD-OUT": + type = EntityType.ExternalLeadout; + break; - case "INTERNAL LEAD-OUT": - type = EntityType.InternalLeadout; - break; + case "INTERNAL LEAD-IN": + type = EntityType.InternalLeadin; + break; - case "DISPLAY": - type = EntityType.Display; - break; + case "INTERNAL LEAD-OUT": + type = EntityType.InternalLeadout; + break; + + case "DISPLAY": + type = EntityType.Display; + break; + } + break; } - break; - } default: section = CodeSection.Unknown; diff --git a/PepLib.Core/IO/ReportReader.cs b/PepLib.Core/IO/ReportReader.cs index c2d39c7..d3a48a6 100644 --- a/PepLib.Core/IO/ReportReader.cs +++ b/PepLib.Core/IO/ReportReader.cs @@ -1,6 +1,4 @@ -using System; -using System.Diagnostics; -using System.IO; +using System.Diagnostics; namespace PepLib.IO { diff --git a/PepLib.Core/IniConfig.cs b/PepLib.Core/IniConfig.cs index 76e2e34..005691d 100644 --- a/PepLib.Core/IniConfig.cs +++ b/PepLib.Core/IniConfig.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; - -namespace PepLib +namespace PepLib { public class IniConfig { diff --git a/PepLib.Core/Loop.cs b/PepLib.Core/Loop.cs index 01b2975..6cb2ffe 100644 --- a/PepLib.Core/Loop.cs +++ b/PepLib.Core/Loop.cs @@ -1,5 +1,4 @@ -using System; -using PepLib.Codes; +using PepLib.Codes; namespace PepLib { diff --git a/PepLib.Core/MathHelper.cs b/PepLib.Core/MathHelper.cs index 70071ee..3db3c63 100644 --- a/PepLib.Core/MathHelper.cs +++ b/PepLib.Core/MathHelper.cs @@ -1,6 +1,4 @@ -using System; - -namespace PepLib +namespace PepLib { public static class MathHelper { diff --git a/PepLib.Core/Nest.cs b/PepLib.Core/Nest.cs index 18be77b..20b50e7 100644 --- a/PepLib.Core/Nest.cs +++ b/PepLib.Core/Nest.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.IO; -using PepLib.Codes; +using PepLib.Codes; using PepLib.IO; namespace PepLib diff --git a/PepLib.Core/NestDrawing.cs b/PepLib.Core/NestDrawing.cs index f87e946..1a1b9b1 100644 --- a/PepLib.Core/NestDrawing.cs +++ b/PepLib.Core/NestDrawing.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace PepLib +namespace PepLib { public class NestDrawing { diff --git a/PepLib.Core/NestIndex.cs b/PepLib.Core/NestIndex.cs index 8e6780f..d5ebea6 100644 --- a/PepLib.Core/NestIndex.cs +++ b/PepLib.Core/NestIndex.cs @@ -1,7 +1,5 @@ -using System.Collections.Generic; -using System.IO; +using PepLib.IO; using System.Text; -using PepLib.IO; namespace PepLib { diff --git a/PepLib.Core/NestInfo.cs b/PepLib.Core/NestInfo.cs index 231dd6b..23db7a1 100644 --- a/PepLib.Core/NestInfo.cs +++ b/PepLib.Core/NestInfo.cs @@ -1,6 +1,4 @@ -using System; -using System.IO; -using PepLib.IO; +using PepLib.IO; namespace PepLib { diff --git a/PepLib.Core/Node.cs b/PepLib.Core/Node.cs index 1ee9070..90755a3 100644 --- a/PepLib.Core/Node.cs +++ b/PepLib.Core/Node.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; - -namespace PepLib +namespace PepLib { public class Node { diff --git a/PepLib.Core/Part.cs b/PepLib.Core/Part.cs index 4dc10ee..1808254 100644 --- a/PepLib.Core/Part.cs +++ b/PepLib.Core/Part.cs @@ -1,6 +1,4 @@ -using System; - -namespace PepLib +namespace PepLib { public class Part : IMovable { diff --git a/PepLib.Core/PartListExtensions.cs b/PepLib.Core/PartListExtensions.cs index b7f0800..810a021 100644 --- a/PepLib.Core/PartListExtensions.cs +++ b/PepLib.Core/PartListExtensions.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace PepLib +namespace PepLib { public static class PartListExtensions { diff --git a/PepLib.Core/Plate.cs b/PepLib.Core/Plate.cs index 354edf8..e00d475 100644 --- a/PepLib.Core/Plate.cs +++ b/PepLib.Core/Plate.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace PepLib +namespace PepLib { public class Plate : IMovable { diff --git a/PepLib.Core/PlateListExtensions.cs b/PepLib.Core/PlateListExtensions.cs index 382eb01..d5f24eb 100644 --- a/PepLib.Core/PlateListExtensions.cs +++ b/PepLib.Core/PlateListExtensions.cs @@ -1,12 +1,10 @@ -using System.Collections.Generic; - -namespace PepLib +namespace PepLib { public static class PlateListExtensions { public static void JoinLikePlates(this List plates) { - START: + START: for (int i = 0; i < plates.Count; ++i) { diff --git a/PepLib.Core/Program.cs b/PepLib.Core/Program.cs index 6eedc5a..bb71a05 100644 --- a/PepLib.Core/Program.cs +++ b/PepLib.Core/Program.cs @@ -1,8 +1,5 @@ -using System.Collections.Generic; -using System.IO; -using PepLib.Codes; +using PepLib.Codes; using PepLib.IO; -using System; namespace PepLib { diff --git a/PepLib.Core/Report.Drawing.cs b/PepLib.Core/Report.Drawing.cs index fb357e1..fe09cd1 100644 --- a/PepLib.Core/Report.Drawing.cs +++ b/PepLib.Core/Report.Drawing.cs @@ -1,6 +1,4 @@ -using System; - -namespace PepLib +namespace PepLib { public partial class Report { diff --git a/PepLib.Core/Report.cs b/PepLib.Core/Report.cs index 358b69a..f1b83b9 100644 --- a/PepLib.Core/Report.cs +++ b/PepLib.Core/Report.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using PepLib.IO; +using PepLib.IO; namespace PepLib { diff --git a/PepLib.Core/Tolerance.cs b/PepLib.Core/Tolerance.cs index 74cc01b..78adc58 100644 --- a/PepLib.Core/Tolerance.cs +++ b/PepLib.Core/Tolerance.cs @@ -1,6 +1,4 @@ -using System; - -namespace PepLib +namespace PepLib { public static class Tolerance { diff --git a/PepLib.Core/Util.cs b/PepLib.Core/Util.cs index 49ed57f..47be69d 100644 --- a/PepLib.Core/Util.cs +++ b/PepLib.Core/Util.cs @@ -1,6 +1,4 @@ -using System; -using System.Diagnostics; -using System.IO; +using System.Diagnostics; namespace PepLib { diff --git a/PepLib.Core/Vector.cs b/PepLib.Core/Vector.cs index dda5cc2..b17b8ea 100644 --- a/PepLib.Core/Vector.cs +++ b/PepLib.Core/Vector.cs @@ -1,6 +1,4 @@ -using System; - -namespace PepLib +namespace PepLib { public struct Vector { diff --git a/PepLib.Core/ZipHelper.cs b/PepLib.Core/ZipHelper.cs index 2e616ba..3b338a0 100644 --- a/PepLib.Core/ZipHelper.cs +++ b/PepLib.Core/ZipHelper.cs @@ -1,5 +1,3 @@ -using System.Collections.Generic; -using System.IO; using System.IO.Compression; using System.Text.RegularExpressions;