Promact/slack-erp-custom-integration-mvc

View on GitHub

Showing 321 of 517 total issues

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

            if (slackUser != null)
            {
                _logger.Debug("SendSickLeaveMessageToUserIncomingWebhookAsync user slack name : " + slackUser.Name);
                var incomingWebHook = await _incomingWebHook.FirstOrDefaultAsync(x => x.UserId == slackUser.UserId);
                var slashIncomingWebhookText = new SlashIncomingWebhook() { Channel = _stringConstant.AtTheRate + slackUser.Name, Username = _stringConstant.LeaveBot, Attachments = attachment };
Severity: Major
Found in Slack.Automation/Promact.Core.Repository/Client/Client.cs and 1 other location - About 2 hrs to fix
Slack.Automation/Promact.Core.Repository/Client/Client.cs on lines 195..204

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

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

        [Fact, Trait("Category", "Required")]
        public async Task RedmineSlackRequestIssueChangeAssignNoIssueAsync()
        {
            await CreateUserAsync();
            slashCommand.Text = _stringConstant.RedmineCommandChangeAssign;
Severity: Major
Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 2 other locations - About 2 hrs to fix
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 140..149
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 400..409

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

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

        [Fact, Trait("Category", "Required")]
        public async Task RedmineSlackRequestIssueListProjectNotFoundAsync()
        {
            await CreateUserAsync();
            slashCommand.Text = _stringConstant.RedmineCommandIssueList;
Severity: Major
Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 2 other locations - About 2 hrs to fix
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 282..291
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 400..409

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

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

        [Fact, Trait("Category", "Required")]
        public async Task RedmineSlackRequestIssueTimeEntryServerResponseNullAsync()
        {
            await CreateUserAsync();
            slashCommand.Text = _stringConstant.RedmineTimeEntry;
Severity: Major
Found in Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs and 2 other locations - About 2 hrs to fix
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 140..149
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 282..291

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

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

        [Fact, Trait("Category", "Required")]
        public async Task SlackLeaveHelpAsync()
        {
            await AddThreeUserIncomingWebHookAsync();
            await AddUser();
Severity: Major
Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 1 other location - About 2 hrs to fix
Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 512..522

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

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

        [Fact, Trait("Category", "Required")]
        public async Task LeaveApplyForSLForNoUserAsync()
        {
            await AddUser();
            await AddThreeUserIncomingWebHookAsync();
Severity: Major
Found in Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs and 1 other location - About 2 hrs to fix
Slack.Automation/Promact.Core.Test/SlackRepositoryTest.cs on lines 462..472

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

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

        [Fact, Trait("Category", "Required")]
        public async Task ScrumAlreadyHalted()
        {
            await AddChannelUserAsync();
            await UserProjectSetup();
Slack.Automation/Promact.Core.Test/ScrumBotRepositoryTest.cs on lines 290..302
Slack.Automation/Promact.Core.Test/ScrumBotRepositoryTest.cs on lines 308..320

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

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

        [Fact, Trait("Category", "Required")]
        public async Task ScrumInitiateScrumComplete()
        {
            await AddChannelUserAsync();
            await UserProjectSetup();
Slack.Automation/Promact.Core.Test/ScrumBotRepositoryTest.cs on lines 308..320
Slack.Automation/Promact.Core.Test/ScrumBotRepositoryTest.cs on lines 691..702

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

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

        [Fact, Trait("Category", "Required")]
        public async Task ScrumInitiateScrumHalted()
        {
            await AddChannelUserAsync();
            await UserProjectSetup();
Slack.Automation/Promact.Core.Test/ScrumBotRepositoryTest.cs on lines 290..302
Slack.Automation/Promact.Core.Test/ScrumBotRepositoryTest.cs on lines 691..702

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

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

        public async Task<List<User>> GetTeamLeaderUserIdAsync(string userId, string accessToken)
        {
            List<User> teamLeader = new List<User>();
            var requestUrl = string.Format(_stringConstant.FirstAndSecondIndexStringFormat, _stringConstant.TeamLeaderDetailsUrl, userId);
            var response = await _httpClientService.GetAsync(_stringConstant.ProjectUserUrl, requestUrl, accessToken, _stringConstant.Bearer);
Slack.Automation/Promact.Core.Repository/OauthCallsRepository/OauthCallsRepository.cs on lines 150..160
Slack.Automation/Promact.Core.Repository/OauthCallsRepository/OauthCallsRepository.cs on lines 168..178

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

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

        public async Task<List<ProjectAc>> GetListOfProjectsEnrollmentOfUserByUserIdAsync(string userId, string accessToken)
        {
            List<ProjectAc> projects = new List<ProjectAc>();
            var requestUrl = string.Format(_stringConstant.FirstAndSecondIndexStringFormat, _stringConstant.DetailsAndSlashForUrl, userId);
            var response = await _httpClientService.GetAsync(_stringConstant.ProjectUrl, requestUrl, accessToken, _stringConstant.Bearer);
Slack.Automation/Promact.Core.Repository/OauthCallsRepository/OauthCallsRepository.cs on lines 59..69
Slack.Automation/Promact.Core.Repository/OauthCallsRepository/OauthCallsRepository.cs on lines 168..178

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

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

        public async Task<List<User>> GetAllTeamMemberByProjectIdAsync(int projectId, string accessToken)
        {
            List<User> teamMembers = new List<User>();
            var requestUrl = string.Format(_stringConstant.FirstAndSecondIndexStringFormat, _stringConstant.DetailsAndSlashForUrl, projectId);
            var response = await _httpClientService.GetAsync(_stringConstant.UserUrl, requestUrl, accessToken, _stringConstant.Bearer);
Slack.Automation/Promact.Core.Repository/OauthCallsRepository/OauthCallsRepository.cs on lines 59..69
Slack.Automation/Promact.Core.Repository/OauthCallsRepository/OauthCallsRepository.cs on lines 150..160

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

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

        [Fact, Trait("Category", "Required")]
        public async Task RedmineSlackRequestHelpAsync()
        {
            await CreateUserAsync();
            slashCommand.Text = _stringConstant.RedmineCommandHelp;
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 80..89
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 126..135
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 219..228
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 386..395
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 536..545

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

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

        [Fact, Trait("Category", "Required")]
        public async Task RedmineSlackRequestNoProjectFoundAsync()
        {
            await CreateUserAsync();
            slashCommand.Text = _stringConstant.RedmineCommandProjectList;
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 126..135
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 219..228
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 386..395
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 501..510
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 536..545

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

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

        [Fact, Trait("Category", "Required")]
        public async Task RedmineSlackRequestIssueListWrongProjectIdAsync()
        {
            await CreateUserAsync();
            slashCommand.Text = _stringConstant.RedmineCommandIssueListWrongProjectId;
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 80..89
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 219..228
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 386..395
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 501..510
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 536..545

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

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

        [Fact, Trait("Category", "Required")]
        public async Task RedmineSlackRequestIssueTimeEntryWrongTypeIssueIdAsync()
        {
            await CreateUserAsync();
            slashCommand.Text = _stringConstant.RedmineTimeEntryWrongIssueId;
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 80..89
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 126..135
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 219..228
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 501..510
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 536..545

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

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

        [Fact, Trait("Category", "Required")]
        public async Task RedmineSlackRequestIssueCreateWrongProjectIdAsync()
        {
            await CreateUserAsync();
            slashCommand.Text = _stringConstant.RedmineCommandCreateWrongProjectId;
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 80..89
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 126..135
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 386..395
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 501..510
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 536..545

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

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

        [Fact, Trait("Category", "Required")]
        public async Task RedmineSlackRequestAPIKeyInValidAsync()
        {
            await CreateUserAsync();
            slashCommand.Text = _stringConstant.RedmineAPIKeyCommand;
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 80..89
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 126..135
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 219..228
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 386..395
Slack.Automation/Promact.Core.Test/RedmineRepositoryTest.cs on lines 501..510

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

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

        public async Task<User> GetUserByEmployeeIdAsync(string employeeId)
        {
            var accessToken = await GetCurrentUserAcceesToken();
            User userDetails = new User();
            var requestUrl = string.Format(_stringConstant.FirstAndSecondIndexStringFormat, employeeId, _stringConstant.UserDetailUrl);
Slack.Automation/Promact.Core.Repository/OauthCallsRepository/OauthCallHttpContextRespository.cs on lines 102..113

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

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

        public async Task<ProjectAc> GetProjectDetailsAsync(int projectId)
        {
            var accessToken = await GetCurrentUserAcceesToken();
            ProjectAc project = new ProjectAc();
            var requestUrl = string.Format(_stringConstant.FirstAndSecondIndexStringFormat, projectId, _stringConstant.GetProjectDetails);
Slack.Automation/Promact.Core.Repository/OauthCallsRepository/OauthCallHttpContextRespository.cs on lines 47..58

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

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