weareopensource/Swift

View on GitHub
waosSwift/modules/core/controllers/CoreController.swift

Summary

Maintainability
A
3 hrs
Test Coverage

Function viewDidLoad has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    override func viewDidLoad() {
        self.view.setNeedsUpdateConstraints()
        // navigation
        if Metric.navigationBarTransparent == true {
            self.navigationController?.navigationBar.standardAppearance = self.transparentNavigationBar
Severity: Minor
Found in waosSwift/modules/core/controllers/CoreController.swift - About 1 hr to fix

    Function viewDidLoad has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        override func viewDidLoad() {
            self.view.setNeedsUpdateConstraints()
            // navigation
            if Metric.navigationBarTransparent == true {
                self.navigationController?.navigationBar.standardAppearance = self.transparentNavigationBar
    Severity: Minor
    Found in waosSwift/modules/core/controllers/CoreController.swift - About 35 mins 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

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

        let error = MessageView.viewFromNib(layout: .cardView).then {
            $0.configureTheme(.error, iconStyle: .subtle)
            $0.backgroundView.backgroundColor = Metric.error?.withAlphaComponent(CGFloat(config["theme"]["popup"]["alpha"].float ?? 0.9))
            $0.button?.backgroundColor = .clear
            $0.button?.tintColor = UIColor.white.withAlphaComponent(0.5)
    Severity: Major
    Found in waosSwift/modules/core/controllers/CoreController.swift and 1 other location - About 2 hrs to fix
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 69..76

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

    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

            if Metric.navigationBarTransparent == true {
                self.navigationController?.navigationBar.standardAppearance = self.transparentNavigationBar
                self.navigationController?.navigationBar.scrollEdgeAppearance = self.transparentNavigationBar
            } else {
                self.navigationController?.navigationBar.standardAppearance = self.defaultNavigationBar
    Severity: Minor
    Found in waosSwift/modules/core/controllers/CoreController.swift and 1 other location - About 50 mins to fix
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 104..110

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 61.

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

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

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

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

    Refactorings

    Further Reading

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

            if Metric.tabBarTitle != true {
                self.tabBarController?.tabBar.items?.forEach {
                   $0.title = ""
                   $0.imageInsets = UIEdgeInsets(top: 6, left: 0, bottom: -6, right: 0)
                }
    Severity: Minor
    Found in waosSwift/modules/core/controllers/CoreController.swift and 1 other location - About 50 mins to fix
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 125..130

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

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

    extension CoreController: MFMailComposeViewControllerDelegate {
        func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) {
            controller.dismiss(animated: true, completion: nil)
        }
    }
    Severity: Major
    Found in waosSwift/modules/core/controllers/CoreController.swift and 3 other locations - About 45 mins to fix
    waosSwift/modules/core/controllers/CoreCollectionViewCellController.swift on lines 71..75
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 182..186
    waosSwift/modules/core/controllers/CoreTableViewCellController.swift on lines 73..77

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

            popupConfig.duration = .seconds(seconds: TimeInterval(Int(config["theme"]["popup"]["duration"].int ?? 3)))
    Severity: Major
    Found in waosSwift/modules/core/controllers/CoreController.swift and 3 other locations - About 40 mins to fix
    waosSwift/modules/core/controllers/CoreCollectionViewCellController.swift on lines 33..33
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 142..142
    waosSwift/modules/core/controllers/CoreTableViewCellController.swift on lines 34..34

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 49.

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

            if Metric.navigationBarShadow == false {
                self.navigationController?.navigationBar.scrollEdgeAppearance?.shadowColor = .clear
                self.navigationController?.navigationBar.standardAppearance.shadowColor = .clear
                self.transparentNavigationBar.shadowColor = .clear
            }
    Severity: Minor
    Found in waosSwift/modules/core/controllers/CoreController.swift and 1 other location - About 40 mins to fix
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 111..115

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

    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

        let defaultNavigationBar = UINavigationBarAppearance().then {
            $0.configureWithDefaultBackground()
            $0.backgroundColor = Metric.primary
            $0.titleTextAttributes = [.foregroundColor: Metric.onPrimary!]
        }
    Severity: Minor
    Found in waosSwift/modules/core/controllers/CoreController.swift and 1 other location - About 35 mins to fix
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 63..67

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

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

        lazy private(set) var className: String = {
            return type(of: self).description().components(separatedBy: ".").last ?? ""
        }()
    Severity: Minor
    Found in waosSwift/modules/core/controllers/CoreController.swift and 1 other location - About 35 mins to fix
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 53..55

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

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

            if Metric.tabBarBorder == false {
                self.tabBarController?.tabBar.layer.borderColor = UIColor.clear.cgColor
                self.tabBarController?.tabBar.clipsToBounds = true
            }
    Severity: Minor
    Found in waosSwift/modules/core/controllers/CoreController.swift and 1 other location - About 30 mins to fix
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 131..134

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

    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 12 locations. Consider refactoring.
    Wontfix

            static let tabBarTitle = NSString(string: config["theme"]["tabBar"]["title"].string ?? "").boolValue
    Severity: Major
    Found in waosSwift/modules/core/controllers/CoreController.swift and 11 other locations - About 30 mins to fix
    waosSwift/modules/core/controllers/CoreController.swift on lines 25..25
    waosSwift/modules/core/controllers/CoreController.swift on lines 26..26
    waosSwift/modules/core/controllers/CoreController.swift on lines 27..27
    waosSwift/modules/core/controllers/CoreController.swift on lines 28..28
    waosSwift/modules/core/controllers/CoreController.swift on lines 30..30
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 33..33
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 34..34
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 38..38
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 39..39
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 40..40
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 41..41

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

    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 12 locations. Consider refactoring.
    Wontfix

            static let tabBarColor = NSString(string: config["theme"]["tabBar"]["color"].string ?? "").boolValue
    Severity: Major
    Found in waosSwift/modules/core/controllers/CoreController.swift and 11 other locations - About 30 mins to fix
    waosSwift/modules/core/controllers/CoreController.swift on lines 25..25
    waosSwift/modules/core/controllers/CoreController.swift on lines 26..26
    waosSwift/modules/core/controllers/CoreController.swift on lines 28..28
    waosSwift/modules/core/controllers/CoreController.swift on lines 29..29
    waosSwift/modules/core/controllers/CoreController.swift on lines 30..30
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 33..33
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 34..34
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 38..38
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 39..39
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 40..40
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 41..41

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

    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 12 locations. Consider refactoring.
    Wontfix

            static let navigationBarShadow = NSString(string: config["theme"]["navigationBar"]["shadow"].string ?? "").boolValue
    Severity: Major
    Found in waosSwift/modules/core/controllers/CoreController.swift and 11 other locations - About 30 mins to fix
    waosSwift/modules/core/controllers/CoreController.swift on lines 25..25
    waosSwift/modules/core/controllers/CoreController.swift on lines 27..27
    waosSwift/modules/core/controllers/CoreController.swift on lines 28..28
    waosSwift/modules/core/controllers/CoreController.swift on lines 29..29
    waosSwift/modules/core/controllers/CoreController.swift on lines 30..30
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 33..33
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 34..34
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 38..38
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 39..39
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 40..40
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 41..41

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

    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 12 locations. Consider refactoring.
    Wontfix

            static let tabBarBorder = NSString(string: config["theme"]["tabBar"]["border"].string ?? "").boolValue
    Severity: Major
    Found in waosSwift/modules/core/controllers/CoreController.swift and 11 other locations - About 30 mins to fix
    waosSwift/modules/core/controllers/CoreController.swift on lines 25..25
    waosSwift/modules/core/controllers/CoreController.swift on lines 26..26
    waosSwift/modules/core/controllers/CoreController.swift on lines 27..27
    waosSwift/modules/core/controllers/CoreController.swift on lines 28..28
    waosSwift/modules/core/controllers/CoreController.swift on lines 29..29
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 33..33
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 34..34
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 38..38
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 39..39
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 40..40
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 41..41

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

    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 12 locations. Consider refactoring.
    Wontfix

            static let tabBarTintColor = NSString(string: config["theme"]["tabBar"]["tintColor"].string ?? "").boolValue
    Severity: Major
    Found in waosSwift/modules/core/controllers/CoreController.swift and 11 other locations - About 30 mins to fix
    waosSwift/modules/core/controllers/CoreController.swift on lines 25..25
    waosSwift/modules/core/controllers/CoreController.swift on lines 26..26
    waosSwift/modules/core/controllers/CoreController.swift on lines 27..27
    waosSwift/modules/core/controllers/CoreController.swift on lines 29..29
    waosSwift/modules/core/controllers/CoreController.swift on lines 30..30
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 33..33
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 34..34
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 38..38
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 39..39
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 40..40
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 41..41

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

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

            if Metric.tabBarColor == true {
                self.tabBarController?.tabBar.barTintColor = Metric.primary
                self.tabBarController?.tabBar.tintColor = Metric.onPrimary
            }
    Severity: Minor
    Found in waosSwift/modules/core/controllers/CoreController.swift and 1 other location - About 30 mins to fix
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 118..121

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

    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 12 locations. Consider refactoring.
    Wontfix

            static let navigationBarTransparent = NSString(string: config["theme"]["navigationBar"]["transparent"].string ?? "").boolValue
    Severity: Major
    Found in waosSwift/modules/core/controllers/CoreController.swift and 11 other locations - About 30 mins to fix
    waosSwift/modules/core/controllers/CoreController.swift on lines 26..26
    waosSwift/modules/core/controllers/CoreController.swift on lines 27..27
    waosSwift/modules/core/controllers/CoreController.swift on lines 28..28
    waosSwift/modules/core/controllers/CoreController.swift on lines 29..29
    waosSwift/modules/core/controllers/CoreController.swift on lines 30..30
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 33..33
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 34..34
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 38..38
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 39..39
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 40..40
    waosSwift/modules/core/controllers/CoreFormController.swift on lines 41..41

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

    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

    There are no issues that match your filters.

    Category
    Status