Skip to content

Commit

Permalink
Fix ignoring projects
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamco committed May 2, 2024
1 parent 4487906 commit a41a9bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/OrchardCoreContrib.PoExtractor/IgnoredProject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace OrchardCoreContrib.PoExtractor;

public class IgnoredProject
{
public static readonly string Docs = "src\\dos";
public static readonly string Docs = "src\\docs";

public static readonly string Cms = "src\\OrchardCore.Cms.Web";

Expand Down
12 changes: 2 additions & 10 deletions src/OrchardCoreContrib.PoExtractor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ public class Program
{
private static readonly string _defaultLanguage = Language.CSharp;
private static readonly string _defaultTemplateEngine = TemplateEngine.Both;
private static readonly string[] _ignoredProjects =
[
"docs",
"src\\OrchardCore.Cms.Web",
"src\\OrchardCore.Mvc.Web",
"src\\Templates",
"test"
];

public static void Main(string[] args)
{
Expand Down Expand Up @@ -90,8 +82,8 @@ public static void Main(string[] args)
var projectPath = Path.GetDirectoryName(projectFile);
var projectBasePath = Path.GetDirectoryName(projectPath) + Path.DirectorySeparatorChar;
var projectRelativePath = projectPath[projectBasePath.Length..];

if (IgnoredProject.ToList().Any(p => projectRelativePath.StartsWith(p)))
var rootedProject = projectPath[(projectPath.IndexOf(inputPath) + inputPath.Length + 1)..];
if (IgnoredProject.ToList().Any(p => rootedProject.StartsWith(p)))
{
continue;
}
Expand Down

0 comments on commit a41a9bc

Please sign in to comment.