microting/eform-sdk-dotnet

View on GitHub

Showing 3,203 of 3,219 total issues

Method GetElement has a Cognitive Complexity of 30 (exceeds 20 allowed). Consider refactoring.
Open

        private async Task<Element> GetElement(int elementId, Language language, bool includeDummyFields)
        {
            string methodName = "SqlController.GetElement";
            try
            {
Severity: Minor
Found in eFormCore/Infrastructure/SqlController.cs - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

            Field f6 = await testHelpers.CreateField(0, "barcode", cl2, "ffe4e4", "custom", null, "",
                "picture Description",
                86, 0, DbContext.FieldTypes.Where(x => x.Type == "comment").First(), 1, 0, 1, 0,
                "Picture", 1, 69, "69", "1", 0, 1, null, 0, 1, 0, 0, "", 1).ConfigureAwait(false);
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 234..238
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 244..247
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 253..256
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 262..265
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 271..274
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 289..292
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 298..301
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 307..310
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 316..319

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

            Field f10 = await testHelpers.CreateField(0, "barcode", cl2, "ffe4e4", "custom", null, "",
                "picture Description",
                90, 0, DbContext.FieldTypes.Where(x => x.Type == "comment").First(), 1, 0, 1, 0,
                "Picture", 1, 69, "69", "1", 0, 1, null, 0, 1, 0, 0, "", 1).ConfigureAwait(false);
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 234..238
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 244..247
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 253..256
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 262..265
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 271..274
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 280..283
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 289..292
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 298..301
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 307..310

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

            Field f8 = await testHelpers.CreateField(0, "barcode", cl2, "ffe4e4", "custom", null, "",
                "picture Description",
                88, 0, DbContext.FieldTypes.Where(x => x.Type == "comment").First(), 1, 0, 1, 0,
                "Picture", 1, 69, "69", "1", 0, 1, null, 0, 1, 0, 0, "", 1).ConfigureAwait(false);
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 234..238
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 244..247
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 253..256
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 262..265
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 271..274
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 280..283
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 289..292
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 307..310
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 316..319

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

            Field f1 = await testHelpers.CreateField(1, "barcode", cl2, "e2f4fb", "custom", null, "",
                "Comment field description",
                5, 1, DbContext.FieldTypes.Where(x => x.Type == "comment").First(), 0, 0, 1, 0, "Comment field", 1, 55,
                "55", "0", 0, 0, null, 1, 0,
                0, 0, "", 49).ConfigureAwait(false);
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 244..247
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 253..256
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 262..265
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 271..274
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 280..283
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 289..292
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 298..301
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 307..310
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 316..319

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

            Field f7 = await testHelpers.CreateField(0, "barcode", cl2, "ffe4e4", "custom", null, "",
                "picture Description",
                87, 0, DbContext.FieldTypes.Where(x => x.Type == "comment").First(), 1, 0, 1, 0,
                "Picture", 1, 69, "69", "1", 0, 1, null, 0, 1, 0, 0, "", 1).ConfigureAwait(false);
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 234..238
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 244..247
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 253..256
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 262..265
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 271..274
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 280..283
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 298..301
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 307..310
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 316..319

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

            Field f3 = await testHelpers.CreateField(0, "barcode", cl2, "f0f8db", "custom", 3, "",
                "Number Field Description",
                83, 0, DbContext.FieldTypes.Where(x => x.Type == "comment").First(), 0, 0, 1, 0,
                "Numberfield", 1, 8, "4865", "0", 0, 1, null, 1, 0, 0, 0, "", 1).ConfigureAwait(false);
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 234..238
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 244..247
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 262..265
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 271..274
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 280..283
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 289..292
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 298..301
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 307..310
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 316..319

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

            Field f2 = await testHelpers.CreateField(1, "barcode", cl2, "f5eafa", "custom", null, "",
                "showPDf Description",
                45, 1, DbContext.FieldTypes.Where(x => x.Type == "comment").First(), 0, 1, 0, 0,
                "ShowPdf", 0, 5, "5", "0", 0, 0, null, 0, 0, 0, 0, "", 9).ConfigureAwait(false);
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 234..238
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 253..256
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 262..265
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 271..274
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 280..283
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 289..292
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 298..301
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 307..310
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 316..319

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

            Field f4 = await testHelpers.CreateField(1, "barcode", cl2, "fff6df", "custom", null, "",
                "date Description",
                84, 0, DbContext.FieldTypes.Where(x => x.Type == "comment").First(), 0, 0, 1, 0,
                "Date", 1, 666, "41153", "0", 0, 1, null, 0, 1, 0, 0, "", 1).ConfigureAwait(false);
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 234..238
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 244..247
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 253..256
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 271..274
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 280..283
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 289..292
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 298..301
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 307..310
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 316..319

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

            Field f5 = await testHelpers.CreateField(0, "barcode", cl2, "ffe4e4", "custom", null, "",
                "picture Description",
                85, 0, DbContext.FieldTypes.Where(x => x.Type == "comment").First(), 1, 0, 1, 0,
                "Picture", 1, 69, "69", "1", 0, 1, null, 0, 1, 0, 0, "", 1).ConfigureAwait(false);
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 234..238
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 244..247
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 253..256
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 262..265
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 280..283
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 289..292
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 298..301
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 307..310
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 316..319

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

            Field f9 = await testHelpers.CreateField(0, "barcode", cl2, "ffe4e4", "custom", null, "",
                "picture Description",
                89, 0, DbContext.FieldTypes.Where(x => x.Type == "comment").First(), 1, 0, 1, 0,
                "Picture", 1, 69, "69", "1", 0, 1, null, 0, 1, 0, 0, "", 1).ConfigureAwait(false);
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 234..238
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 244..247
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 253..256
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 262..265
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 271..274
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 280..283
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 289..292
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 298..301
eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs on lines 316..319

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

        public async Task<CaseDto> CaseReadByCaseId(int id)
        {
            string methodName = "Core.CaseReadByCaseId";
            try
            {
Severity: Major
Found in eFormCore/Core.cs and 3 other locations - About 1 hr to fix
eFormCore/Core.cs on lines 1903..1919
eFormCore/Core.cs on lines 1925..1942
eFormCore/Core.cs on lines 4868..4884

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

        public async Task<CaseDto> CaseLookupMUId(int microtingUId)
        {
            string methodName = "Core.CaseLookupMUId";
            try
            {
Severity: Major
Found in eFormCore/Core.cs and 3 other locations - About 1 hr to fix
eFormCore/Core.cs on lines 1480..1496
eFormCore/Core.cs on lines 1925..1942
eFormCore/Core.cs on lines 4868..4884

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

        public async Task<CaseDto> CaseLookupCaseId(int caseId)
        {
            string methodName = "Core.CaseLookupCaseId";

            try
Severity: Major
Found in eFormCore/Core.cs and 3 other locations - About 1 hr to fix
eFormCore/Core.cs on lines 1480..1496
eFormCore/Core.cs on lines 1903..1919
eFormCore/Core.cs on lines 4868..4884

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

        public async Task<UnitDto> Advanced_UnitRead(int microtingUid)
        {
            string methodName = "Core.Advanced_UnitRead";
            try
            {
Severity: Major
Found in eFormCore/Core.cs and 3 other locations - About 1 hr to fix
eFormCore/Core.cs on lines 1480..1496
eFormCore/Core.cs on lines 1903..1919
eFormCore/Core.cs on lines 1925..1942

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

Method SQL_Check_FieldRead_ReturnsField has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        [Test]
        public async Task SQL_Check_FieldRead_ReturnsField()
        {
            // Arrance

    Method Core_Advanced_FieldRead_ReadsFieldId has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            [Test]
            public async Task Core_Advanced_FieldRead_ReadsFieldId()
            {
                // Arrance
    
    
    Severity: Minor
    Found in eFormSDK.Integration.CheckLists.CoreTests/CoreTestAdvanced.cs - About 1 hr to fix

      Method Core_Folders_UpdateFolder_DoesUpdateFolder has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              [Test]
              public async Task Core_Folders_UpdateFolder_DoesUpdateFolder()
              {
                  // Arrange
      
      Severity: Minor
      Found in eFormSDK.Integration.Base.CoreTests/CoreTestFolders.cs - About 1 hr to fix

        Method siteSurveyConfiguration_Update_DoesUpdate has 46 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                [Test]
                public async Task siteSurveyConfiguration_Update_DoesUpdate()
                {
                    // Arrange
                    Random rnd = new Random();

          Method CaseReadByMUId has 46 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public async Task<CaseDto> CaseReadByMUId(int microtingUId)
                  {
                      string methodName = "SqlController.CaseReadByMUId";
                      try
                      {
          Severity: Minor
          Found in eFormCore/Infrastructure/SqlController.cs - About 1 hr to fix
            Severity
            Category
            Status
            Source
            Language