Skip to content

Commit

Permalink
Merge branch 'dotnetformat' into 'main'
Browse files Browse the repository at this point in the history
ran dotnet format

See merge request Sharpmake/sharpmake!430
  • Loading branch information
jspelletier committed Aug 2, 2023
2 parents c9c23c7 + e67ba05 commit 647a346
Show file tree
Hide file tree
Showing 122 changed files with 278 additions and 1,464 deletions.
10 changes: 5 additions & 5 deletions Sharpmake.Generators/Apple/XCodeProj.cs
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ private void RegisterScriptBuildPhase(string xCodeTargetName, Dictionary<string,

private void RegisterHeadersBuildPhase(string xCodeTargetName, Dictionary<string, UniqueList<ProjectHeadersBuildPhase>> headersBuildPhases)
{
var headerFiles = _projectItems
var headerFiles = _projectItems
.Where(p => p is ProjectBuildFile)
.Select(p => p as ProjectBuildFile)
.Where(p => p.File.IsHeader)
Expand Down Expand Up @@ -695,7 +695,7 @@ private void RegisterCopyFilesBuildPhases(string xCodeTargetName, Dictionary<str

private void RegisterCopyFilesBuildPhases(string xCodeTargetName, Dictionary<string, UniqueList<ProjectCopyFilesBuildPhase>> copyFilesPhases, IEnumerator<KeyValuePair<string, string>> filesAndTargets)
{
while(filesAndTargets.MoveNext())
while (filesAndTargets.MoveNext())
{
var fileAndTarget = filesAndTargets.Current;
RegisterCopyFilesBuildPhases(xCodeTargetName, copyFilesPhases, fileAndTarget.Key, fileAndTarget.Value);
Expand Down Expand Up @@ -1227,8 +1227,8 @@ private Options.ExplicitOptions GenerateOptions(XCodeGenerationContext context)
}

if (Path.HasExtension(library) &&
((Path.GetExtension(library).EndsWith(".a", StringComparison.OrdinalIgnoreCase ) ||
Path.GetExtension(library).EndsWith(".dylib", StringComparison.OrdinalIgnoreCase )
((Path.GetExtension(library).EndsWith(".a", StringComparison.OrdinalIgnoreCase) ||
Path.GetExtension(library).EndsWith(".dylib", StringComparison.OrdinalIgnoreCase)
)))
{
library = Path.GetFileNameWithoutExtension(library);
Expand Down Expand Up @@ -1718,7 +1718,7 @@ public ProjectSystemFrameworkFile(string frameworkFileName)

private class ProjectDeveloperFrameworkFile : ProjectFrameworkFile
{
private static readonly string s_frameworkPath = System.IO.Path.Combine("..", "..", "Library", "Frameworks");
private static readonly string s_frameworkPath = System.IO.Path.Combine("..", "..", "Library", "Frameworks");

public ProjectDeveloperFrameworkFile(string frameworkFileName)
: base(System.IO.Path.Combine(s_frameworkPath, frameworkFileName))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ public virtual void SelectCompilerOptions(IGenerationContext context)
Options.Option(Options.XCode.Compiler.MetalFastMath.Enable, () => options["MetalFastMath"] = "YES")
);

#region infoplist keys
#region infoplist keys
/// common keys
options["CFBundleSpokenName"] = Options.StringOption.Get<Options.XCode.InfoPlist.CFBundleSpokenName>(conf);
options["CFBundleDevelopmentRegion"] = Options.StringOption.Get<Options.XCode.InfoPlist.CFBundleDevelopmentRegion>(conf);
Expand Down Expand Up @@ -1039,7 +1039,7 @@ public virtual void SelectCompilerOptions(IGenerationContext context)

/// - tvOS specific, set to proper value in override method
options["UIAppSupportsHDR"] = FileGeneratorUtilities.RemoveLineTag;
#endregion // infoplist keys
#endregion // infoplist keys
}

public virtual void SelectPrecompiledHeaderOptions(IGenerationContext context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ public override void SelectCompilerOptions(IGenerationContext context)
cmdLineOptions["IPhoneOSDeploymentTarget"] = FileGeneratorUtilities.RemoveLineTag;
}

context.SelectOptionWithFallback(
() => options["SupportsMaccatalyst"] = "YES",
Options.Option(Options.XCode.Compiler.SupportsMaccatalyst.Disable, () => options["SupportsMaccatalyst"] = "NO")
);
context.SelectOptionWithFallback(
() => options["SupportsMaccatalyst"] = "YES",
Options.Option(Options.XCode.Compiler.SupportsMaccatalyst.Disable, () => options["SupportsMaccatalyst"] = "NO")
);
context.SelectOptionWithFallback(
() => options["SupportsMacDesignedForIphoneIpad"] = "YES",
Options.Option(Options.XCode.Compiler.SupportsMacDesignedForIphoneIpad.Disable, () => options["SupportsMacDesignedForIphoneIpad"] = "NO")
);

#region infoplist keys
#region infoplist keys
// MacOS specific flags
options["NSHumanReadableCopyright"] = Options.StringOption.Get<Options.XCode.InfoPlist.NSHumanReadableCopyright>(conf);

Expand Down Expand Up @@ -254,7 +254,7 @@ public override void SelectCompilerOptions(IGenerationContext context)
Options.Option(Options.XCode.InfoPlist.UIRequiresPersistentWiFi.Disable, () => options["UIRequiresPersistentWiFi"] = "NO"),
Options.Option(Options.XCode.InfoPlist.UIRequiresPersistentWiFi.Enable, () => options["UIRequiresPersistentWiFi"] = "YES")
);
#endregion //infoplist keys
#endregion //infoplist keys
}

public override void SelectLinkerOptions(IGenerationContext context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public override void SelectCompilerOptions(IGenerationContext context)
options["SupportsMaccatalyst"] = FileGeneratorUtilities.RemoveLineTag;
options["SupportsMacDesignedForIphoneIpad"] = FileGeneratorUtilities.RemoveLineTag;

#region infoplist keys
#region infoplist keys
// MacOS specific flags
options["NSHumanReadableCopyright"] = Options.StringOption.Get<Options.XCode.InfoPlist.NSHumanReadableCopyright>(conf);
options["NSMainStoryboardFile"] = Options.StringOption.Get<Options.XCode.InfoPlist.NSMainStoryboardFile>(conf);
Expand Down Expand Up @@ -110,7 +110,7 @@ public override void SelectCompilerOptions(IGenerationContext context)
Options.Option(Options.XCode.InfoPlist.UISupportsTrueScreenSizeOnMac.Disable, () => options["UISupportsTrueScreenSizeOnMac"] = "NO"),
Options.Option(Options.XCode.InfoPlist.UISupportsTrueScreenSizeOnMac.Enable, () => options["UISupportsTrueScreenSizeOnMac"] = "YES")
);
#endregion // infoplist keys
#endregion // infoplist keys
}

public override void SelectLinkerOptions(IGenerationContext context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public override void SelectCompilerOptions(IGenerationContext context)
Options.Option(Options.XCode.Compiler.SupportsMacDesignedForIphoneIpad.Enable, () => options["SupportsMacDesignedForIphoneIpad"] = "YES")
);

#region infoplist keys
#region infoplist keys
context.SelectOptionWithFallback(
() => options["LSRequiresIPhoneOS"] = FileGeneratorUtilities.RemoveLineTag,
Options.Option(Options.XCode.InfoPlist.LSRequiresIPhoneOS.Disable, () => options["LSRequiresIPhoneOS"] = "NO"),
Expand Down Expand Up @@ -228,7 +228,7 @@ public override void SelectCompilerOptions(IGenerationContext context)
Options.Option(Options.XCode.InfoPlist.UIRequiresPersistentWiFi.Disable, () => options["UIRequiresPersistentWiFi"] = "NO"),
Options.Option(Options.XCode.InfoPlist.UIRequiresPersistentWiFi.Enable, () => options["UIRequiresPersistentWiFi"] = "YES")
);
#endregion //infoplist keys
#endregion //infoplist keys
}

public override void SelectLinkerOptions(IGenerationContext context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ public override void SelectCompilerOptions(IGenerationContext context)
options["SupportsMaccatalyst"] = FileGeneratorUtilities.RemoveLineTag;
options["SupportsMacDesignedForIphoneIpad"] = FileGeneratorUtilities.RemoveLineTag;

#region infoplist keys
#region infoplist keys
context.SelectOptionWithFallback(
() => options["UIAppSupportsHDR"] = FileGeneratorUtilities.RemoveLineTag,
Options.Option(Options.XCode.InfoPlist.UIAppSupportsHDR.Disable, () => options["UIAppSupportsHDR"] = "NO"),
Options.Option(Options.XCode.InfoPlist.UIAppSupportsHDR.Enable, () => options["UIAppSupportsHDR"] = "YES")
);
#endregion // infoplist keys
#endregion // infoplist keys
}

public override void SelectLinkerOptions(IGenerationContext context)
Expand Down
4 changes: 2 additions & 2 deletions Sharpmake.UnitTests/TargetTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ public void HaveFragment_WithNonexistentField_ReturnsFalse()
[Flags, Fragment]
enum BogusFragment
{
one = 1<<0,
two = 1<<1
one = 1 << 0,
two = 1 << 1
}

[TestCase(Optimization.Release, true)]
Expand Down
8 changes: 4 additions & 4 deletions Sharpmake/Options.XCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -944,14 +944,14 @@ public enum UIInterfaceOrientation

public class UIInterfaceOrientation_iPhone : WithArgOption<UIInterfaceOrientation>
{
public UIInterfaceOrientation_iPhone(UIInterfaceOrientation value)
: base(value) { }
public UIInterfaceOrientation_iPhone(UIInterfaceOrientation value)
: base(value) { }
}

public class UIInterfaceOrientation_iPad : WithArgOption<UIInterfaceOrientation>
{
public UIInterfaceOrientation_iPad(UIInterfaceOrientation value)
: base(value) { }
public UIInterfaceOrientation_iPad(UIInterfaceOrientation value)
: base(value) { }
}

public class UISupportedInterfaceOrientations : UniqueList<UIInterfaceOrientation>
Expand Down
2 changes: 1 addition & 1 deletion Sharpmake/Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ public bool HaveFragment<T>()
var tType = typeof(T);
return fragments.Any(fragment => fragment.FieldType == tType);
}

public bool HaveFragmentOfSameType(object asFragment)
{
FieldInfo[] fragments = GetType().GetFields();
Expand Down
15 changes: 2 additions & 13 deletions samples/CPPCLI/CLRTest.sharpmake.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
// Copyright (c) 2017, 2019, 2021 Ubisoft Entertainment
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright (c) Ubisoft. All Rights Reserved.
// Licensed under the Apache 2.0 License. See LICENSE.md in the project root for license information.

using System;
using System.Collections.Generic;
Expand Down
15 changes: 2 additions & 13 deletions samples/CPPCLI/projects.sharpmake.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
// Copyright (c) 2017, 2019, 2021-2022 Ubisoft Entertainment
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright (c) Ubisoft. All Rights Reserved.
// Licensed under the Apache 2.0 License. See LICENSE.md in the project root for license information.

using System;
using System.Collections.Generic;
Expand Down
15 changes: 2 additions & 13 deletions samples/CSharpHelloWorld/HelloWorld.sharpmake.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
// Copyright (c) 2017, 2019, 2021-2022 Ubisoft Entertainment
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright (c) Ubisoft. All Rights Reserved.
// Licensed under the Apache 2.0 License. See LICENSE.md in the project root for license information.

using System;
using Sharpmake;
Expand Down
15 changes: 2 additions & 13 deletions samples/CSharpHelloWorld/common.sharpmake.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
// Copyright (c) 2017, 2019-2022 Ubisoft Entertainment
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright (c) Ubisoft. All Rights Reserved.
// Licensed under the Apache 2.0 License. See LICENSE.md in the project root for license information.

using Sharpmake;

Expand Down
15 changes: 2 additions & 13 deletions samples/CSharpImports/CSharpImports.sharpmake.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
// Copyright (c) 2020-2021 Ubisoft Entertainment
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright (c) Ubisoft. All Rights Reserved.
// Licensed under the Apache 2.0 License. See LICENSE.md in the project root for license information.

using System;
using System.IO;
Expand Down
15 changes: 2 additions & 13 deletions samples/CSharpImports/common.sharpmake.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
// Copyright (c) 2020-2022 Ubisoft Entertainment
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright (c) Ubisoft. All Rights Reserved.
// Licensed under the Apache 2.0 License. See LICENSE.md in the project root for license information.

using Sharpmake;

Expand Down
15 changes: 2 additions & 13 deletions samples/CSharpVsix/CSharpVsix.sharpmake.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
// Copyright (c) 2017-2019, 2021 Ubisoft Entertainment
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright (c) Ubisoft. All Rights Reserved.
// Licensed under the Apache 2.0 License. See LICENSE.md in the project root for license information.

using System;
using Sharpmake;
Expand Down
15 changes: 2 additions & 13 deletions samples/CSharpWCF/CSharpWCF.sharpmake.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
// Copyright (c) 2018-2019, 2021 Ubisoft Entertainment
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright (c) Ubisoft. All Rights Reserved.
// Licensed under the Apache 2.0 License. See LICENSE.md in the project root for license information.

using System;
using System.IO;
Expand Down
15 changes: 2 additions & 13 deletions samples/CompileCommandDatabase/CompileCommandDatabase.sharpmake.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
// Copyright (c) 2020-2021 Ubisoft Entertainment
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright (c) Ubisoft. All Rights Reserved.
// Licensed under the Apache 2.0 License. See LICENSE.md in the project root for license information.

using System.Collections.Generic;
using System.IO;
Expand Down
15 changes: 2 additions & 13 deletions samples/ConfigureOrder/ConfigureOrdering.sharpmake.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
// Copyright (c) 2017, 2019, 2021 Ubisoft Entertainment
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright (c) Ubisoft. All Rights Reserved.
// Licensed under the Apache 2.0 License. See LICENSE.md in the project root for license information.

using System;
using Sharpmake;
Expand Down
15 changes: 2 additions & 13 deletions samples/ConfigureOrder/Util.sharpmake.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
// Copyright (c) 2017, 2019, 2021 Ubisoft Entertainment
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright (c) Ubisoft. All Rights Reserved.
// Licensed under the Apache 2.0 License. See LICENSE.md in the project root for license information.

using Sharpmake;

Expand Down
Loading

0 comments on commit 647a346

Please sign in to comment.