From 2a41df0d61d1a4d80a35f44c2022edfe3580353d Mon Sep 17 00:00:00 2001 From: Samuel Meenzen Date: Fri, 29 Dec 2023 14:49:39 +0100 Subject: [PATCH] feat: configure Visual Studio and Rider to automatically set the license header Signed-off-by: Samuel Meenzen --- dotnet-tests/.editorconfig | 12 ++++++++---- dotnet-tests/UniffiCS.BindingTests/TestArithmetic.cs | 6 +++--- dotnet-tests/UniffiCS.BindingTests/TestCallbacks.cs | 6 +++--- .../UniffiCS.BindingTests/TestCallbacksFixture.cs | 6 +++--- .../UniffiCS.BindingTests/TestChronological.cs | 6 +++--- dotnet-tests/UniffiCS.BindingTests/TestCoverall.cs | 6 +++--- .../UniffiCS.BindingTests/TestCustomTypes.cs | 6 +++--- .../UniffiCS.BindingTests/TestCustomTypesBuiltin.cs | 6 +++--- dotnet-tests/UniffiCS.BindingTests/TestDisposable.cs | 6 +++--- dotnet-tests/UniffiCS.BindingTests/TestDocstring.cs | 6 +++--- dotnet-tests/UniffiCS.BindingTests/TestGeometry.cs | 6 +++--- .../TestGlobalMethodsClassName.cs | 6 +++--- dotnet-tests/UniffiCS.BindingTests/TestRondpoint.cs | 6 +++--- dotnet-tests/UniffiCS.BindingTests/TestSprites.cs | 6 +++--- dotnet-tests/UniffiCS.BindingTests/TestTodoList.cs | 6 +++--- .../UniffiCS.BindingTests/TestTraitMethod.cs | 6 +++--- dotnet-tests/UniffiCS.BindingTests/Usings.cs | 6 +++--- dotnet-tests/UniffiCS.Tests/TestBigEndianStream.cs | 4 ++++ dotnet-tests/UniffiCS.Tests/Usings.cs | 4 ++++ 19 files changed, 64 insertions(+), 52 deletions(-) diff --git a/dotnet-tests/.editorconfig b/dotnet-tests/.editorconfig index 13657cd..95dfeba 100644 --- a/dotnet-tests/.editorconfig +++ b/dotnet-tests/.editorconfig @@ -3,15 +3,19 @@ # top-most EditorConfig file root = true -# CSharpier: https://csharpier.com/docs/Configuration [*] -# Non-configurable behaviors + +# License header +file_header_template = This Source Code Form is subject to the terms of the Mozilla Public\nLicense, v. 2.0. If a copy of the MPL was not distributed with this\nfile, You can obtain one at http://mozilla.org/MPL/2.0/. + +# CSharpier: https://csharpier.com/docs/Configuration +## Non-configurable behaviors charset = utf-8 insert_final_newline = true trim_trailing_whitespace = true -# Configurable behaviors +## Configurable behaviors end_of_line = lf indent_style = space indent_size = 4 -max_line_length = 120 \ No newline at end of file +max_line_length = 120 diff --git a/dotnet-tests/UniffiCS.BindingTests/TestArithmetic.cs b/dotnet-tests/UniffiCS.BindingTests/TestArithmetic.cs index f0d10a8..eb26289 100644 --- a/dotnet-tests/UniffiCS.BindingTests/TestArithmetic.cs +++ b/dotnet-tests/UniffiCS.BindingTests/TestArithmetic.cs @@ -1,6 +1,6 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. using uniffi.arithmetic; using ArithmeticException = uniffi.arithmetic.ArithmeticException; diff --git a/dotnet-tests/UniffiCS.BindingTests/TestCallbacks.cs b/dotnet-tests/UniffiCS.BindingTests/TestCallbacks.cs index 09a8ef5..f7777a9 100644 --- a/dotnet-tests/UniffiCS.BindingTests/TestCallbacks.cs +++ b/dotnet-tests/UniffiCS.BindingTests/TestCallbacks.cs @@ -1,6 +1,6 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. using System; using uniffi.callbacks; diff --git a/dotnet-tests/UniffiCS.BindingTests/TestCallbacksFixture.cs b/dotnet-tests/UniffiCS.BindingTests/TestCallbacksFixture.cs index 7a8bf64..2ae7d9c 100644 --- a/dotnet-tests/UniffiCS.BindingTests/TestCallbacksFixture.cs +++ b/dotnet-tests/UniffiCS.BindingTests/TestCallbacksFixture.cs @@ -1,6 +1,6 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. using System; using System.Collections.Generic; diff --git a/dotnet-tests/UniffiCS.BindingTests/TestChronological.cs b/dotnet-tests/UniffiCS.BindingTests/TestChronological.cs index 14f51af..0bc3903 100644 --- a/dotnet-tests/UniffiCS.BindingTests/TestChronological.cs +++ b/dotnet-tests/UniffiCS.BindingTests/TestChronological.cs @@ -1,6 +1,6 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. using System; using System.Threading; diff --git a/dotnet-tests/UniffiCS.BindingTests/TestCoverall.cs b/dotnet-tests/UniffiCS.BindingTests/TestCoverall.cs index 5c715bd..9d0e96e 100644 --- a/dotnet-tests/UniffiCS.BindingTests/TestCoverall.cs +++ b/dotnet-tests/UniffiCS.BindingTests/TestCoverall.cs @@ -1,6 +1,6 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. using System; using System.Threading; diff --git a/dotnet-tests/UniffiCS.BindingTests/TestCustomTypes.cs b/dotnet-tests/UniffiCS.BindingTests/TestCustomTypes.cs index cb61211..af43991 100644 --- a/dotnet-tests/UniffiCS.BindingTests/TestCustomTypes.cs +++ b/dotnet-tests/UniffiCS.BindingTests/TestCustomTypes.cs @@ -1,6 +1,6 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. using System; using uniffi.custom_types; diff --git a/dotnet-tests/UniffiCS.BindingTests/TestCustomTypesBuiltin.cs b/dotnet-tests/UniffiCS.BindingTests/TestCustomTypesBuiltin.cs index 7429fec..4e86e94 100644 --- a/dotnet-tests/UniffiCS.BindingTests/TestCustomTypesBuiltin.cs +++ b/dotnet-tests/UniffiCS.BindingTests/TestCustomTypesBuiltin.cs @@ -1,6 +1,6 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. using System; using System.Collections.Generic; diff --git a/dotnet-tests/UniffiCS.BindingTests/TestDisposable.cs b/dotnet-tests/UniffiCS.BindingTests/TestDisposable.cs index 9af2a1f..8115e03 100644 --- a/dotnet-tests/UniffiCS.BindingTests/TestDisposable.cs +++ b/dotnet-tests/UniffiCS.BindingTests/TestDisposable.cs @@ -1,6 +1,6 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. using uniffi.disposable; diff --git a/dotnet-tests/UniffiCS.BindingTests/TestDocstring.cs b/dotnet-tests/UniffiCS.BindingTests/TestDocstring.cs index 885c706..679ee1d 100644 --- a/dotnet-tests/UniffiCS.BindingTests/TestDocstring.cs +++ b/dotnet-tests/UniffiCS.BindingTests/TestDocstring.cs @@ -1,6 +1,6 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. using System.Collections.Generic; using System.IO; diff --git a/dotnet-tests/UniffiCS.BindingTests/TestGeometry.cs b/dotnet-tests/UniffiCS.BindingTests/TestGeometry.cs index d64970e..f749a24 100644 --- a/dotnet-tests/UniffiCS.BindingTests/TestGeometry.cs +++ b/dotnet-tests/UniffiCS.BindingTests/TestGeometry.cs @@ -1,6 +1,6 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. using uniffi.geometry; diff --git a/dotnet-tests/UniffiCS.BindingTests/TestGlobalMethodsClassName.cs b/dotnet-tests/UniffiCS.BindingTests/TestGlobalMethodsClassName.cs index bf4a0b3..0ec714f 100644 --- a/dotnet-tests/UniffiCS.BindingTests/TestGlobalMethodsClassName.cs +++ b/dotnet-tests/UniffiCS.BindingTests/TestGlobalMethodsClassName.cs @@ -1,6 +1,6 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. using uniffi.global_methods_class_name; diff --git a/dotnet-tests/UniffiCS.BindingTests/TestRondpoint.cs b/dotnet-tests/UniffiCS.BindingTests/TestRondpoint.cs index b7cda89..b1ca53c 100644 --- a/dotnet-tests/UniffiCS.BindingTests/TestRondpoint.cs +++ b/dotnet-tests/UniffiCS.BindingTests/TestRondpoint.cs @@ -1,6 +1,6 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. using System; using System.Collections.Generic; diff --git a/dotnet-tests/UniffiCS.BindingTests/TestSprites.cs b/dotnet-tests/UniffiCS.BindingTests/TestSprites.cs index 70728fd..22272e1 100644 --- a/dotnet-tests/UniffiCS.BindingTests/TestSprites.cs +++ b/dotnet-tests/UniffiCS.BindingTests/TestSprites.cs @@ -1,6 +1,6 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. using uniffi.sprites; diff --git a/dotnet-tests/UniffiCS.BindingTests/TestTodoList.cs b/dotnet-tests/UniffiCS.BindingTests/TestTodoList.cs index c044d29..2f27b08 100644 --- a/dotnet-tests/UniffiCS.BindingTests/TestTodoList.cs +++ b/dotnet-tests/UniffiCS.BindingTests/TestTodoList.cs @@ -1,6 +1,6 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. using System.Collections.Generic; using uniffi.todolist; diff --git a/dotnet-tests/UniffiCS.BindingTests/TestTraitMethod.cs b/dotnet-tests/UniffiCS.BindingTests/TestTraitMethod.cs index e4220c2..b26638f 100644 --- a/dotnet-tests/UniffiCS.BindingTests/TestTraitMethod.cs +++ b/dotnet-tests/UniffiCS.BindingTests/TestTraitMethod.cs @@ -1,6 +1,6 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. using uniffi.trait_methods; diff --git a/dotnet-tests/UniffiCS.BindingTests/Usings.cs b/dotnet-tests/UniffiCS.BindingTests/Usings.cs index ca0bcca..2d703f1 100644 --- a/dotnet-tests/UniffiCS.BindingTests/Usings.cs +++ b/dotnet-tests/UniffiCS.BindingTests/Usings.cs @@ -1,5 +1,5 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. global using Xunit; diff --git a/dotnet-tests/UniffiCS.Tests/TestBigEndianStream.cs b/dotnet-tests/UniffiCS.Tests/TestBigEndianStream.cs index 10daba9..641b78d 100644 --- a/dotnet-tests/UniffiCS.Tests/TestBigEndianStream.cs +++ b/dotnet-tests/UniffiCS.Tests/TestBigEndianStream.cs @@ -1,3 +1,7 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + using UniffiCS.Tests.gen; namespace UniffiCS.Tests; diff --git a/dotnet-tests/UniffiCS.Tests/Usings.cs b/dotnet-tests/UniffiCS.Tests/Usings.cs index c802f44..2d703f1 100644 --- a/dotnet-tests/UniffiCS.Tests/Usings.cs +++ b/dotnet-tests/UniffiCS.Tests/Usings.cs @@ -1 +1,5 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + global using Xunit;