diff --git a/StyleCop.ruleset b/StyleCop.ruleset
new file mode 100644
index 00000000..d851a79a
--- /dev/null
+++ b/StyleCop.ruleset
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/net/Qml.Net.Benchmarks/Config.cs b/src/net/Qml.Net.Benchmarks/Config.cs
index db993792..80f3a0bf 100644
--- a/src/net/Qml.Net.Benchmarks/Config.cs
+++ b/src/net/Qml.Net.Benchmarks/Config.cs
@@ -4,7 +4,7 @@ using BenchmarkDotNet.Jobs;
namespace Qml.Net.Benchmarks
{
- public class Config: ManualConfig
+ public class Config : ManualConfig
{
public Config()
{
diff --git a/src/net/Qml.Net.Benchmarks/Qml.Net.Benchmarks.csproj b/src/net/Qml.Net.Benchmarks/Qml.Net.Benchmarks.csproj
index b93a7e07..afc9d3b2 100644
--- a/src/net/Qml.Net.Benchmarks/Qml.Net.Benchmarks.csproj
+++ b/src/net/Qml.Net.Benchmarks/Qml.Net.Benchmarks.csproj
@@ -2,6 +2,7 @@
Exe
netcoreapp2.1
+ ../../../StyleCop.ruleset
false
@@ -9,5 +10,9 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers
+
\ No newline at end of file
diff --git a/src/net/Qml.Net.Benchmarks/ReferenceBenchmarks.cs b/src/net/Qml.Net.Benchmarks/ReferenceBenchmarks.cs
index a0a43c0e..7da066ac 100644
--- a/src/net/Qml.Net.Benchmarks/ReferenceBenchmarks.cs
+++ b/src/net/Qml.Net.Benchmarks/ReferenceBenchmarks.cs
@@ -18,11 +18,11 @@ namespace Qml.Net.Benchmarks
_initialized = true;
}
}
-
+
[IterationSetup]
public void Setup()
{
- _guiApplication = new QGuiApplication(new[]{"-platform", "offscreen"});
+ _guiApplication = new QGuiApplication(new[] { "-platform", "offscreen" });
_qmlApplicationEngine = new QQmlApplicationEngine();
}
@@ -32,7 +32,7 @@ namespace Qml.Net.Benchmarks
_qmlApplicationEngine.Dispose();
_guiApplication.Dispose();
}
-
+
[Benchmark]
public void Run()
{
@@ -73,7 +73,7 @@ namespace Qml.Net.Benchmarks
public class QmlType
{
private readonly InnerType _object = new InnerType();
-
+
public object GetObject()
{
return _object;
@@ -83,10 +83,9 @@ namespace Qml.Net.Benchmarks
{
_guiApplication.Exit();
}
-
+
public class InnerType
{
-
}
}
}
diff --git a/src/net/Qml.Net.Sandbox/Program.UI.cs b/src/net/Qml.Net.Sandbox/Program.UI.cs
index e981d223..51bd8f75 100644
--- a/src/net/Qml.Net.Sandbox/Program.UI.cs
+++ b/src/net/Qml.Net.Sandbox/Program.UI.cs
@@ -12,7 +12,7 @@ namespace Qml.Net.Sandbox
public class TestQmlImport
{
public static TestObject ts = new TestObject();
-
+
public TestObject GetObject()
{
return ts;
@@ -30,17 +30,17 @@ namespace Qml.Net.Sandbox
static int Main(string[] args)
{
Qt.PutEnv("QV4_MM_AGGRESSIVE_GC", "1");
-
+
using (var app = new QGuiApplication(args))
{
using (var engine = new QQmlApplicationEngine())
{
engine.AddImportPath(Path.Combine(Directory.GetCurrentDirectory(), "Qml"));
-
+
Qml.RegisterType("test");
engine.Load("main.qml");
-
+
return app.Exec();
}
}
diff --git a/src/net/Qml.Net.Sandbox/Qml.Net.Sandbox.csproj b/src/net/Qml.Net.Sandbox/Qml.Net.Sandbox.csproj
index a1b6365c..33a6a349 100644
--- a/src/net/Qml.Net.Sandbox/Qml.Net.Sandbox.csproj
+++ b/src/net/Qml.Net.Sandbox/Qml.Net.Sandbox.csproj
@@ -2,6 +2,7 @@
Exe
netcoreapp2.1
+ ../../../StyleCop.ruleset
7.1
false
$(MSBuildProjectDirectory)
@@ -15,6 +16,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers
+
diff --git a/src/net/Qml.Net.Tests/BaseTests.cs b/src/net/Qml.Net.Tests/BaseTests.cs
index 3aeb9b7f..1e060f36 100644
--- a/src/net/Qml.Net.Tests/BaseTests.cs
+++ b/src/net/Qml.Net.Tests/BaseTests.cs
@@ -11,7 +11,7 @@ namespace Qml.Net.Tests
{
Monitor.Enter(LockObject);
}
-
+
public virtual void Dispose()
{
Monitor.Exit(LockObject);
diff --git a/src/net/Qml.Net.Tests/Internal/ObjectTaggerTests.cs b/src/net/Qml.Net.Tests/Internal/ObjectTaggerTests.cs
index cd8657ff..6a10d4d1 100644
--- a/src/net/Qml.Net.Tests/Internal/ObjectTaggerTests.cs
+++ b/src/net/Qml.Net.Tests/Internal/ObjectTaggerTests.cs
@@ -1,12 +1,9 @@
-using Qml.Net.Internal;
-using System;
+using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using Xunit;
-using FluentAssertions;
using System.Threading;
+using FluentAssertions;
+using Qml.Net.Internal;
+using Xunit;
namespace Qml.Net.Tests.Internal
{
@@ -21,7 +18,7 @@ namespace Qml.Net.Tests.Internal
{
ObjectTagger tagger = new ObjectTagger(10);
List