BUTR/Bannerlord.BLSE

View on GitHub
src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs

Summary

Maintainability
F
4 days
Test Coverage

File BUTRLauncherOptionsVM.cs has 383 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using Bannerlord.BUTR.Shared.Extensions;
using Bannerlord.LauncherEx.Helpers;
using Bannerlord.LauncherEx.Options;
using Bannerlord.LauncherManager.Localization;

Severity: Minor
Found in src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs - About 5 hrs to fix

    Method RefreshLauncherOptions has 116 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private void RefreshLauncherOptions()
        {
            _launcherExData = new LauncherExData(
                LauncherSettings.AutomaticallyCheckForUpdates,
                LauncherSettings.FixCommonIssues,
    Severity: Major
    Found in src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs - About 4 hrs to fix

      Method SaveLauncherOptions has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private void SaveLauncherOptions()
          {
              if (_launcherExData is null)
                  return;
      
      
      Severity: Major
      Found in src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs - About 2 hrs to fix

        Method ToSeparateWords has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            [return: NotNullIfNotNull("value")]
            private static string? ToSeparateWords(string? value)
            {
                if (value == null) return null;
                if (value.Length <= 1) return value;
        Severity: Minor
        Found in src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs - About 1 hr to fix

          Avoid too many return statements within this method.
          Open

                      return;
          Severity: Major
          Found in src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                        return;
            Severity: Major
            Found in src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                          return;
              Severity: Major
              Found in src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                            return;
                Severity: Major
                Found in src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                              return;
                  Severity: Major
                  Found in src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                return;
                    Severity: Major
                    Found in src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                  return;
                      Severity: Major
                      Found in src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                    return;
                        Severity: Major
                        Found in src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs - About 30 mins to fix

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  SettingProperties.Add(new SettingsPropertyVM(new SettingsPropertyDefinition
                                  {
                                      DisplayName = new BUTRTextObject("{=5XzSM7RN}Restore Engine Options Backup").ToString(),
                                      HintText = new BUTRTextObject("{=uKUsA3Sp}LauncherEx always makes a backup before saving the first time. This will restore the original files").ToString(),
                                      SettingType = SettingType.Button,
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 133..148

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 177.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  SettingProperties.Add(new SettingsPropertyVM(new SettingsPropertyDefinition
                                  {
                                      DisplayName = new BUTRTextObject("{=IsR2rbnG}Restore Game Options Backup").ToString(),
                                      HintText = new BUTRTextObject("{=uKUsA3Sp}LauncherEx always makes a backup before saving the first time. This will restore the original files").ToString(),
                                      SettingType = SettingType.Button,
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 149..164

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 177.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  SettingProperties.Add(new SettingsPropertyVM(new SettingsPropertyDefinition
                                  {
                                      DisplayName = new BUTRTextObject("{=1zt99vTt}Enable DPI Scaling").ToString(),
                                      HintText = $"{new BUTRTextObject("{=44qrhQ6g}Requires restart!")} {new BUTRTextObject("{=JusnHy6S}Enables Windows DPI Scaling to remove blurriness of UI elements")}",
                                      SettingType = SettingType.Bool,
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 91..97

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 115.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  SettingProperties.Add(new SettingsPropertyVM(new SettingsPropertyDefinition
                                  {
                                      DisplayName = new BUTRTextObject("{=vUAqDj9H}Compact Module List").ToString(),
                                      HintText = $"{new BUTRTextObject("{=44qrhQ6g}Requires restart!")} {new BUTRTextObject("{=Qn1aPNQM}Makes the Mods tab content smaller")}",
                                      SettingType = SettingType.Bool,
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 126..132

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 115.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 7 locations. Consider refactoring.
                          Open

                                  SettingProperties.Add(new SettingsPropertyVM(new SettingsPropertyDefinition
                                  {
                                      DisplayName = new BUTRTextObject("{=LXlsSS8t}Fix Common Issues").ToString(),
                                      HintText = new BUTRTextObject("{=J9VbkLW4}Fixes issues like 0Harmony.dll being in the /bin folder").ToString(),
                                      SettingType = SettingType.Bool,
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 105..111
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 112..118
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 119..125
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 173..179
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 180..186
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 187..193

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 106.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 7 locations. Consider refactoring.
                          Open

                                  SettingProperties.Add(new SettingsPropertyVM(new SettingsPropertyDefinition
                                  {
                                      DisplayName = new BUTRTextObject("{=qKK4Ehyd}Use Vanilla Crash Handler").ToString(),
                                      HintText = new BUTRTextObject("{=RTmWsIEA}Disables ButterLib's and BEW's Crash Handlers with the new Watchdog Crash Handler. Do not enable if not sure.").ToString(),
                                      SettingType = SettingType.Bool,
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 84..90
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 105..111
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 112..118
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 119..125
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 173..179
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 180..186

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 106.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 7 locations. Consider refactoring.
                          Open

                                  SettingProperties.Add(new SettingsPropertyVM(new SettingsPropertyDefinition
                                  {
                                      DisplayName = new BUTRTextObject("{=1zt99vTt}Big Mode").ToString(),
                                      HintText = new BUTRTextObject("{=XUSDSpvf}Makes the launcher bigger in height").ToString(),
                                      SettingType = SettingType.Bool,
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 84..90
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 105..111
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 112..118
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 173..179
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 180..186
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 187..193

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 106.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 7 locations. Consider refactoring.
                          Open

                                  SettingProperties.Add(new SettingsPropertyVM(new SettingsPropertyDefinition
                                  {
                                      DisplayName = new BUTRTextObject("{=QzPFvxGy}Disable BLSE Crash Handler When Debugger Is Attached").ToString(),
                                      HintText = new BUTRTextObject("{=P5NWQtKr}Stops BLSE Crash Handler when a debugger is attached. Do not disable if not sure.").ToString(),
                                      SettingType = SettingType.Bool,
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 84..90
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 105..111
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 112..118
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 119..125
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 180..186
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 187..193

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 106.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 7 locations. Consider refactoring.
                          Open

                                  SettingProperties.Add(new SettingsPropertyVM(new SettingsPropertyDefinition
                                  {
                                      DisplayName = new BUTRTextObject("{=NkCBdPSE}Disable Auto Generated Method Exception Catching").ToString(),
                                      HintText = new BUTRTextObject("{=QWGZy8Ym}Disables catching every Native->Managed call. It should catch every exception not catched the standard way. Do not disable if not sure.").ToString(),
                                      SettingType = SettingType.Bool,
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 84..90
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 105..111
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 112..118
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 119..125
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 173..179
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 187..193

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 106.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 7 locations. Consider refactoring.
                          Open

                                  SettingProperties.Add(new SettingsPropertyVM(new SettingsPropertyDefinition
                                  {
                                      DisplayName = new BUTRTextObject("{=iD27wEq7}Hide Random Image").ToString(),
                                      HintText = new BUTRTextObject("{=LaPvZjwC}Hide's the Rider image so the launcher looks more compact").ToString(),
                                      SettingType = SettingType.Bool,
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 84..90
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 112..118
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 119..125
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 173..179
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 180..186
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 187..193

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 106.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 7 locations. Consider refactoring.
                          Open

                                  SettingProperties.Add(new SettingsPropertyVM(new SettingsPropertyDefinition
                                  {
                                      DisplayName = new BUTRTextObject("{=QJSBiZdJ}Beta Sorting").ToString(),
                                      HintText = new BUTRTextObject("{=HVhaqeb4}Uses the new sorting algorithm after v1.12.x. Disable to use the old algorithm").ToString(),
                                      SettingType = SettingType.Bool,
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 84..90
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 105..111
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 119..125
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 173..179
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 180..186
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 187..193

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 106.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  foreach (var settingProperty in SettingProperties)
                                  {
                                      if (settingProperty.SettingPropertyDefinition is not ConfigSettingsPropertyDefinition propertyDefinition)
                                          continue;
                          
                          
                          Severity: Minor
                          Found in src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs and 1 other location - About 55 mins to fix
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 320..329

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 85.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  foreach (var settingProperty in SettingProperties)
                                  {
                                      if (settingProperty.SettingPropertyDefinition is not ConfigSettingsPropertyDefinition propertyDefinition)
                                          continue;
                          
                          
                          Severity: Minor
                          Found in src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs and 1 other location - About 55 mins to fix
                          src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs on lines 345..354

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 85.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  _launcherExData = new LauncherExData(
                                      LauncherSettings.AutomaticallyCheckForUpdates,
                                      LauncherSettings.FixCommonIssues,
                                      LauncherSettings.CompactModuleList,
                                      LauncherSettings.HideRandomImage,
                          Severity: Minor
                          Found in src/Bannerlord.LauncherEx/ViewModels/BUTRLauncherOptionsVM.cs and 1 other location - About 40 mins to fix
                          src/Bannerlord.LauncherEx/Patches/UserDataManagerPatch.cs on lines 80..91

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 71.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          There are no issues that match your filters.

                          Category
                          Status