filestack/filestack-swift

View on GitHub

Showing 176 of 260 total issues

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

    func testDetectFacesTransformationWithoutArgumentsURL() {
        transformable.add(transform: DetectFacesTransform())

        let expectedURL = Constants.cdnURL
            .appendingPathComponent("detect_faces")
Severity: Major
Found in Tests/FilestackSDKTests/TransformableTests.swift and 27 other locations - About 45 mins to fix
Tests/FilestackSDKTests/TransformableTests.swift on lines 144..152
Tests/FilestackSDKTests/TransformableTests.swift on lines 175..183
Tests/FilestackSDKTests/TransformableTests.swift on lines 229..237
Tests/FilestackSDKTests/TransformableTests.swift on lines 289..297
Tests/FilestackSDKTests/TransformableTests.swift on lines 299..307
Tests/FilestackSDKTests/TransformableTests.swift on lines 339..347
Tests/FilestackSDKTests/TransformableTests.swift on lines 349..357
Tests/FilestackSDKTests/TransformableTests.swift on lines 611..619
Tests/FilestackSDKTests/TransformableTests.swift on lines 651..659
Tests/FilestackSDKTests/TransformableTests.swift on lines 681..689
Tests/FilestackSDKTests/TransformableTests.swift on lines 711..719
Tests/FilestackSDKTests/TransformableTests.swift on lines 746..754
Tests/FilestackSDKTests/TransformableTests.swift on lines 776..784
Tests/FilestackSDKTests/TransformableTests.swift on lines 796..804
Tests/FilestackSDKTests/TransformableTests.swift on lines 826..834
Tests/FilestackSDKTests/TransformableTests.swift on lines 846..854
Tests/FilestackSDKTests/TransformableTests.swift on lines 856..864
Tests/FilestackSDKTests/TransformableTests.swift on lines 876..884
Tests/FilestackSDKTests/TransformableTests.swift on lines 896..904
Tests/FilestackSDKTests/TransformableTests.swift on lines 959..967
Tests/FilestackSDKTests/TransformableTests.swift on lines 979..987
Tests/FilestackSDKTests/TransformableTests.swift on lines 1528..1536
Tests/FilestackSDKTests/TransformableTests.swift on lines 1538..1546
Tests/FilestackSDKTests/TransformableTests.swift on lines 1548..1556
Tests/FilestackSDKTests/TransformableTests.swift on lines 1558..1566
Tests/FilestackSDKTests/TransformableTests.swift on lines 1568..1576
Tests/FilestackSDKTests/TransformableTests.swift on lines 1612..1620

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

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

    func testSepiaTransformationWithoutArgumentsURL() {
        transformable.add(transform: SepiaTransform())

        let expectedURL = Constants.cdnURL
            .appendingPathComponent("sepia")
Severity: Major
Found in Tests/FilestackSDKTests/TransformableTests.swift and 27 other locations - About 45 mins to fix
Tests/FilestackSDKTests/TransformableTests.swift on lines 144..152
Tests/FilestackSDKTests/TransformableTests.swift on lines 175..183
Tests/FilestackSDKTests/TransformableTests.swift on lines 229..237
Tests/FilestackSDKTests/TransformableTests.swift on lines 289..297
Tests/FilestackSDKTests/TransformableTests.swift on lines 299..307
Tests/FilestackSDKTests/TransformableTests.swift on lines 339..347
Tests/FilestackSDKTests/TransformableTests.swift on lines 349..357
Tests/FilestackSDKTests/TransformableTests.swift on lines 409..417
Tests/FilestackSDKTests/TransformableTests.swift on lines 611..619
Tests/FilestackSDKTests/TransformableTests.swift on lines 651..659
Tests/FilestackSDKTests/TransformableTests.swift on lines 681..689
Tests/FilestackSDKTests/TransformableTests.swift on lines 711..719
Tests/FilestackSDKTests/TransformableTests.swift on lines 746..754
Tests/FilestackSDKTests/TransformableTests.swift on lines 776..784
Tests/FilestackSDKTests/TransformableTests.swift on lines 796..804
Tests/FilestackSDKTests/TransformableTests.swift on lines 826..834
Tests/FilestackSDKTests/TransformableTests.swift on lines 846..854
Tests/FilestackSDKTests/TransformableTests.swift on lines 856..864
Tests/FilestackSDKTests/TransformableTests.swift on lines 876..884
Tests/FilestackSDKTests/TransformableTests.swift on lines 959..967
Tests/FilestackSDKTests/TransformableTests.swift on lines 979..987
Tests/FilestackSDKTests/TransformableTests.swift on lines 1528..1536
Tests/FilestackSDKTests/TransformableTests.swift on lines 1538..1546
Tests/FilestackSDKTests/TransformableTests.swift on lines 1548..1556
Tests/FilestackSDKTests/TransformableTests.swift on lines 1558..1566
Tests/FilestackSDKTests/TransformableTests.swift on lines 1568..1576
Tests/FilestackSDKTests/TransformableTests.swift on lines 1612..1620

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

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

    func testPolaroidTransformationWithoutArgumentsURL() {
        transformable.add(transform: PolaroidTransform())

        let expectedURL = Constants.cdnURL
            .appendingPathComponent("polaroid")
Severity: Major
Found in Tests/FilestackSDKTests/TransformableTests.swift and 27 other locations - About 45 mins to fix
Tests/FilestackSDKTests/TransformableTests.swift on lines 144..152
Tests/FilestackSDKTests/TransformableTests.swift on lines 175..183
Tests/FilestackSDKTests/TransformableTests.swift on lines 229..237
Tests/FilestackSDKTests/TransformableTests.swift on lines 289..297
Tests/FilestackSDKTests/TransformableTests.swift on lines 299..307
Tests/FilestackSDKTests/TransformableTests.swift on lines 339..347
Tests/FilestackSDKTests/TransformableTests.swift on lines 349..357
Tests/FilestackSDKTests/TransformableTests.swift on lines 409..417
Tests/FilestackSDKTests/TransformableTests.swift on lines 611..619
Tests/FilestackSDKTests/TransformableTests.swift on lines 651..659
Tests/FilestackSDKTests/TransformableTests.swift on lines 711..719
Tests/FilestackSDKTests/TransformableTests.swift on lines 746..754
Tests/FilestackSDKTests/TransformableTests.swift on lines 776..784
Tests/FilestackSDKTests/TransformableTests.swift on lines 796..804
Tests/FilestackSDKTests/TransformableTests.swift on lines 826..834
Tests/FilestackSDKTests/TransformableTests.swift on lines 846..854
Tests/FilestackSDKTests/TransformableTests.swift on lines 856..864
Tests/FilestackSDKTests/TransformableTests.swift on lines 876..884
Tests/FilestackSDKTests/TransformableTests.swift on lines 896..904
Tests/FilestackSDKTests/TransformableTests.swift on lines 959..967
Tests/FilestackSDKTests/TransformableTests.swift on lines 979..987
Tests/FilestackSDKTests/TransformableTests.swift on lines 1528..1536
Tests/FilestackSDKTests/TransformableTests.swift on lines 1538..1546
Tests/FilestackSDKTests/TransformableTests.swift on lines 1548..1556
Tests/FilestackSDKTests/TransformableTests.swift on lines 1558..1566
Tests/FilestackSDKTests/TransformableTests.swift on lines 1568..1576
Tests/FilestackSDKTests/TransformableTests.swift on lines 1612..1620

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

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

    func testShadowTransformationWithoutArgumentsURL() {
        transformable.add(transform: ShadowTransform())

        let expectedURL = Constants.cdnURL
            .appendingPathComponent("shadow")
Severity: Major
Found in Tests/FilestackSDKTests/TransformableTests.swift and 27 other locations - About 45 mins to fix
Tests/FilestackSDKTests/TransformableTests.swift on lines 144..152
Tests/FilestackSDKTests/TransformableTests.swift on lines 175..183
Tests/FilestackSDKTests/TransformableTests.swift on lines 229..237
Tests/FilestackSDKTests/TransformableTests.swift on lines 289..297
Tests/FilestackSDKTests/TransformableTests.swift on lines 299..307
Tests/FilestackSDKTests/TransformableTests.swift on lines 339..347
Tests/FilestackSDKTests/TransformableTests.swift on lines 349..357
Tests/FilestackSDKTests/TransformableTests.swift on lines 409..417
Tests/FilestackSDKTests/TransformableTests.swift on lines 611..619
Tests/FilestackSDKTests/TransformableTests.swift on lines 651..659
Tests/FilestackSDKTests/TransformableTests.swift on lines 681..689
Tests/FilestackSDKTests/TransformableTests.swift on lines 711..719
Tests/FilestackSDKTests/TransformableTests.swift on lines 776..784
Tests/FilestackSDKTests/TransformableTests.swift on lines 796..804
Tests/FilestackSDKTests/TransformableTests.swift on lines 826..834
Tests/FilestackSDKTests/TransformableTests.swift on lines 846..854
Tests/FilestackSDKTests/TransformableTests.swift on lines 856..864
Tests/FilestackSDKTests/TransformableTests.swift on lines 876..884
Tests/FilestackSDKTests/TransformableTests.swift on lines 896..904
Tests/FilestackSDKTests/TransformableTests.swift on lines 959..967
Tests/FilestackSDKTests/TransformableTests.swift on lines 979..987
Tests/FilestackSDKTests/TransformableTests.swift on lines 1528..1536
Tests/FilestackSDKTests/TransformableTests.swift on lines 1538..1546
Tests/FilestackSDKTests/TransformableTests.swift on lines 1548..1556
Tests/FilestackSDKTests/TransformableTests.swift on lines 1558..1566
Tests/FilestackSDKTests/TransformableTests.swift on lines 1568..1576
Tests/FilestackSDKTests/TransformableTests.swift on lines 1612..1620

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

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

    func testBorderTransformationWithoutArgumentsURL() {
        transformable.add(transform: BorderTransform())

        let expectedURL = Constants.cdnURL
            .appendingPathComponent("border")
Severity: Major
Found in Tests/FilestackSDKTests/TransformableTests.swift and 27 other locations - About 45 mins to fix
Tests/FilestackSDKTests/TransformableTests.swift on lines 144..152
Tests/FilestackSDKTests/TransformableTests.swift on lines 175..183
Tests/FilestackSDKTests/TransformableTests.swift on lines 229..237
Tests/FilestackSDKTests/TransformableTests.swift on lines 289..297
Tests/FilestackSDKTests/TransformableTests.swift on lines 299..307
Tests/FilestackSDKTests/TransformableTests.swift on lines 339..347
Tests/FilestackSDKTests/TransformableTests.swift on lines 349..357
Tests/FilestackSDKTests/TransformableTests.swift on lines 409..417
Tests/FilestackSDKTests/TransformableTests.swift on lines 611..619
Tests/FilestackSDKTests/TransformableTests.swift on lines 651..659
Tests/FilestackSDKTests/TransformableTests.swift on lines 681..689
Tests/FilestackSDKTests/TransformableTests.swift on lines 711..719
Tests/FilestackSDKTests/TransformableTests.swift on lines 746..754
Tests/FilestackSDKTests/TransformableTests.swift on lines 776..784
Tests/FilestackSDKTests/TransformableTests.swift on lines 826..834
Tests/FilestackSDKTests/TransformableTests.swift on lines 846..854
Tests/FilestackSDKTests/TransformableTests.swift on lines 856..864
Tests/FilestackSDKTests/TransformableTests.swift on lines 876..884
Tests/FilestackSDKTests/TransformableTests.swift on lines 896..904
Tests/FilestackSDKTests/TransformableTests.swift on lines 959..967
Tests/FilestackSDKTests/TransformableTests.swift on lines 979..987
Tests/FilestackSDKTests/TransformableTests.swift on lines 1528..1536
Tests/FilestackSDKTests/TransformableTests.swift on lines 1538..1546
Tests/FilestackSDKTests/TransformableTests.swift on lines 1548..1556
Tests/FilestackSDKTests/TransformableTests.swift on lines 1558..1566
Tests/FilestackSDKTests/TransformableTests.swift on lines 1568..1576
Tests/FilestackSDKTests/TransformableTests.swift on lines 1612..1620

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

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

    func testBlurTransformationWithoutArgumentsURL() {
        transformable.add(transform: BlurTransform())

        let expectedURL = Constants.cdnURL
            .appendingPathComponent("blur")
Severity: Major
Found in Tests/FilestackSDKTests/TransformableTests.swift and 27 other locations - About 45 mins to fix
Tests/FilestackSDKTests/TransformableTests.swift on lines 144..152
Tests/FilestackSDKTests/TransformableTests.swift on lines 175..183
Tests/FilestackSDKTests/TransformableTests.swift on lines 229..237
Tests/FilestackSDKTests/TransformableTests.swift on lines 289..297
Tests/FilestackSDKTests/TransformableTests.swift on lines 299..307
Tests/FilestackSDKTests/TransformableTests.swift on lines 339..347
Tests/FilestackSDKTests/TransformableTests.swift on lines 349..357
Tests/FilestackSDKTests/TransformableTests.swift on lines 409..417
Tests/FilestackSDKTests/TransformableTests.swift on lines 611..619
Tests/FilestackSDKTests/TransformableTests.swift on lines 651..659
Tests/FilestackSDKTests/TransformableTests.swift on lines 681..689
Tests/FilestackSDKTests/TransformableTests.swift on lines 711..719
Tests/FilestackSDKTests/TransformableTests.swift on lines 746..754
Tests/FilestackSDKTests/TransformableTests.swift on lines 776..784
Tests/FilestackSDKTests/TransformableTests.swift on lines 796..804
Tests/FilestackSDKTests/TransformableTests.swift on lines 826..834
Tests/FilestackSDKTests/TransformableTests.swift on lines 856..864
Tests/FilestackSDKTests/TransformableTests.swift on lines 876..884
Tests/FilestackSDKTests/TransformableTests.swift on lines 896..904
Tests/FilestackSDKTests/TransformableTests.swift on lines 959..967
Tests/FilestackSDKTests/TransformableTests.swift on lines 979..987
Tests/FilestackSDKTests/TransformableTests.swift on lines 1528..1536
Tests/FilestackSDKTests/TransformableTests.swift on lines 1538..1546
Tests/FilestackSDKTests/TransformableTests.swift on lines 1548..1556
Tests/FilestackSDKTests/TransformableTests.swift on lines 1558..1566
Tests/FilestackSDKTests/TransformableTests.swift on lines 1568..1576
Tests/FilestackSDKTests/TransformableTests.swift on lines 1612..1620

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

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

    func testTagsTransformationURL() {
        transformable.add(transform: TagsTransform())

        let expectedURL = Constants.cdnURL
            .appendingPathComponent("tags")
Severity: Major
Found in Tests/FilestackSDKTests/TransformableTests.swift and 27 other locations - About 45 mins to fix
Tests/FilestackSDKTests/TransformableTests.swift on lines 144..152
Tests/FilestackSDKTests/TransformableTests.swift on lines 175..183
Tests/FilestackSDKTests/TransformableTests.swift on lines 229..237
Tests/FilestackSDKTests/TransformableTests.swift on lines 289..297
Tests/FilestackSDKTests/TransformableTests.swift on lines 339..347
Tests/FilestackSDKTests/TransformableTests.swift on lines 349..357
Tests/FilestackSDKTests/TransformableTests.swift on lines 409..417
Tests/FilestackSDKTests/TransformableTests.swift on lines 611..619
Tests/FilestackSDKTests/TransformableTests.swift on lines 651..659
Tests/FilestackSDKTests/TransformableTests.swift on lines 681..689
Tests/FilestackSDKTests/TransformableTests.swift on lines 711..719
Tests/FilestackSDKTests/TransformableTests.swift on lines 746..754
Tests/FilestackSDKTests/TransformableTests.swift on lines 776..784
Tests/FilestackSDKTests/TransformableTests.swift on lines 796..804
Tests/FilestackSDKTests/TransformableTests.swift on lines 826..834
Tests/FilestackSDKTests/TransformableTests.swift on lines 846..854
Tests/FilestackSDKTests/TransformableTests.swift on lines 856..864
Tests/FilestackSDKTests/TransformableTests.swift on lines 876..884
Tests/FilestackSDKTests/TransformableTests.swift on lines 896..904
Tests/FilestackSDKTests/TransformableTests.swift on lines 959..967
Tests/FilestackSDKTests/TransformableTests.swift on lines 979..987
Tests/FilestackSDKTests/TransformableTests.swift on lines 1528..1536
Tests/FilestackSDKTests/TransformableTests.swift on lines 1538..1546
Tests/FilestackSDKTests/TransformableTests.swift on lines 1548..1556
Tests/FilestackSDKTests/TransformableTests.swift on lines 1558..1566
Tests/FilestackSDKTests/TransformableTests.swift on lines 1568..1576
Tests/FilestackSDKTests/TransformableTests.swift on lines 1612..1620

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

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

    func testVignetteTransformationWithoutArgumentsURL() {
        transformable.add(transform: VignetteTransform())

        let expectedURL = Constants.cdnURL
            .appendingPathComponent("vignette")
Severity: Major
Found in Tests/FilestackSDKTests/TransformableTests.swift and 27 other locations - About 45 mins to fix
Tests/FilestackSDKTests/TransformableTests.swift on lines 144..152
Tests/FilestackSDKTests/TransformableTests.swift on lines 175..183
Tests/FilestackSDKTests/TransformableTests.swift on lines 229..237
Tests/FilestackSDKTests/TransformableTests.swift on lines 289..297
Tests/FilestackSDKTests/TransformableTests.swift on lines 299..307
Tests/FilestackSDKTests/TransformableTests.swift on lines 339..347
Tests/FilestackSDKTests/TransformableTests.swift on lines 349..357
Tests/FilestackSDKTests/TransformableTests.swift on lines 409..417
Tests/FilestackSDKTests/TransformableTests.swift on lines 611..619
Tests/FilestackSDKTests/TransformableTests.swift on lines 681..689
Tests/FilestackSDKTests/TransformableTests.swift on lines 711..719
Tests/FilestackSDKTests/TransformableTests.swift on lines 746..754
Tests/FilestackSDKTests/TransformableTests.swift on lines 776..784
Tests/FilestackSDKTests/TransformableTests.swift on lines 796..804
Tests/FilestackSDKTests/TransformableTests.swift on lines 826..834
Tests/FilestackSDKTests/TransformableTests.swift on lines 846..854
Tests/FilestackSDKTests/TransformableTests.swift on lines 856..864
Tests/FilestackSDKTests/TransformableTests.swift on lines 876..884
Tests/FilestackSDKTests/TransformableTests.swift on lines 896..904
Tests/FilestackSDKTests/TransformableTests.swift on lines 959..967
Tests/FilestackSDKTests/TransformableTests.swift on lines 979..987
Tests/FilestackSDKTests/TransformableTests.swift on lines 1528..1536
Tests/FilestackSDKTests/TransformableTests.swift on lines 1538..1546
Tests/FilestackSDKTests/TransformableTests.swift on lines 1548..1556
Tests/FilestackSDKTests/TransformableTests.swift on lines 1558..1566
Tests/FilestackSDKTests/TransformableTests.swift on lines 1568..1576
Tests/FilestackSDKTests/TransformableTests.swift on lines 1612..1620

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

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

    func testBlackAndWhiteTransformationWithoutArgumentsURL() {
        transformable.add(transform: BlackAndWhiteTransform())

        let expectedURL = Constants.cdnURL
            .appendingPathComponent("blackwhite")
Severity: Major
Found in Tests/FilestackSDKTests/TransformableTests.swift and 27 other locations - About 45 mins to fix
Tests/FilestackSDKTests/TransformableTests.swift on lines 144..152
Tests/FilestackSDKTests/TransformableTests.swift on lines 175..183
Tests/FilestackSDKTests/TransformableTests.swift on lines 229..237
Tests/FilestackSDKTests/TransformableTests.swift on lines 289..297
Tests/FilestackSDKTests/TransformableTests.swift on lines 299..307
Tests/FilestackSDKTests/TransformableTests.swift on lines 339..347
Tests/FilestackSDKTests/TransformableTests.swift on lines 349..357
Tests/FilestackSDKTests/TransformableTests.swift on lines 409..417
Tests/FilestackSDKTests/TransformableTests.swift on lines 611..619
Tests/FilestackSDKTests/TransformableTests.swift on lines 651..659
Tests/FilestackSDKTests/TransformableTests.swift on lines 681..689
Tests/FilestackSDKTests/TransformableTests.swift on lines 711..719
Tests/FilestackSDKTests/TransformableTests.swift on lines 746..754
Tests/FilestackSDKTests/TransformableTests.swift on lines 776..784
Tests/FilestackSDKTests/TransformableTests.swift on lines 796..804
Tests/FilestackSDKTests/TransformableTests.swift on lines 826..834
Tests/FilestackSDKTests/TransformableTests.swift on lines 846..854
Tests/FilestackSDKTests/TransformableTests.swift on lines 856..864
Tests/FilestackSDKTests/TransformableTests.swift on lines 896..904
Tests/FilestackSDKTests/TransformableTests.swift on lines 959..967
Tests/FilestackSDKTests/TransformableTests.swift on lines 979..987
Tests/FilestackSDKTests/TransformableTests.swift on lines 1528..1536
Tests/FilestackSDKTests/TransformableTests.swift on lines 1538..1546
Tests/FilestackSDKTests/TransformableTests.swift on lines 1548..1556
Tests/FilestackSDKTests/TransformableTests.swift on lines 1558..1566
Tests/FilestackSDKTests/TransformableTests.swift on lines 1568..1576
Tests/FilestackSDKTests/TransformableTests.swift on lines 1612..1620

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

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

    func testCopyrightTransformationURL() {
        transformable.add(transform: CopyrightTransform())

        let expectedURL = Constants.cdnURL
            .appendingPathComponent("copyright")
Severity: Major
Found in Tests/FilestackSDKTests/TransformableTests.swift and 27 other locations - About 45 mins to fix
Tests/FilestackSDKTests/TransformableTests.swift on lines 144..152
Tests/FilestackSDKTests/TransformableTests.swift on lines 175..183
Tests/FilestackSDKTests/TransformableTests.swift on lines 229..237
Tests/FilestackSDKTests/TransformableTests.swift on lines 289..297
Tests/FilestackSDKTests/TransformableTests.swift on lines 299..307
Tests/FilestackSDKTests/TransformableTests.swift on lines 339..347
Tests/FilestackSDKTests/TransformableTests.swift on lines 349..357
Tests/FilestackSDKTests/TransformableTests.swift on lines 409..417
Tests/FilestackSDKTests/TransformableTests.swift on lines 611..619
Tests/FilestackSDKTests/TransformableTests.swift on lines 651..659
Tests/FilestackSDKTests/TransformableTests.swift on lines 681..689
Tests/FilestackSDKTests/TransformableTests.swift on lines 711..719
Tests/FilestackSDKTests/TransformableTests.swift on lines 746..754
Tests/FilestackSDKTests/TransformableTests.swift on lines 776..784
Tests/FilestackSDKTests/TransformableTests.swift on lines 796..804
Tests/FilestackSDKTests/TransformableTests.swift on lines 826..834
Tests/FilestackSDKTests/TransformableTests.swift on lines 846..854
Tests/FilestackSDKTests/TransformableTests.swift on lines 856..864
Tests/FilestackSDKTests/TransformableTests.swift on lines 876..884
Tests/FilestackSDKTests/TransformableTests.swift on lines 896..904
Tests/FilestackSDKTests/TransformableTests.swift on lines 959..967
Tests/FilestackSDKTests/TransformableTests.swift on lines 979..987
Tests/FilestackSDKTests/TransformableTests.swift on lines 1528..1536
Tests/FilestackSDKTests/TransformableTests.swift on lines 1548..1556
Tests/FilestackSDKTests/TransformableTests.swift on lines 1558..1566
Tests/FilestackSDKTests/TransformableTests.swift on lines 1568..1576
Tests/FilestackSDKTests/TransformableTests.swift on lines 1612..1620

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

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

        if let downloadProgress = downloadProgress {
            progressObservers.append(task.progress.observe(\.fractionCompleted) { progress, _ in
                queue?.async {
                    downloadProgress(progress)
                }
Severity: Major
Found in Sources/FilestackSDK/Public/Models/FileLink.swift and 2 other locations - About 45 mins to fix
Sources/FilestackSDK/Public/Models/FileLink.swift on lines 76..82
Sources/FilestackSDK/Public/Models/FileLink.swift on lines 282..288

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 54.

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

        if let downloadProgress = downloadProgress {
            progressObservers.append(task.progress.observe(\.fractionCompleted) { progress, _ in
                queue?.async {
                    downloadProgress(progress)
                }
Severity: Major
Found in Sources/FilestackSDK/Public/Models/FileLink.swift and 2 other locations - About 45 mins to fix
Sources/FilestackSDK/Public/Models/FileLink.swift on lines 212..218
Sources/FilestackSDK/Public/Models/FileLink.swift on lines 282..288

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 54.

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

        if let uploadProgress = uploadProgress {
            progressObservers.append(task.progress.observe(\.fractionCompleted) { progress, _ in
                queue?.async {
                    uploadProgress(progress)
                }
Severity: Major
Found in Sources/FilestackSDK/Public/Models/FileLink.swift and 2 other locations - About 45 mins to fix
Sources/FilestackSDK/Public/Models/FileLink.swift on lines 76..82
Sources/FilestackSDK/Public/Models/FileLink.swift on lines 212..218

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

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

    func headers(from response: JSONResponse) -> [String: String]? {
        return response.json?["headers"] as? [String: String]
    }
Sources/FilestackSDK/Internal/Operations/SubmitChunkUploadOperation.swift on lines 83..85

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

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

    func headers(from response: JSONResponse) -> [String: String]? {
        return response.json?["headers"] as? [String: String]
    }
Sources/FilestackSDK/Internal/Operations/SubmitPartRegularUploadOperation.swift on lines 82..84

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        observers.append(operation.observe(\.isExecuting, options: [.new]) { (operation, change) in
            if change.newValue == true {
                isExecutingExpectation.fulfill()
            }
        })
Severity: Major
Found in Tests/FilestackSDKTests/BaseOperationTests.swift and 4 other locations - About 40 mins to fix
Tests/FilestackSDKTests/BaseOperationTests.swift on lines 151..155
Tests/FilestackSDKTests/BaseOperationTests.swift on lines 157..161
Tests/FilestackSDKTests/BaseOperationTests.swift on lines 185..189
Tests/FilestackSDKTests/BaseOperationTests.swift on lines 191..195

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

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

        switch operation.result {
        case .success(_):
            XCTFail()
        case let .failure(error):
            XCTAssertEqual(error.localizedDescription, Error.cancelled.localizedDescription)
Severity: Minor
Found in Tests/FilestackSDKTests/BaseOperationTests.swift and 1 other location - About 40 mins to fix
Tests/FilestackSDKTests/BaseOperationTests.swift on lines 122..127

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

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

        switch operation.result {
        case .success(_):
            XCTFail()
        case let .failure(error):
            XCTAssertEqual(error.localizedDescription, Error.cancelled.localizedDescription)
Severity: Minor
Found in Tests/FilestackSDKTests/BaseOperationTests.swift and 1 other location - About 40 mins to fix
Tests/FilestackSDKTests/BaseOperationTests.swift on lines 102..107

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        observers.append(operation.observe(\.isFinished, options: [.new]) { (operation, change) in
            if change.newValue == true {
                isFinishedExpectation.fulfill()
            }
        })
Severity: Major
Found in Tests/FilestackSDKTests/BaseOperationTests.swift and 4 other locations - About 40 mins to fix
Tests/FilestackSDKTests/BaseOperationTests.swift on lines 145..149
Tests/FilestackSDKTests/BaseOperationTests.swift on lines 157..161
Tests/FilestackSDKTests/BaseOperationTests.swift on lines 185..189
Tests/FilestackSDKTests/BaseOperationTests.swift on lines 191..195

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        observers.append(operation.observe(\.isExecuting, options: [.new]) { (operation, change) in
            if change.newValue == true {
                isExecutingExpectation.fulfill()
            }
        })
Severity: Major
Found in Tests/FilestackSDKTests/BaseOperationTests.swift and 4 other locations - About 40 mins to fix
Tests/FilestackSDKTests/BaseOperationTests.swift on lines 145..149
Tests/FilestackSDKTests/BaseOperationTests.swift on lines 151..155
Tests/FilestackSDKTests/BaseOperationTests.swift on lines 157..161
Tests/FilestackSDKTests/BaseOperationTests.swift on lines 191..195

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

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