Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Counterpart fix for #44973 - remove extra "src" folder level #308

Merged
merged 2 commits into from
Dec 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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