Skip to content

Commit 055d164

Browse files
authored
Add editor config to solutions (#113)
***NO_CI***
1 parent e732655 commit 055d164

37 files changed

+9
-316
lines changed

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[*.cs]
2+
3+
# S4200: Native methods should be wrapped
4+
# It's OK to have native methods unwrapped in nanoFramework
5+
dotnet_diagnostic.S4200.severity = none

nanoFramework.CoreLibrary.sln

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.27130.2010
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30503.244
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "CoreLibrary", "nanoFramework.CoreLibrary\CoreLibrary.nfproj", "{BE7B95D5-087C-45F8-8197-4B438BEDFE11}"
77
EndProject
88
Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "CoreLibrary.NoReflection", "nanoFramework.CoreLibrary.NoReflection\CoreLibrary.NoReflection.nfproj", "{D1DAD305-BC77-4BDC-BCDA-ADAEF1D93455}"
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{05E83B20-2648-4807-8F3E-D656497E3481}"
1111
ProjectSection(SolutionItems) = preProject
12+
.editorconfig = .editorconfig
1213
nanoFramework.CoreLibrary.NoReflection.nuspec = nanoFramework.CoreLibrary.NoReflection.nuspec
1314
nanoFramework.CoreLibrary.nuspec = nanoFramework.CoreLibrary.nuspec
1415
NuGet.Config = NuGet.Config

nanoFramework.CoreLibrary/CoreLibrary.nfproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@
363363
</NFMDP_PE_ExcludeClassByName>
364364
</ItemGroup>
365365
<ItemGroup>
366+
<None Include="..\.editorconfig" Link=".editorconfig" />
366367
<None Include="key.snk" />
367368
<None Include="packages.config" />
368369
</ItemGroup>

nanoFramework.CoreLibrary/System/AppDomain.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ private AppDomain()
4747
/// <param name="friendlyName">The friendly name of the domain.</param>
4848
/// <returns>The newly created application domain.</returns>
4949
[MethodImpl(MethodImplOptions.InternalCall)]
50-
#pragma warning disable S4200 // Native methods should be wrapped
5150
public static extern AppDomain CreateDomain(String friendlyName);
52-
#pragma warning restore S4200 // Native methods should be wrapped
5351

5452
#if NANOCLR_REFLECTION
5553
/// <summary>
@@ -121,9 +119,7 @@ public Assembly Load(String assemblyString)
121119
/// </summary>
122120
/// <returns>An array of assemblies in this application domain.</returns>
123121
[MethodImpl(MethodImplOptions.InternalCall)]
124-
#pragma warning disable S4200 // Native methods should be wrapped
125122
public extern Assembly[] GetAssemblies();
126-
#pragma warning restore S4200 // Native methods should be wrapped
127123

128124
[MethodImpl(MethodImplOptions.InternalCall)]
129125
private extern Assembly LoadInternal(String assemblyString, bool fVersion, int maj, int min, int build, int rev);
@@ -136,9 +132,7 @@ public Assembly Load(String assemblyString)
136132
/// <param name="domain">An application domain to unload.</param>
137133
/// <remarks>Available only in mscorlib build with support for System.Reflection.</remarks>
138134
[MethodImpl(MethodImplOptions.InternalCall)]
139-
#pragma warning disable S4200 // Native methods should be wrapped
140135
public static extern void Unload(AppDomain domain);
141-
#pragma warning restore S4200 // Native methods should be wrapped
142136
}
143137
}
144138
#endif // #if (NANOCLR_APPDOMAINS)

nanoFramework.CoreLibrary/System/Array.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,17 @@ public abstract class Array : IList
3232
/// <para>This method is an O(n) operation, where n is length.</para>
3333
/// Available only in mscorlib build with support for System.Reflection.</remarks>
3434
[MethodImpl(MethodImplOptions.InternalCall)]
35-
#pragma warning disable S4200 // Native methods should be wrapped
3635
public static extern Array CreateInstance(Type elementType, int length);
37-
#pragma warning restore S4200 // Native methods should be wrapped
3836

3937
#endif // NANOCLR_REFLECTION
4038

41-
#pragma warning disable S4200 // Native methods should be wrapped
4239
/// <summary>
4340
/// Copies a range of elements from an Array starting at the first element and pastes them into another Array starting at the first element. The length is specified as a 32-bit integer.
4441
/// </summary>
4542
/// <param name="sourceArray">The Array that contains the data to copy.</param>
4643
/// <param name="destinationArray">The Array that receives the data.</param>
4744
/// <param name="length">A 32-bit integer that represents the number of elements to copy.</param>
4845
public static void Copy(Array sourceArray, Array destinationArray, int length)
49-
#pragma warning restore S4200 // Native methods should be wrapped
5046
{
5147
Copy(sourceArray, 0, destinationArray, 0, length);
5248
}
@@ -60,9 +56,7 @@ public static void Copy(Array sourceArray, Array destinationArray, int length)
6056
/// <param name="destinationIndex">A 32-bit integer that represents the index in the destinationArray at which storing begins.</param>
6157
/// <param name="length">A 32-bit integer that represents the number of elements to copy.</param>
6258
[MethodImpl(MethodImplOptions.InternalCall)]
63-
#pragma warning disable S4200 // Native methods should be wrapped
6459
public static extern void Copy(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length);
65-
#pragma warning restore S4200 // Native methods should be wrapped
6660

6761
/// <summary>
6862
/// Sets a range of elements in the Array to zero, to false, or to null reference (Nothing in Visual Basic), depending on the element type.
@@ -71,9 +65,7 @@ public static void Copy(Array sourceArray, Array destinationArray, int length)
7165
/// <param name="index">The starting index of the range of elements to clear.</param>
7266
/// <param name="length">The number of elements to clear.</param>
7367
[MethodImpl(MethodImplOptions.InternalCall)]
74-
#pragma warning disable S4200 // Native methods should be wrapped
7568
public static extern void Clear(Array array, int index, int length);
76-
#pragma warning restore S4200 // Native methods should be wrapped
7769

7870
/// <summary>
7971
/// Gets the value at the specified position in the one-dimensional Array. The index is specified as a 32-bit integer.

0 commit comments

Comments
 (0)