bykovme/nswallet

View on GitHub

Showing 488 of 488 total issues

Avoid deeply nested control flow statements.
Open

                                    if (BL.CheckPassword(password)) {
                                        Settings.UsedFingerprintBefore = true;
                                        Settings.RememberedPassword = password;
                                        setFingerprintChecked(value);
                                    } else {

    Method AddSettingButton has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            void AddSettingButton(StackLayout stack, string modelCommand, string menuName, string menuIcon, string chosenSelectionProperty = null, bool isPremium = false)
    Severity: Minor
    Found in src/NSWallet/NSWallet/Views/SettingsScreen/SettingsScreenView.cs - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                  if (name.ToLower().Contains(loweredText)) {
                                      itemList.Title = item.Title;
                                      itemList.Add(new ItemModel {
                                          Icon = innerItem.Icon,
                                          Name = innerItem.Name,
      Severity: Major
      Found in src/NSWallet/NSWallet/ViewModel/Icons/IconScreenViewModel.cs - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                    if (icon.Name.En != null)
                                        name = icon.Name.En;
                                    else if (icon.Name.Ru != null)
                                        name = icon.Name.Ru;
        Severity: Major
        Found in src/NSWallet/NSWallet.Shared/Upgrades/UpgradeTo02.cs - About 45 mins to fix

          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

          Avoid deeply nested control flow statements.
          Open

                                          if (TR.Tr(field.FieldType) == field.FieldType) {
                                              fieldType = field.Label;
                                          } else {
                                              fieldType = TR.Tr(field.FieldType);
                                          }
          Severity: Major
          Found in src/NSWallet/NSWallet.Mac/Interfaces/ExportService.cs - About 45 mins to fix

            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

            Avoid deeply nested control flow statements.
            Open

                                        if (counter == 20) {
                                            PDFDoc.FinishPage(page);
                                            xPosMatrix = 20;
                                            yPosMatrix = 10;
                                            xPosText = 270;
            Severity: Major
            Found in src/NSWallet/Droid/Interfaces/ExportService.cs - About 45 mins to fix

              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

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

                      public byte[] GetBytesFromFile(string path)
                      {
                          try
                          {
                              var bytes = File.ReadAllBytes(path);
              Severity: Minor
              Found in src/NSWallet/iOS/Interfaces/FileService.cs and 1 other location - About 45 mins to fix
              src/NSWallet/NSWallet.Mac/Interfaces/FileService.cs on lines 188..197

              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

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

                      public byte[] GetBytesFromFile(string path)
                      {
                          try {
                              var bytes = File.ReadAllBytes(path);
                              return bytes;
              Severity: Minor
              Found in src/NSWallet/NSWallet.Mac/Interfaces/FileService.cs and 1 other location - About 45 mins to fix
              src/NSWallet/iOS/Interfaces/FileService.cs on lines 227..239

              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

              Avoid deeply nested control flow statements.
              Open

                                              if(TR.Tr(field.FieldType) == field.FieldType) {
                                                  fieldType = field.Label;
                                              } else {
                                                  fieldType = TR.Tr(field.FieldType);
                                              }
              Severity: Major
              Found in src/NSWallet/iOS/Interfaces/ExportService.cs - About 45 mins to fix

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

                            var twitter = new CachedImage {
                                Source = ImageSource.FromStream(() => NSWRes.GetImage(Theme.Current.TwitterIcon)),
                                Margin = Theme.Current.SocialIconMargin,
                                HeightRequest = Theme.Current.SocialIconHeight,
                                Style = ImageProperties.DefaultCachedImageStyle
                Severity: Minor
                Found in src/NSWallet/NSWallet/Views/Social/SocialView.cs and 1 other location - About 45 mins to fix
                src/NSWallet/NSWallet/Views/Social/SocialView.cs on lines 16..21

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

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

                            var digitsCaseLabel = new Label
                            {
                                VerticalOptions = LayoutOptions.CenterAndExpand,
                                TextColor = Theme.Current.NormalTextColor,
                                Text = TR.Tr("digits"),
                src/NSWallet/NSWallet/Views/MainScreen/Fields/ManageFieldView.cs on lines 229..236
                src/NSWallet/NSWallet/Views/MainScreen/Fields/ManageFieldView.cs on lines 255..262
                src/NSWallet/NSWallet/Views/MainScreen/Fields/ManageFieldView.cs on lines 307..314

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

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

                            var specialCaseLabel = new Label
                            {
                                VerticalOptions = LayoutOptions.CenterAndExpand,
                                TextColor = Theme.Current.NormalTextColor,
                                Text = TR.Tr("special_symbols"),
                src/NSWallet/NSWallet/Views/MainScreen/Fields/ManageFieldView.cs on lines 229..236
                src/NSWallet/NSWallet/Views/MainScreen/Fields/ManageFieldView.cs on lines 255..262
                src/NSWallet/NSWallet/Views/MainScreen/Fields/ManageFieldView.cs on lines 281..288

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

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

                            var upperCaseLabel = new Label
                            {
                                VerticalOptions = LayoutOptions.CenterAndExpand,
                                TextColor = Theme.Current.NormalTextColor,
                                Text = TR.Tr("upper_case_letters"),
                src/NSWallet/NSWallet/Views/MainScreen/Fields/ManageFieldView.cs on lines 255..262
                src/NSWallet/NSWallet/Views/MainScreen/Fields/ManageFieldView.cs on lines 281..288
                src/NSWallet/NSWallet/Views/MainScreen/Fields/ManageFieldView.cs on lines 307..314

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

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

                            var lowerCaseLabel = new Label
                            {
                                VerticalOptions = LayoutOptions.CenterAndExpand,
                                TextColor = Theme.Current.NormalTextColor,
                                Text = TR.Tr("lower_case_letters"),
                src/NSWallet/NSWallet/Views/MainScreen/Fields/ManageFieldView.cs on lines 229..236
                src/NSWallet/NSWallet/Views/MainScreen/Fields/ManageFieldView.cs on lines 281..288
                src/NSWallet/NSWallet/Views/MainScreen/Fields/ManageFieldView.cs on lines 307..314

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

                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 share = new CachedImage {
                                Source = ImageSource.FromStream(() => NSWRes.GetImage(Theme.Current.ShareIcon)),
                                Margin = Theme.Current.SocialIconMargin,
                                HeightRequest = Theme.Current.SocialIconHeight,
                                Style = ImageProperties.DefaultCachedImageStyle
                Severity: Minor
                Found in src/NSWallet/NSWallet/Views/Social/SocialView.cs and 1 other location - About 45 mins to fix
                src/NSWallet/NSWallet/Views/Social/SocialView.cs on lines 29..34

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

                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

                Severity
                Category
                Status
                Source
                Language