Skip to content

Commit

Permalink
Merge pull request #2 from DrPepperBianco/khalidabuhakmeh/fix-exclude…
Browse files Browse the repository at this point in the history
…Paths

Fix excludePaths from skipping incorrectly
  • Loading branch information
DrPepperBianco committed Oct 3, 2022
2 parents 2fb1a30 + 4622dce commit 26452cb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/PlantUmlClassDiagramGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,16 @@ private static bool GeneratePlantUmlFromDir(Dictionary<string, string> parameter
var pumlexclude = CombinePath(inputRoot, ".pumlexclude");
if (File.Exists(pumlexclude))
{
excludePaths = File.ReadAllLines(pumlexclude).ToList();
excludePaths = File
.ReadAllLines(pumlexclude)
.Where(path => !string.IsNullOrWhiteSpace(path))
.Select(path => path.Trim())
.ToList();
}
if (parameters.ContainsKey("-excludePaths"))
{
excludePaths.AddRange(parameters["-excludePaths"].Split(','));
var splitOptions = StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries;
excludePaths.AddRange(parameters["-excludePaths"].Split(',', splitOptions));
}

var files = Directory.EnumerateFiles(inputRoot, "*.cs", SearchOption.AllDirectories);
Expand Down

0 comments on commit 26452cb

Please sign in to comment.