Skip to content

Commit

Permalink
Minor updates to .editorconfig to match most existing files and run `…
Browse files Browse the repository at this point in the history
…dotnet format`
  • Loading branch information
lbmaian committed Aug 22, 2020
1 parent 21866e5 commit 5d93c65
Show file tree
Hide file tree
Showing 107 changed files with 111 additions and 109 deletions.
4 changes: 3 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ root = true

[*]
charset = utf-8
insert_final_newline = false
insert_final_newline = true
end_of_line = crlf

[*.{yml,json}]
Expand All @@ -12,6 +12,7 @@ indent_size = 2
[*.cs]
indent_style = tab
indent_size = 3
tab_width = 3 # https://github.com/dotnet/roslyn/issues/22601
trim_trailing_whitespace = true

dotnet_sort_system_directives_first = false
Expand Down Expand Up @@ -55,6 +56,7 @@ csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_within_query_expression_clauses = true
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = false
csharp_indent_switch_labels = true
csharp_indent_labels = no_change
csharp_space_after_cast = false
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,4 @@ ModelManifest.xml
/Harmony/Documentation/api/.manifest
/Harmony/Documentation/api/*.html
/Harmony/Documentation/api/*.yml
/Harmony/Documentation/Documentation.dll
/Harmony/Documentation/Documentation.dll
2 changes: 1 addition & 1 deletion CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
harmony.pardeike.net
harmony.pardeike.net
2 changes: 1 addition & 1 deletion Harmony/Documentation/Documentation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
<PackageReference Include="MonoMod.Common" Version="20.5.31.1" />
</ItemGroup>

</Project>
</Project>
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/annotations_basic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ static void Postfix(/*...*/)
// </example>

class SomeTypeHere { }
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/annotations_combining.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ class SomeType { }
class TypeA { }
class TypeB { }
class TypeC { }
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/annotations_multiple.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ static void Prefix(MethodBase __originalMethod)
class MyCode { }
public static Assembly someAssembly;
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/basics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@ class MyPatchClass2 { }

public static MethodInfo transpiler;
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/execution_with.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ public class R { public R(string s) { } }
public class T { }
public static bool allVoid;
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/execution_without.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ static void Postfix1(ref R r) { }
static R Postfix2(R r, params object[] arguments) { return r; }
static void Postfix3() { }
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/intro_annotations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ static void Postfix(ref int __result)
}
}
// </example>
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/intro_manual.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ public static void MyPostfix()
}
}
// </example>
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/intro_somegame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ private int DoSomething()
}
}
// </example>
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/patching-auxilary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ static IEnumerable<MethodBase> TargetMethods()
}
// </yield>
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/patching-edgecases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ public override string Method()
}
}
// </example>
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/patching-finalizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ static Exception Finalizer(Exception __exception)
}
// </rethrow>
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/patching-postfix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ static void Prefix(int counter)
}
// </args>
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/patching-prefix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ static void Postfix(Stopwatch __state)
}
// </state>
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/patching-transpiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ class Log
public static void Error(string s) { }
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/priorities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ static void Postfix(ref string result)
}
// </plugin2>
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/reverse-patching.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instruction
}
// </transpiler>
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Documentation/examples/utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ void Test()
}
// </example>
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Extras/DelegateTypeFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ public Type CreateDelegateType(MethodInfo method)
#endif
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Extras/FastAccess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,4 @@ static DynamicMethodDefinition CreateSetDynamicMethod<T, S>(Type type)
return new DynamicMethodDefinition($"DynamicSet_{type.Name}", typeof(void), new Type[] { typeof(T), typeof(S) });
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Extras/MethodInvoker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,4 @@ internal static void EmitFastInt(ILGenerator il, int value)
il.Emit(OpCodes.Ldc_I4, value);
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Harmony.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@
<Delete Files="@(OldZipFiles)" />
</Target>

