Promact/slack-erp-custom-integration-mvc

View on GitHub

Showing 517 of 517 total issues

Avoid too many return statements within this method.
Open

                    return ScrumStatus.NoEmployee;

    Avoid too many return statements within this method.
    Open

                                return string.Format(_stringConstant.NotTeamLeader, slackUserId);

      Avoid too many return statements within this method.
      Open

                  return ScrumStatus.NoProject;

        Avoid too many return statements within this method.
        Open

                        return _stringConstant.ProjectChannelNotLinked;

          Avoid too many return statements within this method.
          Open

                              return _stringConstant.UserNotInSlack + await GetQuestionAsync(scrumId, questions, users, projectId);

            Avoid too many return statements within this method.
            Open

                                return Ok();
            Severity: Major
            Found in Slack.Automation/Promact.Erp.Core/Controllers/OAuthController.cs - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                          return View();
              Severity: Major
              Found in Slack.Automation/Promact.Erp.Core/Controllers/HomeController.cs - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                            return Ok();
                Severity: Major
                Found in Slack.Automation/Promact.Erp.Core/Controllers/OAuthController.cs - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                      return Ok();
                  Severity: Major
                  Found in Slack.Automation/Promact.Erp.Core/Controllers/OAuthController.cs - About 30 mins to fix

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

                            [Required]
                            [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
                            [DataType(DataType.Password)]
                            [Display(Name = "Password")]
                            public string Password { get; set; }
                    Slack.Automation/Promact.Erp.DomainModel/Models/AccountViewModels.cs on lines 72..76
                    Slack.Automation/Promact.Erp.DomainModel/Models/ManageViewModels.cs on lines 30..34
                    Slack.Automation/Promact.Erp.DomainModel/Models/ManageViewModels.cs on lines 49..53

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

                    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

                            [Required]
                            [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
                            [DataType(DataType.Password)]
                            [Display(Name = "New password")]
                            public string NewPassword { get; set; }
                    Slack.Automation/Promact.Erp.DomainModel/Models/AccountViewModels.cs on lines 72..76
                    Slack.Automation/Promact.Erp.DomainModel/Models/AccountViewModels.cs on lines 91..95
                    Slack.Automation/Promact.Erp.DomainModel/Models/ManageViewModels.cs on lines 49..53

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

                    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

                            [Required]
                            [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
                            [DataType(DataType.Password)]
                            [Display(Name = "New password")]
                            public string NewPassword { get; set; }
                    Slack.Automation/Promact.Erp.DomainModel/Models/AccountViewModels.cs on lines 72..76
                    Slack.Automation/Promact.Erp.DomainModel/Models/AccountViewModels.cs on lines 91..95
                    Slack.Automation/Promact.Erp.DomainModel/Models/ManageViewModels.cs on lines 30..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 60.

                    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

                            [Required]
                            [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
                            [DataType(DataType.Password)]
                            [Display(Name = "Password")]
                            public string Password { get; set; }
                    Slack.Automation/Promact.Erp.DomainModel/Models/AccountViewModels.cs on lines 91..95
                    Slack.Automation/Promact.Erp.DomainModel/Models/ManageViewModels.cs on lines 30..34
                    Slack.Automation/Promact.Erp.DomainModel/Models/ManageViewModels.cs on lines 49..53

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

                    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

                            return this.http.get(this.stringConstant.groupUrl).map(res => res.json())
                                .toPromise();
                    Severity: Minor
                    Found in Slack.Automation/Promact.Erp.Web/app/Group/group.service.ts and 1 other location - About 30 mins to fix
                    Slack.Automation/Promact.Erp.Web/app/ScrumReport/scrumReport.service.ts on lines 19..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 45.

                    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

                            return this.http.get(this.stringConstant.scrum)
                                .map(res => res.json())
                                .catch(this.handleError);
                    Slack.Automation/Promact.Erp.Web/app/Group/group.service.ts on lines 18..19

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

                    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

                            if (employeeName === undefined || employeeName === "") {
                                return leaveReports.filter(y => y.Role.toLowerCase().startsWith(role.toLowerCase()));
                            }
                            else {
                                return leaveReports.filter(y => y.EmployeeName.toLowerCase().startsWith(employeeName.toLowerCase()) && y.Role.toLowerCase().startsWith(role.toLowerCase()));
                    Severity: Minor
                    Found in Slack.Automation/Promact.Erp.Web/app/leaveReport/filter.pipe.ts and 1 other location - About 30 mins to fix
                    Slack.Automation/Promact.Erp.Web/app/leaveReport/filter.pipe.ts on lines 11..13

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

                    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

                            if (role === undefined || role === "") {
                                return leaveReports.filter(x => x.EmployeeName.toLowerCase().startsWith(employeeName.toLowerCase()));
                            }
                    Severity: Minor
                    Found in Slack.Automation/Promact.Erp.Web/app/leaveReport/filter.pipe.ts and 1 other location - About 30 mins to fix
                    Slack.Automation/Promact.Erp.Web/app/leaveReport/filter.pipe.ts on lines 14..19

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

                    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