Skip to content

Commit

Permalink
Merge pull request #308 from trylek/SrcCoreclrNoSecondSrc
Browse files Browse the repository at this point in the history
Counterpart fix for #44973 - remove extra "src" folder level
  • Loading branch information
trylek authored Dec 8, 2020
2 parents bd80267 + 32cc7bf commit d9d36de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/jit-format/jit-format.cs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ public static int Main(string[] args)
if (config.Filenames.Count() == 0)
{
// add all files to a list of files
foreach (string filename in Directory.GetFiles(Path.Combine(config.CoreCLRRoot, "src", config.SourceDirectory)))
foreach (string filename in Directory.GetFiles(Path.Combine(config.CoreCLRRoot, config.SourceDirectory)))
{
// if it's not a directory, add it to our list
if (!Directory.Exists(filename) && (filename.EndsWith(".cpp") || filename.EndsWith(".h") || filename.EndsWith(".hpp")))
Expand All @@ -424,7 +424,7 @@ public static int Main(string[] args)
string prefix = "";
if (!filename.Contains(config.CoreCLRRoot))
{
prefix = Path.Combine(config.CoreCLRRoot, "src", config.SourceDirectory);
prefix = Path.Combine(config.CoreCLRRoot, config.SourceDirectory);
}

if (File.Exists(Path.Combine(prefix, filename)))
Expand Down Expand Up @@ -572,7 +572,7 @@ public static string rewriteCompileCommands (string compileCommandFile, string p
// of the precompiled header file. It's not needed for clang-tidy and currently the precompiled
// header won't be found at the specified location: we run the build that generates compile_commands.json
// in ConfigureOnly mode so the precompiled headers are not generated.
else if (option.Contains("src/jit") && !option.StartsWith("/Fp"))
else if (option.Contains("jit") && !option.StartsWith("/Fp"))
{
compileCommand = compileCommand + " " + option;
}
Expand Down Expand Up @@ -627,7 +627,7 @@ public static bool DoClangTidyInnerLoop(bool fix, bool ignoreErrors, string chec

if (filename.EndsWith(".cpp"))
{
List<string> commandArgs = new List<string> { tidyFix, "-checks=-*," + checks, fixErrors, "-header-filter=src/jit/.*", "-p=" + compileCommands, filename };
List<string> commandArgs = new List<string> { tidyFix, "-checks=-*," + checks, fixErrors, "-header-filter=jit/.*", "-p=" + compileCommands, filename };

if (verbose)
{
Expand Down

0 comments on commit d9d36de

Please sign in to comment.