bykovme/nswallet

View on GitHub

Showing 226 of 488 total issues

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

        public void GenerateTXT()
        {
            CleanCache();

            // Get NSWItems
Severity: Minor
Found in src/NSWallet/iOS/Interfaces/ExportService.cs - About 1 hr to fix

    Method ExecuteRestoreBackupCommand has a Cognitive Complexity of 26 (exceeds 20 allowed). Consider refactoring.
    Open

            protected void ExecuteRestoreBackupCommand(object sender)
            {
                try {
                    var backup = (BackupModel)((ListView)sender).SelectedItem;
    
    

    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 EnumerateItems has a Cognitive Complexity of 26 (exceeds 20 allowed). Consider refactoring.
    Open

            static void EnumerateItems(string id, bool recursive = false)
            {
                try {
                    foreach (var item in BL.GetListByParentID(id, true)) {
                        if (!recursive)
    Severity: Minor
    Found in src/NSWallet/Droid/Interfaces/ExportService.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 EnumerateItems has a Cognitive Complexity of 26 (exceeds 20 allowed). Consider refactoring.
    Open

            static void EnumerateItems(string id, bool recursive = false)
            {
                try {
                    foreach (var item in BL.GetListByParentID(id, true)) {
                        if (!recursive)
    Severity: Minor
    Found in src/NSWallet/NSWallet.Mac/Interfaces/ExportService.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 EnumerateItems has a Cognitive Complexity of 26 (exceeds 20 allowed). Consider refactoring.
    Open

            static void EnumerateItems(string id, bool recursive = false)
            {
                try {
                    foreach (var item in BL.GetListByParentID(id, true)) {
                        if (!recursive)
    Severity: Minor
    Found in src/NSWallet/iOS/Interfaces/ExportService.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 ExecuteRestoreBackupCommand has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            protected void ExecuteRestoreBackupCommand(object sender)
            {
                try {
                    var backup = (BackupModel)((ListView)sender).SelectedItem;
    
    

      Method wasNonConsumableItemPurchased has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              static async Task<bool> wasNonConsumableItemPurchased(string productID)
              {
                  var billing = CrossInAppBilling.Current;
      
                  try
      Severity: Minor
      Found in src/NSWallet/NSWallet/Premium/PremiumManagement.cs - About 1 hr to fix

        Method SetLanguage has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public static void SetLanguage(string langCode)
                {
                    if (string.IsNullOrEmpty(RunNameSpace))
                    {
                        throw new LocalizationException("Namespace is not set");
        Severity: Minor
        Found in src/NSWallet/NSWallet.Shared/Localization/Translations.cs - About 1 hr to fix

          Method ExecuteRestorePremiumCommand has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  protected void ExecuteRestorePremiumCommand()
                  {
                      if (restored)
                      {
                          Task.Run(async () =>

            Method EncryptStringAES has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public static byte[] EncryptStringAES(string plainText, string password, int reEncryptionCount, string hash, out bool ok)
                    {
                        ok = false;
                        byte[] bytes;
            
            
            Severity: Minor
            Found in src/NSWallet/NSWallet.Shared/Security/SecurityStandard.cs - About 1 hr to fix

              Method GenerateCleverPassword has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public static string GenerateCleverPassword(string passwordPattern)
                      {
                          Random rand = new Random(DateTime.Now.Millisecond);
              
                          var generatedPassword = "";
              Severity: Minor
              Found in src/NSWallet/NSWallet.Shared/Security/SecurityStandard.cs - About 1 hr to fix

                Method GenerateTXT has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public void GenerateTXT()
                        {
                            CleanCache();
                
                            // Get NSWItems
                Severity: Minor
                Found in src/NSWallet/Droid/Interfaces/ExportService.cs - About 1 hr to fix

                  Method GenerateTXT has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public void GenerateTXT()
                          {
                              CleanCache();
                  
                              // Get NSWItems
                  Severity: Minor
                  Found in src/NSWallet/NSWallet.Mac/Interfaces/ExportService.cs - About 1 hr to fix

                    Method OnElementChanged has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            protected override void OnElementChanged(ElementChangedEventArgs<FloatingActionButton> e)
                            {
                                base.OnElementChanged(e);
                    
                                if (Control == null)

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

                              void updateList()
                              {
                                  try {
                                      var backupPath = PlatformSpecific.GetBackupPath();
                                      var backupFiles = PlatformSpecific.GetFileNames(backupPath);

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

                                    static Grid GetItemMenu()
                                    {
                                        var itemEditLayout = new Grid {
                                            BackgroundColor = Theme.Current.AppHeaderBackground,
                                            HorizontalOptions = LayoutOptions.FillAndExpand,
                            Severity: Minor
                            Found in src/NSWallet/NSWallet/Views/MainScreen/MainScreenViewItemMenu.cs - About 1 hr to fix

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

                                      protected void ExecuteOpenMenuCommand(object item)
                                      {
                                          if (item != null) {
                                              var itemMdl = (ItemModel)item;
                                              if (itemMdl.IconID != premadeIconIdentifier) {
                              Severity: Minor
                              Found in src/NSWallet/NSWallet/ViewModel/Icons/IconScreenViewModel.cs - About 1 hr to fix

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

                                        public void CreateLabel()
                                        {
                                            var popup = new EntryPopup(TR.Tr("create_label"), null, false);
                                            popup.PopupClosed += (o, closedArgs) => {
                                                if (closedArgs.OkClicked) {
                                Severity: Minor
                                Found in src/NSWallet/NSWallet/Views/LabelScreen/LabelScreenView.cs - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language