CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

        private static string SimplifyDivision(string division)
        {
            if (division.Contains("Tournament"))
                return "Tournament";

Severity: Minor
Found in ReadModels/HighScoreQueries.cs and 1 other location - About 30 mins to fix
ReadModels/StatisticsQueries.cs on lines 145..157

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

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

        public void Handle(SponsorPositionChanged e)
        {
            var sponsor = Sponsors.SingleOrDefault(x => x.Id == e.Id);
            if (sponsor == null) return;
Severity: Major
Found in ReadModels/TournamentQueries.cs and 3 other locations - About 30 mins to fix
ReadModels/TournamentQueries.cs on lines 365..371
ReadModels/TournamentQueries.cs on lines 373..379
ReadModels/TournamentQueries.cs on lines 381..387

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

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

        public void Handle(ChangeNotificationCutoffChanged e)
        {
            var tournament = Tournaments.SingleOrDefault(x => x.Id == e.Id);
            if (tournament == null) return;
Severity: Major
Found in ReadModels/TournamentQueries.cs and 3 other locations - About 30 mins to fix
ReadModels/TournamentQueries.cs on lines 259..265
ReadModels/TournamentQueries.cs on lines 373..379
ReadModels/TournamentQueries.cs on lines 381..387

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

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

        private static string SimplifyDivision(string division)
        {
            if (division.Contains("Tournament"))
                return "Tournament";

Severity: Minor
Found in ReadModels/StatisticsQueries.cs and 1 other location - About 30 mins to fix
ReadModels/HighScoreQueries.cs on lines 136..148

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

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

        public void Handle(ChangeNotificationEmailChanged e)
        {
            var tournament = Tournaments.SingleOrDefault(x => x.Id == e.Id);
            if (tournament == null) return;
Severity: Major
Found in ReadModels/TournamentQueries.cs and 3 other locations - About 30 mins to fix
ReadModels/TournamentQueries.cs on lines 259..265
ReadModels/TournamentQueries.cs on lines 365..371
ReadModels/TournamentQueries.cs on lines 381..387

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

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(
                Given(new ContingentCreated
                {
                    Id = contingentId,
                    Province = contingentProvince,
Severity: Minor
Found in Tests/ContingentTests.cs and 1 other location - About 30 mins to fix
Tests/ParticipantTests.cs on lines 70..81

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

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

Avoid too many return statements within this function.
Open

    return data == d;
Severity: Major
Found in Web.Admin/z-scripts/angular-mocks.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return true;
    Severity: Major
    Found in Web.Admin/z-scripts/angular-mocks.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return transition;
      Severity: Major
      Found in Web.Admin/z-scripts/angular-ui-router.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    if ( !s ) { return true; }
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/js/wp-lists.dev.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  if ( !s.data.match(/_ajax_nonce=[a-f0-9]+/) ) { return true; }
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/js/wp-lists.dev.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return false;
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/js/wp-lists.dev.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                                      return that.eventOnClickCancelLink(e.target);
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-admin/js/nav-menu.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return strongPass;
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-admin/js/password-strength-meter.dev.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                      return;
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-admin/js/svg-painter.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return false;
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/js/wp-lists.dev.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return false;
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-admin/js/image-edit.dev.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                        return [targetNode];
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                    if (node == targetNode) return [targetNode];
                          Severity: Major
                          Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
                            Severity: Major
                            Found in Web.Admin/2014/wordpress/wp-includes/js/jquery/jquery.color.dev.js - About 30 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language