bykovme/nswallet

View on GitHub

Showing 226 of 488 total issues

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

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

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

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

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

            try {
                string dbFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + DATABASE_IOS_FOLDER;

                if (!Directory.Exists(dbFolderPath)) {
                    Directory.CreateDirectory(dbFolderPath);
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 33..41

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

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

        {
            string dbFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + DATABASE_IOS_FOLDER;

            if (!Directory.Exists(dbFolderPath)) {
                Directory.CreateDirectory(dbFolderPath);
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 34..42

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

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

        [Test]

        public void CheckRemovingTags()
        {
            string str2test = "something here[iosonly]<ul><li> Payment will be charged[/iosonly] bla-blah test";
Severity: Minor
Found in src/NSWallet/NSWallet.UnitTests/CommonFixture.cs and 1 other location - About 45 mins to fix
src/NSWallet/NSWallet.UnitTests/CommonFixture.cs on lines 20..27

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

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

        [Test]
        public void CheckRemovingTextBetweenTags()
        {
            string str2test = "something here[iosonly]<ul><li> Payment will be charged[/iosonly] bla-blah test";
            string result = "something here bla-blah test";
Severity: Minor
Found in src/NSWallet/NSWallet.UnitTests/CommonFixture.cs and 1 other location - About 45 mins to fix
src/NSWallet/NSWallet.UnitTests/CommonFixture.cs on lines 10..18

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

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 long GetFileSize(string path)
        {
            try {
                var fi = new FileInfo(path);
                return fi.Length;
Severity: Major
Found in src/NSWallet/NSWallet.Mac/Interfaces/FileService.cs and 2 other locations - About 40 mins to fix
src/NSWallet/Droid/Interfaces/FileService.cs on lines 123..132
src/NSWallet/iOS/Interfaces/FileService.cs on lines 89..98

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

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 long GetFileSize(string path)
        {
            try {
                var fi = new FileInfo(path);
                return fi.Length;
Severity: Major
Found in src/NSWallet/Droid/Interfaces/FileService.cs and 2 other locations - About 40 mins to fix
src/NSWallet/NSWallet.Mac/Interfaces/FileService.cs on lines 75..84
src/NSWallet/iOS/Interfaces/FileService.cs on lines 89..98

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

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

        [Test]
        public void CheckIfAvailableAreSupported()
        {
            TR.InitTR(_namespace);
            var langs = Lang.availableLangs();
src/NSWallet/NSWallet.UnitTests/Localization/LocalizationFixture.cs on lines 38..47

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

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

            switch (Settings.AutoBackup) {
                case 0: ChosenAutoBackup = TR.Tr("autobackup_no_backup"); break;
                case 1: ChosenAutoBackup = TR.Tr("autobackup_weekly"); break;
                case 2: ChosenAutoBackup = TR.Tr("autobackup_daily"); break;
            }
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 73..77

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

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

            switch (Settings.ExpiringPeriod) {
                case 0: ChosenExpiringPeriod = TR.Tr("settings_expiring_period_all"); break;
                case 10: ChosenExpiringPeriod = TR.Tr("settings_expiring_period_10"); break;
                case 30: ChosenExpiringPeriod = TR.Tr("settings_expiring_period_30"); break;
            }
src/NSWallet/NSWallet/ViewModel/SettingsScreen/SettingsScreenViewModel.cs on lines 52..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 72.

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 long GetFileSize(string path)
        {
            try {
                var fi = new FileInfo(path);
                return fi.Length;
Severity: Major
Found in src/NSWallet/iOS/Interfaces/FileService.cs and 2 other locations - About 40 mins to fix
src/NSWallet/Droid/Interfaces/FileService.cs on lines 123..132
src/NSWallet/NSWallet.Mac/Interfaces/FileService.cs on lines 75..84

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

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