</Project>
</Project>
2 changes: 1 addition & 1 deletion Harmony/ILRepack.targets
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
</ItemGroup>
<Delete Files="@(UnnecessaryDependencyFiles)" />
</Target>
</Project>
</Project>
2 changes: 1 addition & 1 deletion Harmony/Internal/AccessCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ internal MethodBase GetMethodInfo(Type type, string name, Type[] arguments, Memb
return value;
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Internal/ByteBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ void CheckCanRead(int count)
throw new ArgumentOutOfRangeException();
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Internal/CodeTranspiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,4 +284,4 @@ static OpCode ReplaceShortJumps(OpCode opcode)
return opcode;
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Internal/Emitter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -375,4 +375,4 @@ internal void EmitCalli(OpCode opcode, CallingConventions callingConvention, Typ
il.EmitCalli(opcode, callingConvention, returnType, parameterTypes, optionalParameterTypes);
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Internal/HarmonySharedState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ internal static void UpdatePatchInfo(MethodBase method, PatchInfo patchInfo)
GetState()[method] = patchInfo.Serialize();
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Internal/ILInstruction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ static void AppendLabel(ref string str, object argument)
str += $"IL_{instruction?.offset.ToString("X4") ?? argument}";
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Internal/Memory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ public static long GetMethodStart(MethodBase method, out Exception exception)
}
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Internal/MethodCopier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -719,4 +719,4 @@ internal ThisParameter(MethodBase method)
}
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Internal/MethodPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -668,4 +668,4 @@ bool AddFinalizers(Dictionary<string, LocalBuilder> variables, bool catchExcepti
return rethrowPossible;
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Internal/PatchArgumentExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ internal static int GetArgumentIndex(this MethodInfo patch, string[] originalPar
return -1;
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Internal/PatchFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@ internal static MethodInfo ReversePatch(HarmonyMethod standin, MethodBase origin
return replacement;
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Internal/PatchModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ internal static AttributePatch Create(MethodInfo patch)
return type;
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Internal/PatchSorter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,4 @@ public int GetHashCode(Patch obj)
}
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Internal/PatchTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ internal static MethodBase GetOriginalMethod(this HarmonyMethod attr)
return null;
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Internal/StructReturnBufferCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,4 @@ internal static void ArgumentShifter(List<CodeInstruction> instructions, bool sh
}
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
// require Harmony to expose its internals instead.
// This is only relevant for when MonoMod.Common gets merged into Harmony.
[assembly: InternalsVisibleTo("MonoMod.Utils.Cil.ILGeneratorProxy")]
[assembly: Guid("69aee16a-b6e7-4642-8081-3928b32455df")]
[assembly: Guid("69aee16a-b6e7-4642-8081-3928b32455df")]
2 changes: 1 addition & 1 deletion Harmony/Public/Attributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -675,4 +675,4 @@ public HarmonyArgument(int index, string name)
NewName = name;
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Public/CodeInstruction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,4 @@ public override string ToString()
return opcode + operandStr + extras;
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Public/ExceptionBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ public ExceptionBlock(ExceptionBlockType blockType, Type catchType = null)
this.catchType = catchType ?? typeof(object);
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Public/Harmony.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,4 @@ public static Dictionary<string, Version> VersionInfo(out Version currentVersion
return PatchProcessor.VersionInfo(out currentVersion);
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Public/HarmonyException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ public int GetErrorIndex()
return -1;
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Public/HarmonyMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,4 +288,4 @@ public static HarmonyMethod GetMergedFromMethod(MethodBase method)
return HarmonyMethod.Merge(GetFromMethod(method));
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Public/InlineSignature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ internal TypeReference ToTypeReference(ModuleDefinition module)
}
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Public/Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,4 +373,4 @@ public override int GetHashCode()
return PatchMethod.GetHashCode();
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Public/PatchProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -335,4 +335,4 @@ public static IEnumerable<KeyValuePair<OpCode, object>> ReadMethodBody(MethodBas
.Select(instr => new KeyValuePair<OpCode, object>(instr.opcode, instr.operand));
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Public/Patches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ public Patches(Patch[] prefixes, Patch[] postfixes, Patch[] transpilers, Patch[]
Finalizers = finalizers.ToList().AsReadOnly();
}
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Public/Priority.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ public static class Priority
///
public const int First = 800;
}
}
}
2 changes: 1 addition & 1 deletion Harmony/Public/ReversePatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ internal static MethodInfo GetTranspiler(MethodInfo method)
});
}
}
}
}
Loading

0 comments on commit 5d93c65

Please sign in to comment.