bykovme/nswallet

View on GitHub

Showing 226 of 488 total issues

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

            var checkPremiumButton = new Button {
                FontFamily = NSWFontsController.CurrentTypeface,
                FontSize = FontSizeController.GetSize(NamedSize.Medium, typeof(Button)),
                BackgroundColor = Theme.Current.ListBackgroundColor,
                Text = TR.Tr("admin_check_premium")
Severity: Minor
Found in src/NSWallet/NSWallet/Views/AdminScreen/AdminScreenView.cs and 1 other location - About 35 mins to fix
src/NSWallet/NSWallet/Views/AdminScreen/AdminScreenView.cs on lines 60..65

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

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

        void LaunchWrongPasswordPopup()
        {
            Device.BeginInvokeOnMainThread(
                () => Application.Current.MainPage.DisplayAlert(
                    TR.Tr("error"),
src/NSWallet/NSWallet/ViewModel/Diagnostics/DiagnosticsPageViewModel.cs on lines 120..129

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

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 hideAdminPanelButton = new Button {
                FontFamily = NSWFontsController.CurrentTypeface,
                FontSize = FontSizeController.GetSize(NamedSize.Medium, typeof(Button)),
                BackgroundColor = Theme.Current.ListBackgroundColor,
                Text = TR.Tr("hide_admin_panel")
Severity: Minor
Found in src/NSWallet/NSWallet/Views/AdminScreen/AdminScreenView.cs and 1 other location - About 35 mins to fix
src/NSWallet/NSWallet/Views/AdminScreen/AdminScreenView.cs on lines 33..38

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

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

        void LaunchNoIssuesPopup()
        {
            Device.BeginInvokeOnMainThread(
                () => Application.Current.MainPage.DisplayAlert(
                    TR.Tr("app_name"),
src/NSWallet/NSWallet/ViewModel/Diagnostics/DiagnosticsPageViewModel.cs on lines 93..102

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

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

        public bool RemoveDirectoryWithContents(string path)
        {
            try {
                Directory.Delete(path, true);
                return true;
Severity: Minor
Found in src/NSWallet/Droid/Interfaces/FileService.cs and 2 other locations - About 35 mins to fix
src/NSWallet/NSWallet.Mac/Interfaces/FileService.cs on lines 199..208
src/NSWallet/iOS/Interfaces/FileService.cs on lines 250..262

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

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

        public bool RemoveDirectoryWithContents(string path)
        {
            try {
                Directory.Delete(path, true);
                return true;
Severity: Minor
Found in src/NSWallet/NSWallet.Mac/Interfaces/FileService.cs and 2 other locations - About 35 mins to fix
src/NSWallet/Droid/Interfaces/FileService.cs on lines 262..271
src/NSWallet/iOS/Interfaces/FileService.cs on lines 250..262

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

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

                new FeatureModel
                {
                    Image = ImageSource.FromStream(() => NSWRes.GetImage(Theme.Current.ICON_PREMIUM_SEARCH)),
                    Title = TR.Tr("featuresource_search"),
                    Description = TR.Tr("featuresource_search_description")
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 37..42
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 44..49
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 51..56
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 58..63

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

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

                new FeatureModel
                {
                    Image = ImageSource.FromStream(() => NSWRes.GetImage(Theme.Current.ICON_PREMIUM_SPECIAL)),
                    Title = TR.Tr("featuresource_special_folders"),
                    Description = TR.Tr("featuresource_special_folders_description")
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 30..35
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 37..42
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 51..56
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 58..63

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

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

        public bool RemoveDirectoryWithContents(string path)
        {
            try
            {
                Directory.Delete(path, true);
Severity: Minor
Found in src/NSWallet/iOS/Interfaces/FileService.cs and 2 other locations - About 35 mins to fix
src/NSWallet/Droid/Interfaces/FileService.cs on lines 262..271
src/NSWallet/NSWallet.Mac/Interfaces/FileService.cs on lines 199..208

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

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

                new FeatureModel
                {
                    Image = ImageSource.FromStream(() => NSWRes.GetImage(Theme.Current.ICON_PREMIUM_OTHER)),
                    Title = TR.Tr("featuresource_other"),
                    Description = TR.Tr("featuresource_other_description")
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 30..35
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 37..42
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 44..49
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 51..56

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

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

                new FeatureModel
                {
                    Image = ImageSource.FromStream(() => NSWRes.GetImage(Theme.Current.ICON_PREMIUM_THEMES)),
                    Title = TR.Tr("featuresource_themes"),
                    Description = TR.Tr("featuresource_themes_description")
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 30..35
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 44..49
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 51..56
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 58..63

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

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

                new FeatureModel
                {
                    Image = ImageSource.FromStream(() => NSWRes.GetImage(Theme.Current.ICON_PREMIUM_FEEDBACK)),
                    Title = TR.Tr("featuresource_feedback"),
                    Description = TR.Tr("featuresource_feedback_description")
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 30..35
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 37..42
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 44..49
src/NSWallet/NSWallet/ViewModel/LoginScreen/LoginScreenViewModel.cs on lines 58..63

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

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

        protected void ExecuteMostlyViewedCommand()
        {
            if (IsMostlyViewedChecked) {
                // Checked code below
                Settings.IsMostlyViewed = true;
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 559..570
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 598..609
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 663..674
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 688..699
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 713..724
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 801..812

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

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

        protected void ExecuteRecentlyViewedCommand()
        {
            if (IsRecentlyViewedChecked) {
                // Checked code below
                Settings.IsRecentlyViewed = true;
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 559..570
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 638..649
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 663..674
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 688..699
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 713..724
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 801..812

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

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

        protected void ExecuteAutoNightModeCommand()
        {
            if (IsAutoNightModeChecked) {
                // Checked code below
                Settings.IsAutoNightMode = true;
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 559..570
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 598..609
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 638..649
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 688..699
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 713..724
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 801..812

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

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

        protected void ExecuteClipCleanCommand()
        {
            if (IsClipCleanChecked) {
                // Checked code below
                Settings.IsClipboardClean = true;
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 559..570
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 598..609
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 638..649
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 663..674
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 688..699
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 713..724

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

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

        protected void ExecuteAndroidExitCommand()
        {
            if (IsDroidLogoutChecked) {
                // Checked code below
                Settings.AndroidBackLogout = true;
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 559..570
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 598..609
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 638..649
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 663..674
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 713..724
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 801..812

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

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

        protected void ExecuteExoiringSoonCommand()
        {
            if (IsExpiringSoonChecked) {
                // Checked code below
                Settings.IsExpiringSoon = true;
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 598..609
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 638..649
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 663..674
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 688..699
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 713..724
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 801..812

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

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

        protected void ExecuteIsAutoFingerprintCommand()
        {
            if (IsAutoFingerprintChecked) {
                // Checked code below
                Settings.IsAutoFinger = true;
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 559..570
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 598..609
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 638..649
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 663..674
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 688..699
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 801..812

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

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 tick = new CachedImage
            {
                Source = ImageSource.FromStream(() => NSWRes.GetImage(Theme.Current.CellTickIcon)),
                HeightRequest = Theme.Current.FeatureCellTickHeight,
                Style = ImageProperties.DefaultCachedImageStyle
Severity: Minor
Found in src/NSWallet/NSWallet/Views/LoginScreen/LoginScreenCellView.cs and 1 other location - About 35 mins to fix
src/NSWallet/NSWallet/Views/AboutScreen/AboutScreenView.cs on lines 199..203

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

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