bykovme/nswallet

View on GitHub

Showing 226 of 488 total issues

Method ExecuteTapGestureRecognizer has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        async Task ExecuteTapGestureRecognizer(View view)
        {
            var flowCell = view as IFlowViewCell;
            if (flowCell != null)
            {

    Method ExecuteThemeSelectedCommand has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            protected void ExecuteThemeSelectedCommand(string selectedTheme)
            {
                string themeCode = null;
    
                if (!string.IsNullOrEmpty(selectedTheme) && string.Compare(selectedTheme, TR.Cancel) != 0) {

      Method fontAdd has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              static void fontAdd(string name, string typeface, bool beginning = false)
              {
                  if (Device.RuntimePlatform == Device.Android) {
                      if (typeface != null) {
                          typeface = typeface + fontExtension + "#" + typeface;
      Severity: Minor
      Found in src/NSWallet/NSWallet/Helpers/Fonts/NSWFontsController.cs - About 1 hr to fix

        Method GetCurrentCultureInfo has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public System.Globalization.CultureInfo GetCurrentCultureInfo()
                {
                    var netLanguage = "en";
                    var prefLanguageOnly = "en";
                    if (NSLocale.PreferredLanguages.Length > 0)
        Severity: Minor
        Found in src/NSWallet/iOS/Helpers/Localization.cs - About 1 hr to fix

          Method CreateSampleItems has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public static void CreateSampleItems()
                  {
                      var dal = DataAccessLayer.GetInstance();
          
                      // Banking
          Severity: Minor
          Found in src/NSWallet/NSWallet.Shared/Business/BusinessLayer.cs - About 1 hr to fix

            Method ExecuteSearchLaunchCommand has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    protected void ExecuteSearchLaunchCommand()
                    {
                        if (!IsLocalClipboardActivated) {
            
                            SearchEntryShowHideCommandCallback.Invoke(false);
            Severity: Minor
            Found in src/NSWallet/NSWallet/ViewModel/MainScreen/MainScreenViewModel.cs - About 1 hr to fix

              Method ToBytes has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public static byte[] ToBytes(string input)
                      {
                          if (string.IsNullOrEmpty(input)) {
                              return new byte[0];
                          }
              Severity: Minor
              Found in src/NSWallet/NSWallet/Helpers/2FA/Base32Encoding.cs - About 1 hr to fix

                Method delete has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        void delete(ItemModel item)
                        {
                            bool isUsed = false;
                            var itemList = BL.GetAllItems();
                            var itemFromList = itemList.SingleOrDefault(
                Severity: Minor
                Found in src/NSWallet/NSWallet/ViewModel/Icons/IconScreenViewModel.cs - About 1 hr to fix

                  Method GetDataTemplates has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          private IList<DataTemplate> GetDataTemplates(IList container)
                          {
                              List<DataTemplate> templates = new List<DataTemplate>();
                  
                              var flowTemplateSelector = _flowColumnTemplate as FlowTemplateSelector;

                    Method searchByText has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            List<ItemList> searchByText(string text)
                            {
                                var loweredText = text.ToLower();
                                var searchResult = new List<ItemList>();
                                foreach (var item in savedList) {
                    Severity: Minor
                    Found in src/NSWallet/NSWallet/ViewModel/Icons/IconScreenViewModel.cs - About 1 hr to fix

                      Method searchByText has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              List<ItemList> searchByText(string text)
                              {
                                  var loweredText = text.ToLower();
                                  var searchResult = new List<ItemList>();
                                  foreach (var item in savedList) {

                        Method AddColumnsToTablesUpgrade03 has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                public bool AddColumnsToTablesUpgrade03()
                                {
                                    try {
                                        CheckConnection();
                                        BeginTransaction();
                        Severity: Minor
                        Found in src/NSWallet/NSWallet.Shared/Database/NSWalletDBupgrade03.cs - About 1 hr to fix

                          Method ShareFile has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  public void ShareFile(string fileName, string extraText, string mimeType, string popupText, Action action)
                                  {
                                      Intent intentShareFile = new Intent(Intent.ActionSend);
                                      File fileWithinMyDir = new File(fileName);
                          
                          
                          Severity: Minor
                          Found in src/NSWallet/Droid/Interfaces/SharingDroid.cs - About 1 hr to fix

                            Method DeleteItem has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    public void DeleteItem(string itemID, string changeTimestamp)
                                    {
                                        try
                                        {
                                            CheckConnection();
                            Severity: Minor
                            Found in src/NSWallet/NSWallet.Shared/Database/NSWalletDB.cs - About 1 hr to fix

                              Method ReloadGroupedContainerList has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
                              Open

                                      private void ReloadGroupedContainerList()
                                      {
                                          var colCount = DesiredColumnCount;
                                          var flowGroupsList = new List<FlowGroup>(FlowItemsSource.Count);
                                          var groupDisplayPropertyName = (FlowGroupDisplayBinding as Binding)?.Path;
                              Severity: Minor
                              Found in src/NSWallet/NSWallet/Controls/FlowListView/FlowListView.cs - About 1 hr 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 ExecuteSaveFieldCommand has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
                              Open

                                      protected void ExecuteSaveFieldCommand()
                                      {
                                          try {
                                              string updText = null;
                              
                              

                              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 setItemsList has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      void setItemsList(List<NSWItem> itemsList, bool setHeader = true)
                                      {
                                          var itemsStorage = new List<NSWFormsItemModel>();
                                          if (itemsList != null) {
                                              if (itemsList.Count == 0) {
                              Severity: Minor
                              Found in src/NSWallet/NSWallet/ViewModel/MainScreen/MainScreenViewModel.cs - About 1 hr to fix

                                Method GetButtons has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        public static Layout<View> GetButtons()
                                        {
                                            var mainLayout = new StackLayout();
                                            mainLayout.SetBinding(VisualElement.IsVisibleProperty, "IsVisibleProp");
                                            mainLayout.Orientation = StackOrientation.Horizontal;
                                Severity: Minor
                                Found in src/NSWallet/NSWallet/Views/Social/SocialView.cs - About 1 hr to fix

                                  Method ExecuteCreateCommand has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          protected void ExecuteCreateCommand(object obj)
                                          {
                                  
                                              var iconModel = (IconModel)obj;
                                  
                                  

                                    Method ChangeItemTitle has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            public void ChangeItemTitle()
                                            {
                                                var currentState = BL.GetCurrentItem();
                                                string changeTitle = null;
                                                string emptyItem = null;
                                    Severity: Minor
                                    Found in src/NSWallet/NSWallet/Views/MainScreen/MainScreenView.cs - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language