diff --git a/build/SrcCommon.props b/build/SrcCommon.props
index b7f8254e6c..a2f40d20ac 100644
--- a/build/SrcCommon.props
+++ b/build/SrcCommon.props
@@ -2,9 +2,11 @@
+ true
false
true
../../build/analyzers.ruleset
+ true
bin/$(Configuration)/$(TargetFramework)/$(AssemblyName).xml
ClientApp/node_modules
ClientApp/node_modules/.install-stamp
diff --git a/build/analyzers.ruleset b/build/analyzers.ruleset
index 2699bd4001..365db1e57f 100644
--- a/build/analyzers.ruleset
+++ b/build/analyzers.ruleset
@@ -1,5 +1,5 @@
-
+
@@ -1026,8 +1026,8 @@
-
-
+
+
diff --git a/build/stylecop.json b/build/stylecop.json
index bc19a81992..d18cd8693c 100644
--- a/build/stylecop.json
+++ b/build/stylecop.json
@@ -1,4 +1,5 @@
{
+ "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
"settings": {
"documentationRules": {
"documentPrivateElements": true,
@@ -33,6 +34,13 @@
"accessibility"
],
"usingDirectivesPlacement": "outsideNamespace"
+ },
+ "namingRules": {
+ "allowCommonHungarianPrefixes": false,
+ "includeInferredTupleElementNames": true
+ },
+ "readabilityRules": {
+ "allowBuiltInTypeAliases": true
}
}
}
diff --git a/src/Tgstation.Server.Api/ApiHeaders.cs b/src/Tgstation.Server.Api/ApiHeaders.cs
index c8a3093c78..7dc1d79e7e 100644
--- a/src/Tgstation.Server.Api/ApiHeaders.cs
+++ b/src/Tgstation.Server.Api/ApiHeaders.cs
@@ -124,7 +124,8 @@ namespace Tgstation.Server.Api
/// The value of .
/// The value of .
/// The value of .
- public ApiHeaders(ProductHeaderValue userAgent, string token, OAuthProvider? oauthProvider = null) : this(userAgent, token, null, null)
+ public ApiHeaders(ProductHeaderValue userAgent, string token, OAuthProvider? oauthProvider = null)
+ : this(userAgent, token, null, null)
{
if (userAgent == null)
throw new ArgumentNullException(nameof(userAgent));
@@ -140,7 +141,8 @@ namespace Tgstation.Server.Api
/// The value of .
/// The value of .
/// The value of .
- public ApiHeaders(ProductHeaderValue userAgent, string username, string password) : this(userAgent, null, username, password)
+ public ApiHeaders(ProductHeaderValue userAgent, string username, string password)
+ : this(userAgent, null, username, password)
{
if (userAgent == null)
throw new ArgumentNullException(nameof(userAgent));
diff --git a/src/Tgstation.Server.Api/HeadersException.cs b/src/Tgstation.Server.Api/HeadersException.cs
index 62bce1433b..6287ee1c88 100644
--- a/src/Tgstation.Server.Api/HeadersException.cs
+++ b/src/Tgstation.Server.Api/HeadersException.cs
@@ -17,7 +17,8 @@ namespace Tgstation.Server.Api
///
/// The value of .
/// The error message.
- public HeadersException(HeaderTypes missingOrMalformedHeaders, string message) : base(message)
+ public HeadersException(HeaderTypes missingOrMalformedHeaders, string message)
+ : base(message)
{
MissingOrMalformedHeaders = missingOrMalformedHeaders;
}
@@ -33,7 +34,8 @@ namespace Tgstation.Server.Api
/// Initializes a new instance of the class.
///
/// The error message.
- public HeadersException(string message) : base(message)
+ public HeadersException(string message)
+ : base(message)
{
}
@@ -42,7 +44,8 @@ namespace Tgstation.Server.Api
///
/// The error message.
/// The inner for the base .
- public HeadersException(string message, Exception innerException) : base(message, innerException)
+ public HeadersException(string message, Exception innerException)
+ : base(message, innerException)
{
}
}
diff --git a/src/Tgstation.Server.Api/Models/UserName.cs b/src/Tgstation.Server.Api/Models/UserName.cs
index c5d5f30604..779f951916 100644
--- a/src/Tgstation.Server.Api/Models/UserName.cs
+++ b/src/Tgstation.Server.Api/Models/UserName.cs
@@ -24,7 +24,8 @@
///
/// The child of to create.
/// A new copied from .
- protected virtual TResultType CreateUserName() where TResultType : UserName, new() => new TResultType
+ protected virtual TResultType CreateUserName()
+ where TResultType : UserName, new() => new TResultType
{
Id = Id,
Name = Name,
diff --git a/src/Tgstation.Server.Api/Rights/RightsHelper.cs b/src/Tgstation.Server.Api/Rights/RightsHelper.cs
index 8860391110..eb33954a48 100644
--- a/src/Tgstation.Server.Api/Rights/RightsHelper.cs
+++ b/src/Tgstation.Server.Api/Rights/RightsHelper.cs
@@ -38,7 +38,8 @@ namespace Tgstation.Server.Api.Rights
/// The .
/// The .
/// A representing the claim role name.
- public static string RoleNames(TRight right) where TRight : Enum
+ public static string RoleNames(TRight right)
+ where TRight : Enum
{
IEnumerable GetRoleNames()
{
@@ -75,7 +76,8 @@ namespace Tgstation.Server.Api.Rights
///
/// The .
/// All rights for the given .
- public static TRight AllRights() where TRight : Enum
+ public static TRight AllRights()
+ where TRight : Enum
{
ulong rights = 0;
foreach (Enum right in Enum.GetValues(typeof(TRight)))
@@ -91,7 +93,8 @@ namespace Tgstation.Server.Api.Rights
/// The .
/// The s to clamp.
/// The clamped .
- public static TRight Clamp(TRight rights) where TRight : Enum
+ public static TRight Clamp(TRight rights)
+ where TRight : Enum
{
var allRights = AllRights();
diff --git a/src/Tgstation.Server.Client/ApiClient.cs b/src/Tgstation.Server.Client/ApiClient.cs
index ae10ac62af..939fdb2dc8 100644
--- a/src/Tgstation.Server.Client/ApiClient.cs
+++ b/src/Tgstation.Server.Client/ApiClient.cs
@@ -168,55 +168,78 @@ namespace Tgstation.Server.Client
}
///
- public Task Create(string route, CancellationToken cancellationToken) => RunRequest