Skip to content

Commit ccdc74a

Browse files
committed
Fix code indentation and formatting
- Fix indentation in MSBuildCustomLocator.cs - Fix indentation in Program.cs - Fix indentation and code structure in Msbuild.groovy - Fix indentation in XbuildResolver.groovy
1 parent 4c4ac1e commit ccdc74a

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

src/main/dotnet/ProjectFileParser/MSBuildCustomLocator.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ public static void Register()
1515
var versions = MSBuildLocator.QueryVisualStudioInstances().OrderBy(vsInstance => vsInstance.Version);
1616
if (versions.Any())
1717
{
18-
var latestVsVersion = versions.Last();
19-
MSBuildLocator.RegisterInstance(latestVsVersion);
20-
Console.Error.WriteLine($"Registered latest VS Instance: {latestVsVersion.Name} - {latestVsVersion.Version} - {latestVsVersion.MSBuildPath} - {latestVsVersion.DiscoveryType} - {latestVsVersion.VisualStudioRootPath}");
18+
var latestVsVersion = versions.Last();
19+
MSBuildLocator.RegisterInstance(latestVsVersion);
20+
Console.Error.WriteLine($"Registered latest VS Instance: {latestVsVersion.Name} - {latestVsVersion.Version} - {latestVsVersion.MSBuildPath} - {latestVsVersion.DiscoveryType} - {latestVsVersion.VisualStudioRootPath}");
2121
return;
2222
}
2323
}
@@ -92,7 +92,7 @@ private static string FindDotnetSdkMsbuild()
9292
if (Directory.Exists(msbuildPath))
9393
{
9494
return msbuildPath;
95-
}
95+
}
9696
}
9797
}
9898
}

src/main/dotnet/ProjectFileParser/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ private static int Main(string[] args)
3434
};
3535
}
3636
}
37-
var result = Parse(args[0], parseArgs);
38-
Console.WriteLine(result);
37+
var result = Parse(args[0], parseArgs);
38+
Console.WriteLine(result);
3939
}
4040
}
4141
catch (Exception e)

src/main/groovy/com/ullink/Msbuild.groovy

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class Msbuild extends ConventionTask {
129129
// Try to resolve/parse, but catch ALL errors and check if they're old project format errors
130130
try {
131131
if (projectParsed == null && parseProject) {
132-
resolveProject()
132+
resolveProject()
133133
}
134134
} catch (OldProjectFormatException e) {
135135
// Old project format detected - skip parsing
@@ -185,7 +185,7 @@ class Msbuild extends ConventionTask {
185185
}
186186
return msg.toString()
187187
}
188-
188+
189189
@Internal
190190
ProjectFileParser getMainProject() {
191191
if (resolveProject()) {
@@ -286,17 +286,17 @@ class Msbuild extends ConventionTask {
286286
if (isSolutionBuild()) {
287287
def rootSolutionFile = getRootedSolutionFile()
288288
try {
289-
def result = parseProjectFile(rootSolutionFile)
290-
allProjects = result.collectEntries { [it.key, new ProjectFileParser(msbuild: this, eval: it.value)] }
291-
def projectName = getProjectName()
292-
if (projectName == null || projectName.isEmpty()) {
289+
def result = parseProjectFile(rootSolutionFile)
290+
allProjects = result.collectEntries { [it.key, new ProjectFileParser(msbuild: this, eval: it.value)] }
291+
def projectName = getProjectName()
292+
if (projectName == null || projectName.isEmpty()) {
293+
parseProject = false
294+
} else {
295+
projectParsed = allProjects[projectName]
296+
if (projectParsed == null) {
293297
parseProject = false
294-
} else {
295-
projectParsed = allProjects[projectName]
296-
if (projectParsed == null) {
297-
parseProject = false
298-
logger.warn "Project ${projectName} not found in solution"
299-
}
298+
logger.warn "Project ${projectName} not found in solution"
299+
}
300300
}
301301
} catch (OldProjectFormatException e) {
302302
// Old project format - skip parsing
@@ -338,11 +338,11 @@ class Msbuild extends ConventionTask {
338338
} else if (isProjectBuild()) {
339339
def rootProjectFile = getRootedProjectFile()
340340
try {
341-
def result = parseProjectFile(rootProjectFile)
342-
allProjects = result.collectEntries {[it.key, new ProjectFileParser(msbuild: this, eval: it.value)]}
343-
projectParsed = allProjects.values().first()
344-
if (!projectParsed) {
345-
logger.warn "Parsed project ${rootProjectFile} is null (not a solution / project build)"
341+
def result = parseProjectFile(rootProjectFile)
342+
allProjects = result.collectEntries {[it.key, new ProjectFileParser(msbuild: this, eval: it.value)]}
343+
projectParsed = allProjects.values().first()
344+
if (!projectParsed) {
345+
logger.warn "Parsed project ${rootProjectFile} is null (not a solution / project build)"
346346
}
347347
} catch (OldProjectFormatException e) {
348348
// Old project format - skip parsing

src/main/groovy/com/ullink/XbuildResolver.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class XbuildResolver implements IExecutableResolver {
1313
return new ProcessBuilder('dotnet', 'msbuild')
1414
} else {
1515
// Use mono for Mono's xbuild/MSBuild
16-
return new ProcessBuilder('mono', exe.toString())
16+
return new ProcessBuilder('mono', exe.toString())
1717
}
1818
}
1919

0 commit comments

Comments
 (0)