Skip to content

Commit 0e1d4c3

Browse files
committed
feat: support .editorconfig for analyzer
1 parent 9f7334b commit 0e1d4c3

File tree

1 file changed

+10
-0
lines changed
  • Plugins/CSharpCompilerSettings

1 file changed

+10
-0
lines changed

Plugins/CSharpCompilerSettings/Core.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,16 @@ private static void ChangeCompilerProcess(object compiler, object scriptAssembly
175175

176176
foreach (var ruleset in rulesets)
177177
text += string.Format("\n/ruleset:\"{0}\"", ruleset);
178+
179+
// Editor Config.
180+
var configs = new[]
181+
{
182+
".editorconfig",
183+
Utils.PathCombine(asmdefDir ?? "Assets", ".editorconfig")
184+
}
185+
.Where(File.Exists);
186+
foreach (var config in configs)
187+
text += string.Format("\n/analyzerconfig:\"{0}\"", config);
178188
}
179189

180190
// Replace NewLine and save.

0 commit comments

Comments
 (0)