bykovme/nswallet

View on GitHub

Showing 226 of 488 total issues

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

using System;
using Xamarin.Forms;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Severity: Minor
Found in src/NSWallet/NSWallet/Controls/FlowListView/FlowListView.cs - About 5 hrs to fix

    File BusinessLayer.cs has 381 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Threading.Tasks;
    using NSWallet.Shared.Helpers.Logs.AppLog;
    Severity: Minor
    Found in src/NSWallet/NSWallet.Shared/Business/BusinessLayer.cs - About 5 hrs to fix

      Class PlatformSpecific has 36 methods (exceeds 20 allowed). Consider refactoring.
      Open

          public static class PlatformSpecific
          {
              public static void SetStatusBarColor(Color color) {
                  DependencyService.Get<IThemeNative>().SetColors(color);
              }
      Severity: Minor
      Found in src/NSWallet/NSWallet/Helpers/PlatformSpecific.cs - About 4 hrs to fix

        Class DataAccessLayer has 35 methods (exceeds 20 allowed). Consider refactoring.
        Open

            public partial class DataAccessLayer
            {
                // Static members, everything needed for singleton initialization
                static string DBFile;
                static DataAccessLayer DAL;
        Severity: Minor
        Found in src/NSWallet/NSWallet.Shared/DataAccess/DataAccessLayer.cs - About 4 hrs to fix

          File NSWFormsItemModel.cs has 347 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          using System;
          using System.Collections.Generic;
          using Xamarin.Forms;
          using NSWallet.Shared;
          using System.IO;
          Severity: Minor
          Found in src/NSWallet/NSWallet/Model/NSWFormsItemModel.cs - About 4 hrs to fix

            Method GeneratePDF has 107 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public void GeneratePDF()
                    {
                        CleanCache();
            
                        // Get NSWItems
            Severity: Major
            Found in src/NSWallet/Droid/Interfaces/ExportService.cs - About 4 hrs to fix

              Class ManageFieldViewModel has 33 methods (exceeds 20 allowed). Consider refactoring.
              Open

                  public class ManageFieldViewModel : ViewModel
                  {
                      // Callbacks
                      public Action ClosePopupCommandCallback { get; set; }
                      public Action ShowPopupCommandCallback { get; set; }

                Method AddViewToLayoutAutoHeightDisabled has a Cognitive Complexity of 43 (exceeds 20 allowed). Consider refactoring.
                Open

                        void AddViewToLayoutAutoHeightDisabled(View view, int containerCount, int colNumber)
                        {
                            double desiredColumnWidth = 1d / _desiredColumnCount;
                            Rectangle bounds = Rectangle.Zero;
                
                

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Method AddViewToLayoutAutoHeightDisabled has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        void AddViewToLayoutAutoHeightDisabled(View view, int containerCount, int colNumber)
                        {
                            double desiredColumnWidth = 1d / _desiredColumnCount;
                            Rectangle bounds = Rectangle.Zero;
                
                

                  Method changeGroup has a Cognitive Complexity of 41 (exceeds 20 allowed). Consider refactoring.
                  Open

                          void changeGroup(ItemModel item)
                          {
                              PopupPagesUIController.LaunchChangeGroupPopup((x) => {
                                  if (x.Result != TR.Cancel) {
                                      Device.BeginInvokeOnMainThread(() => {
                  Severity: Minor
                  Found in src/NSWallet/NSWallet/ViewModel/Icons/IconScreenViewModel.cs - About 3 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Method OnBindingContextChanged has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          protected override void OnBindingContextChanged()
                          {
                              base.OnBindingContextChanged();
                  
                              var container = BindingContext as IList;

                    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 BusinessFixture.cs has 318 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      using System.IO;
                      using NSWallet.Shared;
                      using NUnit.Framework;
                      
                      namespace NSWallet.UnitTests
                      Severity: Minor
                      Found in src/NSWallet/NSWallet.UnitTests/BusinessFixture.cs - About 3 hrs to fix

                        File DefaultTheme.cs has 316 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        using Xamarin.Forms;
                        
                        namespace NSWallet
                        {
                            public class DefaultTheme : ITheme
                        Severity: Minor
                        Found in src/NSWallet/NSWallet/Themes/DefaultTheme.cs - About 3 hrs to fix

                          Method LocalizationExceptionsCommon has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  static bool LocalizationExceptionsCommon(string trTag)
                                  {
                                      switch (trTag)
                                      {
                                          case "admin_password_placeholder":

                            Method ExecuteSelectedItemCommand has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    void ExecuteSelectedItemCommand(object obj)
                                    {
                                        IsEditItemPanel = false;
                                        IsEditFolderPanel = false;
                                        if (obj == null) return;
                            Severity: Major
                            Found in src/NSWallet/NSWallet/ViewModel/MainScreen/MainScreenViewModel.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 ExecuteMenuTappedCommand has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        void ExecuteMenuTappedCommand(object obj)
                                        {
                                            if (obj != null) {
                                                var popupItem = (PopupItem)obj;
                                                switch (popupItem.Action) {
                                Severity: Major
                                Found in src/NSWallet/NSWallet/ViewModel/MainScreen/MainScreenViewModel.cs - About 3 hrs to fix

                                  File LabelScreenViewModel.cs has 309 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  using System;
                                  using System.Collections.Generic;
                                  using System.Collections.ObjectModel;
                                  using System.ComponentModel;
                                  using System.Diagnostics;
                                  Severity: Minor
                                  Found in src/NSWallet/NSWallet/ViewModel/LabelsScreen/LabelScreenViewModel.cs - About 3 hrs to fix

                                    Method AddCheckbox has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            void AddCheckbox(StackLayout settingsLayout, string settingName, string checkedProperty, string menuIcon, string toggleCommand, string chosenSelectionProperty = null, bool isPremium = false)
                                            {
                                                var checkboxLayout = new StackLayout {
                                                    VerticalOptions = LayoutOptions.CenterAndExpand,
                                                    HorizontalOptions = LayoutOptions.Fill,
                                    Severity: Major
                                    Found in src/NSWallet/NSWallet/Views/SettingsScreen/SettingsScreenView.cs - About 3 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language