bykovme/nswallet

View on GitHub
src/NSWallet/NSWallet/Views/Pages.cs

Summary

Maintainability
D
2 days
Test Coverage

Class AppPages has 30 methods (exceeds 20 allowed). Consider refactoring.
Open

    public static class AppPages
    {
        public static void Main()
        {
            var navPage = new NavigationPage(new MainScreenView())
Severity: Minor
Found in src/NSWallet/NSWallet/Views/Pages.cs - About 3 hrs to fix

    File Pages.cs has 311 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    using System;
    using System.Collections.Generic;
    using NSWallet.Enums;
    using NSWallet.NetStandard;
    using NSWallet.NetStandard.Interfaces;
    Severity: Minor
    Found in src/NSWallet/NSWallet/Views/Pages.cs - About 3 hrs to fix

      Method AddLabelScreen has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              public static NavigationPage AddLabelScreen(string labelName, string labelType, string fieldType = null, string actionType = null, Command command = null)
      Severity: Minor
      Found in src/NSWallet/NSWallet/Views/Pages.cs - About 35 mins to fix

        Method UpdateField has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                public static void UpdateField(INavigation navigation, bool isEdit, NSWItem nswItem, string fieldID, string fieldValue)
        Severity: Minor
        Found in src/NSWallet/NSWallet/Views/Pages.cs - About 35 mins to fix

          Method TermsOfUse has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  public static void TermsOfUse(INavigation navigation, string title, string htmlSource, Action<bool> action, bool buttons = true)
          Severity: Minor
          Found in src/NSWallet/NSWallet/Views/Pages.cs - About 35 mins to fix

            Method PrivacyPolicy has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    public static void PrivacyPolicy(INavigation navigation, string title, string htmlSource, Action<bool> action, bool buttons = true)
            Severity: Minor
            Found in src/NSWallet/NSWallet/Views/Pages.cs - About 35 mins to fix

              TODO found
              Open

                          // TODO: find better solution to secure screens in iOS
              Severity: Minor
              Found in src/NSWallet/NSWallet/Views/Pages.cs by fixme

              TODO found
              Open

                          // TODO: find better solution to secure screens in iOS
              Severity: Minor
              Found in src/NSWallet/NSWallet/Views/Pages.cs by fixme

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

                      {
                          if (navigation != null) {
                              var page = new AdminScreenView(navigation);
                              navigation.PushAsync(page);
                          } else {
              Severity: Major
              Found in src/NSWallet/NSWallet/Views/Pages.cs and 1 other location - About 1 hr to fix
              src/NSWallet/NSWallet/Views/Pages.cs on lines 234..250

              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 113.

              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

                          if (DependencyService.Get<IPermission>().ReadWritePermission) {
              
                              if (navigation != null) {
                                  var page = new BackupScreenView(navigation);
                                  navigation.PushAsync(page);
              Severity: Major
              Found in src/NSWallet/NSWallet/Views/Pages.cs and 1 other location - About 1 hr to fix
              src/NSWallet/NSWallet/Views/Pages.cs on lines 54..69

              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 113.

              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

                      public static void TermsOfUse(INavigation navigation, string title, string htmlSource, Action<bool> action, bool buttons = true)
                      {
                          navigation.PushModalAsync(new NavigationPage(new LicensePageView(title, htmlSource, action, buttons)) {
                              BarBackgroundColor = Theme.Current.AppHeaderBackground,
                              BarTextColor = Theme.Current.AppHeaderTextColor
              Severity: Minor
              Found in src/NSWallet/NSWallet/Views/Pages.cs and 1 other location - About 55 mins to fix
              src/NSWallet/NSWallet/Views/Pages.cs on lines 305..311

              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 87.

              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

                      public static void PrivacyPolicy(INavigation navigation, string title, string htmlSource, Action<bool> action, bool buttons = true)
                      {
                          navigation.PushModalAsync(new NavigationPage(new LicensePageView(title, htmlSource, action, buttons)) {
                              BarBackgroundColor = Theme.Current.AppHeaderBackground,
                              BarTextColor = Theme.Current.AppHeaderTextColor
              Severity: Minor
              Found in src/NSWallet/NSWallet/Views/Pages.cs and 1 other location - About 55 mins to fix
              src/NSWallet/NSWallet/Views/Pages.cs on lines 313..319

              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 87.

              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 5 locations. Consider refactoring.
              Open

                      public static void ExportImport()
                      {
                          var navPage = new NavigationPage(new ExportImportScreenView()) {
                              BarBackgroundColor = Theme.Current.AppHeaderBackground,
                              BarTextColor = Theme.Current.AppHeaderTextColor
              Severity: Major
              Found in src/NSWallet/NSWallet/Views/Pages.cs and 4 other locations - About 45 mins to fix
              src/NSWallet/NSWallet/Views/Pages.cs on lines 139..150
              src/NSWallet/NSWallet/Views/Pages.cs on lines 152..165
              src/NSWallet/NSWallet/Views/Pages.cs on lines 178..191
              src/NSWallet/NSWallet/Views/Pages.cs on lines 193..206

              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 75.

              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 5 locations. Consider refactoring.
              Open

                      public static void About()
                      {
                          var navPage = new NavigationPage(new AboutScreenView())
                          {
                              BarBackgroundColor = Theme.Current.AppHeaderBackground,
              Severity: Major
              Found in src/NSWallet/NSWallet/Views/Pages.cs and 4 other locations - About 45 mins to fix
              src/NSWallet/NSWallet/Views/Pages.cs on lines 126..137
              src/NSWallet/NSWallet/Views/Pages.cs on lines 139..150
              src/NSWallet/NSWallet/Views/Pages.cs on lines 178..191
              src/NSWallet/NSWallet/Views/Pages.cs on lines 193..206

              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 75.

              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 5 locations. Consider refactoring.
              Open

                      public static void Feedback()
                      {
                          var navPage = new NavigationPage(new FeedbackPageView()) {
                              BarBackgroundColor = Theme.Current.AppHeaderBackground,
                              BarTextColor = Theme.Current.AppHeaderTextColor
              Severity: Major
              Found in src/NSWallet/NSWallet/Views/Pages.cs and 4 other locations - About 45 mins to fix
              src/NSWallet/NSWallet/Views/Pages.cs on lines 126..137
              src/NSWallet/NSWallet/Views/Pages.cs on lines 152..165
              src/NSWallet/NSWallet/Views/Pages.cs on lines 178..191
              src/NSWallet/NSWallet/Views/Pages.cs on lines 193..206

              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 75.

              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 5 locations. Consider refactoring.
              Open

                      public static void Settings()
                      {
                          var navPage = new NavigationPage(new SettingsScreenView())
                          {
                              BarBackgroundColor = Theme.Current.AppHeaderBackground,
              Severity: Major
              Found in src/NSWallet/NSWallet/Views/Pages.cs and 4 other locations - About 45 mins to fix
              src/NSWallet/NSWallet/Views/Pages.cs on lines 126..137
              src/NSWallet/NSWallet/Views/Pages.cs on lines 139..150
              src/NSWallet/NSWallet/Views/Pages.cs on lines 152..165
              src/NSWallet/NSWallet/Views/Pages.cs on lines 193..206

              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 75.

              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 5 locations. Consider refactoring.
              Open

                      public static void LabelsManagement()
                      {
                          var navPage = new NavigationPage(new LabelScreenView())
                          {
                              BarBackgroundColor = Theme.Current.AppHeaderBackground,
              Severity: Major
              Found in src/NSWallet/NSWallet/Views/Pages.cs and 4 other locations - About 45 mins to fix
              src/NSWallet/NSWallet/Views/Pages.cs on lines 126..137
              src/NSWallet/NSWallet/Views/Pages.cs on lines 139..150
              src/NSWallet/NSWallet/Views/Pages.cs on lines 152..165
              src/NSWallet/NSWallet/Views/Pages.cs on lines 178..191

              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 75.

              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

                      public static void CreateFolder(INavigation navigation)
                      {
                          var navPage = new NavigationPage(new MainScreenCreateItemView(NSWItemType.Folder))
                          {
                              BarBackgroundColor = Theme.Current.AppHeaderBackground,
              Severity: Minor
              Found in src/NSWallet/NSWallet/Views/Pages.cs and 1 other location - About 40 mins to fix
              src/NSWallet/NSWallet/Views/Pages.cs on lines 277..286

              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 72.

              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

                      public static void CreateItem(INavigation navigation)
                      {
                          var navPage = new NavigationPage(new MainScreenCreateItemView(NSWItemType.Item))
                          {
                              BarBackgroundColor = Theme.Current.AppHeaderBackground,
              Severity: Minor
              Found in src/NSWallet/NSWallet/Views/Pages.cs and 1 other location - About 40 mins to fix
              src/NSWallet/NSWallet/Views/Pages.cs on lines 266..275

              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 72.

              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

                      {
                          var navPage = new NavigationPage(new ReorderFieldView(fields))
                          {
                              BarBackgroundColor = Theme.Current.AppHeaderBackground,
                              BarTextColor = Theme.Current.AppHeaderTextColor
              Severity: Minor
              Found in src/NSWallet/NSWallet/Views/Pages.cs and 1 other location - About 30 mins to fix
              src/NSWallet/NSWallet/Views/Pages.cs on lines 209..216

              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 61.

              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

                      {
                          var navPage = new NavigationPage(new DiagnosticsPageView(fromLogin)) {
                              BarBackgroundColor = Theme.Current.AppHeaderBackground,
                              BarTextColor = Theme.Current.AppHeaderTextColor
                          };
              Severity: Minor
              Found in src/NSWallet/NSWallet/Views/Pages.cs and 1 other location - About 30 mins to fix
              src/NSWallet/NSWallet/Views/Pages.cs on lines 94..103

              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 61.

              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