stanwood/Stanwood_Debugger_iOS

View on GitHub

Showing 87 of 106 total issues

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

class CrashViewController: UIViewController {

    var presenter: CrashPresenter!
    var dataSource: CrashDataSource!
    var delegate: CrashDelegate!
Severity: Major
Found in Sources/Harlow/Modules/CrashDetail/CrashViewController.swift and 1 other location - About 3 hrs to fix
Sources/Harlow/Modules/ErrorDetail/ErrorViewController.swift on lines 31..66

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

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

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

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

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

Refactorings

Further Reading

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

class ErrorViewController: UIViewController, SourceTypePresentable {

    // MARK:- Properties

    var presenter: ErrorPresenter!
Severity: Major
Found in Sources/Harlow/Modules/ErrorDetail/ErrorViewController.swift and 1 other location - About 3 hrs to fix
Sources/Harlow/Modules/CrashDetail/CrashViewController.swift on lines 31..61

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

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

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

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

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

Refactorings

Further Reading

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

    func fill(with model: Model?) {
        guard let item = model as? NetworkOverviewable else { return }
        self.item = item
        
        labels[Labels.date.rawValue].text = item.formattedDate
Sources/Harlow/Modules/List/DataSource & Delegate/Cells/NetworkingCell.swift on lines 28..38

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

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

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

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

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

Refactorings

Further Reading

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

    func fill(with model: Model?) {
        guard let item = model as? NetworkItem else { return }
        self.item = item
        
        labels[Labels.date.rawValue].text = item.formattedDate
Sources/Harlow/Modules/NetworkCall/DataSource & Delegate/Cells/NetworkOverviewCell.swift on lines 49..59

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

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

class NetworkingExample: Elements<NetworkExample>, Headerable {
    
    var title: String = ""
    
    var headerView: UIView {
Severity: Major
Found in Example/Harlow/Models/SourceType.swift and 2 other locations - About 1 hr to fix
Example/Harlow/Models/SourceType.swift on lines 84..98
Example/Harlow/Models/SourceType.swift on lines 150..164

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

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

class CrashesExample: Elements<CrashExample>, Headerable {

    var title: String = ""

    var headerView: UIView {
Severity: Major
Found in Example/Harlow/Models/SourceType.swift and 2 other locations - About 1 hr to fix
Example/Harlow/Models/SourceType.swift on lines 84..98
Example/Harlow/Models/SourceType.swift on lines 105..119

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

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

class AnalyticsExample: Elements<AnalyticExample>, Headerable {
    
    var title: String = ""
    
    var headerView: UIView {
Severity: Major
Found in Example/Harlow/Models/SourceType.swift and 2 other locations - About 1 hr to fix
Example/Harlow/Models/SourceType.swift on lines 105..119
Example/Harlow/Models/SourceType.swift on lines 150..164

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

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

class ErrorOverviewSection: Elements<ErrorItem>, Headerable {
    
    var headerView: UIView {
        let view = NetworkHeaderView.loadFromNib(bundle: Bundle.debuggerBundle())
        view?.backgroundColor = UIColor.white.withAlphaComponent(0.9)
Severity: Major
Found in Sources/Harlow/Model/DataType/ErrorDetailISections.swift and 11 other locations - About 1 hr to fix
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 30..42
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 44..56
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 47..59
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 61..73
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 33..45
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 47..60
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 62..74
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 76..88
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 90..102
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 104..116
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 118..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 115.

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

class ErrorUserInfoSection: Elements<ErrorItem>, Headerable {
    
    var headerView: UIView {
        let view = NetworkHeaderView.loadFromNib(bundle: Bundle.debuggerBundle())
        view?.backgroundColor = UIColor.white.withAlphaComponent(0.9)
Severity: Major
Found in Sources/Harlow/Model/DataType/ErrorDetailISections.swift and 11 other locations - About 1 hr to fix
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 30..42
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 44..56
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 33..45
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 47..59
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 33..45
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 47..60
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 62..74
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 76..88
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 90..102
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 104..116
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 118..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 115.

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

class NetworkOverviewSection: Elements<NetworkItem>, Headerable {
    
    var headerView: UIView {
        let view = NetworkHeaderView.loadFromNib(bundle: Bundle.debuggerBundle())
        view?.backgroundColor = UIColor.white.withAlphaComponent(0.9)
Severity: Major
Found in Sources/Harlow/Model/DataType/NetworkDetailItems.swift and 11 other locations - About 1 hr to fix
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 30..42
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 44..56
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 33..45
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 47..59
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 61..73
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 33..45
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 47..60
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 76..88
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 90..102
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 104..116
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 118..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 115.

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

class NetworkResponseSection: Elements<NetworkItem>, Headerable {
    
    var headerView: UIView {
        let view = NetworkHeaderView.loadFromNib(bundle: Bundle.debuggerBundle())
        view?.backgroundColor = UIColor.white.withAlphaComponent(0.9)
Severity: Major
Found in Sources/Harlow/Model/DataType/NetworkDetailItems.swift and 11 other locations - About 1 hr to fix
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 30..42
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 44..56
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 33..45
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 47..59
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 61..73
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 33..45
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 47..60
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 62..74
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 90..102
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 104..116
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 118..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 115.

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

class NetworkHeadersSection: Elements<NetworkItem>, Headerable {
    
    var headerView: UIView {
        let view = NetworkHeaderView.loadFromNib(bundle: Bundle.debuggerBundle())
        view?.backgroundColor = UIColor.white.withAlphaComponent(0.9)
Severity: Major
Found in Sources/Harlow/Model/DataType/NetworkDetailItems.swift and 11 other locations - About 1 hr to fix
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 30..42
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 44..56
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 33..45
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 47..59
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 61..73
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 33..45
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 47..60
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 62..74
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 76..88
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 104..116
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 118..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 115.

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

class NetworkBodySection: Elements<NetworkItem>, Headerable {
    
    var headerView: UIView {
        let view = NetworkHeaderView.loadFromNib(bundle: Bundle.debuggerBundle())
        view?.backgroundColor = UIColor.white.withAlphaComponent(0.9)
Severity: Major
Found in Sources/Harlow/Model/DataType/NetworkDetailItems.swift and 11 other locations - About 1 hr to fix
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 30..42
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 44..56
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 33..45
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 47..59
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 61..73
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 33..45
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 47..60
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 62..74
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 76..88
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 90..102
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 104..116

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

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

class ErrorCodeSection: Elements<ErrorItem>, Headerable {
    
    var headerView: UIView {
        let view = NetworkHeaderView.loadFromNib(bundle: Bundle.debuggerBundle())
        view?.backgroundColor = UIColor.white.withAlphaComponent(0.9)
Severity: Major
Found in Sources/Harlow/Model/DataType/ErrorDetailISections.swift and 11 other locations - About 1 hr to fix
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 30..42
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 44..56
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 33..45
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 61..73
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 33..45
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 47..60
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 62..74
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 76..88
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 90..102
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 104..116
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 118..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 115.

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

class NetworkLatencySection: Elements<NetworkItem>, Headerable {
    
    var headerView: UIView {
        let view = NetworkHeaderView.loadFromNib(bundle: Bundle.debuggerBundle())
        view?.backgroundColor = UIColor.white.withAlphaComponent(0.9)
Severity: Major
Found in Sources/Harlow/Model/DataType/NetworkDetailItems.swift and 11 other locations - About 1 hr to fix
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 30..42
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 44..56
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 33..45
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 47..59
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 61..73
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 47..60
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 62..74
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 76..88
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 90..102
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 104..116
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 118..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 115.

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

class CrashStackSection: Elements<StackItem>, Headerable {

    var headerView: UIView {
        let view = NetworkHeaderView.loadFromNib(bundle: Bundle.debuggerBundle())
        view?.backgroundColor = UIColor.white.withAlphaComponent(0.9)
Severity: Major
Found in Sources/Harlow/Model/DataType/CrashDetailSections.swift and 11 other locations - About 1 hr to fix
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 30..42
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 33..45
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 47..59
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 61..73
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 33..45
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 47..60
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 62..74
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 76..88
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 90..102
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 104..116
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 118..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 115.

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

class NetworkDataSection: Elements<NetworkItem>, Headerable {
    
    var headerView: UIView {
        let view = NetworkHeaderView.loadFromNib(bundle: Bundle.debuggerBundle())
        view?.backgroundColor = UIColor.white.withAlphaComponent(0.9)
Severity: Major
Found in Sources/Harlow/Model/DataType/NetworkDetailItems.swift and 11 other locations - About 1 hr to fix
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 30..42
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 44..56
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 33..45
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 47..59
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 61..73
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 33..45
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 47..60
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 62..74
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 76..88
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 90..102
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 118..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 115.

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

class NetworkErrorSection: Elements<NetworkItem>, Headerable {
    
    var headerView: UIView {
        let view = NetworkHeaderView.loadFromNib(bundle: Bundle.debuggerBundle())
        view?.backgroundColor = UIColor.white.withAlphaComponent(0.9)
Severity: Major
Found in Sources/Harlow/Model/DataType/NetworkDetailItems.swift and 11 other locations - About 1 hr to fix
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 30..42
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 44..56
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 33..45
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 47..59
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 61..73
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 33..45
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 62..74
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 76..88
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 90..102
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 104..116
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 118..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 115.

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

class CrashOverviewSection: Elements<CrashItem>, Headerable {

    var headerView: UIView {
        let view = NetworkHeaderView.loadFromNib(bundle: Bundle.debuggerBundle())
        view?.backgroundColor = UIColor.white.withAlphaComponent(0.9)
Severity: Major
Found in Sources/Harlow/Model/DataType/CrashDetailSections.swift and 11 other locations - About 1 hr to fix
Sources/Harlow/Model/DataType/CrashDetailSections.swift on lines 44..56
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 33..45
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 47..59
Sources/Harlow/Model/DataType/ErrorDetailISections.swift on lines 61..73
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 33..45
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 47..60
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 62..74
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 76..88
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 90..102
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 104..116
Sources/Harlow/Model/DataType/NetworkDetailItems.swift on lines 118..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 115.

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

    private func present(_ item: CrashItem) {
        let viewController = CrashWireframe.makeViewController()
        let parameters = CrashParameters(appData: self.paramaterable.appData, item: item)
        CrashWireframe.prepare(viewController, with: self.actionable, and: parameters)
        currentViewController(base: window.rootViewController)?.navigationController?.pushViewController(viewController, animated: true)
Severity: Major
Found in Sources/Harlow/Controller/DebuggerCoordinator.swift and 2 other locations - About 1 hr to fix
Sources/Harlow/Controller/DebuggerCoordinator.swift on lines 95..100
Sources/Harlow/Controller/DebuggerCoordinator.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 85.

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