Skip to content

Commit

Permalink
Propagate option value from .roslynatorconfig (fix #877)
Browse files Browse the repository at this point in the history
  • Loading branch information
josefpihrt committed Jan 24, 2022
1 parent 460351d commit a619ebf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Common/Configuration/CodeAnalysisConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,18 @@ private CodeAnalysisConfig(
if (_editorConfigBoolOptions.TryGetValue(ConfigOptionKeys.CompilerDiagnosticFixesEnabled, out bool compilerDiagnosticFixesEnabled))
CompilerDiagnosticFixesEnabled = compilerDiagnosticFixesEnabled;

bool? prefixFieldIdentifierWithUnderscore = XmlConfig.PrefixFieldIdentifierWithUnderscore;
PrefixFieldIdentifierWithUnderscore = XmlConfig.PrefixFieldIdentifierWithUnderscore;

if (EditorConfig.PrefixFieldIdentifierWithUnderscore != null)
prefixFieldIdentifierWithUnderscore = EditorConfig.PrefixFieldIdentifierWithUnderscore;
PrefixFieldIdentifierWithUnderscore = EditorConfig.PrefixFieldIdentifierWithUnderscore;

if (VisualStudioConfig.PrefixFieldIdentifierWithUnderscore != ConfigOptionDefaultValues.PrefixFieldIdentifierWithUnderscore)
prefixFieldIdentifierWithUnderscore = VisualStudioConfig.PrefixFieldIdentifierWithUnderscore;
PrefixFieldIdentifierWithUnderscore = VisualStudioConfig.PrefixFieldIdentifierWithUnderscore;

int? maxLineLength = XmlConfig.MaxLineLength;
MaxLineLength = XmlConfig.MaxLineLength;

if (EditorConfig.MaxLineLength != null)
maxLineLength = EditorConfig.MaxLineLength;
MaxLineLength = EditorConfig.MaxLineLength;

var refactorings = new Dictionary<string, bool>();
SetRefactorings(refactorings, XmlConfig.Refactorings);
Expand Down

0 comments on commit a619ebf

Please sign in to comment.