JohnCoates/Aerial

View on GitHub

Showing 257 of 1,136 total issues

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

                let tRect = CGRect(x: zRect.origin.x - scr.zeroedOrigin.x,
                                   y: zRect.origin.y - scr.zeroedOrigin.y,
                                   width: zRect.width,
                                   height: zRect.height)
Severity: Minor
Found in Aerial/Source/Views/AerialView+Player.swift and 1 other location - About 40 mins to fix
Aerial/Source/Views/AerialView+Player.swift on lines 58..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 50.

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

    static var textFadeDuration: Double {
        switch PrefsInfo.fadeModeText {
        case .t0_5:
            return 0.5
        case .t1:
Severity: Minor
Found in Aerial/Source/Views/AerialView.swift and 1 other location - About 40 mins to fix
Aerial/Source/Views/AerialView.swift on lines 55..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 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

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

  func decreaseVolume(by value: Float, autoMuteUnmute: Bool = false, muteThreshold: Float = 0.005) {
    setVolume(volume-value, autoMuteUnmute: autoMuteUnmute, muteThreshold: muteThreshold)
  }
Aerial/Source/Models/Hardware/ISSoundAdditions/SoundOutputManager+Goodies.swift on lines 17..19

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

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

  func increaseVolume(by value: Float, autoMuteUnmute: Bool = false, muteThreshold: Float = 0.005) {
    setVolume(volume+value, autoMuteUnmute: autoMuteUnmute, muteThreshold: muteThreshold)
  }
Aerial/Source/Models/Hardware/ISSoundAdditions/SoundOutputManager+Goodies.swift on lines 29..31

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

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

    static var fadeDuration: Double {
        switch PrefsVideos.fadeMode {
        case .t0_5:
            return 0.5
        case .t1:
Severity: Minor
Found in Aerial/Source/Views/AerialView.swift and 1 other location - About 40 mins to fix
Aerial/Source/Views/AerialView.swift on lines 68..79

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

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

    static private func getPath(forVideo video: AerialVideo) -> String {
        return Cache.thumbnailsPath.appending("/"+video.id+".png")
    }
Severity: Minor
Found in Aerial/Source/Models/Cache/Thumbnails.swift and 1 other location - About 40 mins to fix
Aerial/Source/Models/Cache/Thumbnails.swift on lines 165..167

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

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

  var volume: Float {
    get {
      (try? readVolume()) ?? 0
    }
    set {
Aerial/Source/Models/Hardware/ISSoundAdditions/SoundOutputManager+Properties.swift on lines 43..52

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

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

    static private func getLargePath(forVideo video: AerialVideo) -> String {
        return Cache.thumbnailsPath.appending("/"+video.id+"-large.jpg")
    }
Severity: Minor
Found in Aerial/Source/Models/Cache/Thumbnails.swift and 1 other location - About 40 mins to fix
Aerial/Source/Models/Cache/Thumbnails.swift on lines 161..163

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

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

  var isMuted: Bool {
    get {
      (try? readMute()) ?? false
    }
    set {
Aerial/Source/Models/Hardware/ISSoundAdditions/SoundOutputManager+Properties.swift on lines 27..36

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

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

        if let mode = VideoList.instance.modeFromPath(path) {
            let index = Int(path.split(separator: ":")[1])!
            return VideoList.instance.getVideosCountForSource(index, mode: mode)
        } else {
            // all
Severity: Minor
Found in Resources/MainUI/VideosViewController.swift and 1 other location - About 40 mins to fix
Aerial/Source/Models/Sources/VideoList.swift on lines 242..248

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

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

        if let mode = VideoList.instance.modeFromPath(path) {
            let index = Int(path.split(separator: ":")[1])!
            return VideoList.instance.getVideosForSource(index, mode: mode)
        } else {
            // all
Severity: Minor
Found in Aerial/Source/Models/Sources/VideoList.swift and 1 other location - About 40 mins to fix
Resources/MainUI/VideosViewController.swift on lines 688..694

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

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

    @IBAction func troubleshootButton(_ sender: Any) {
        let workspace = NSWorkspace.shared
        let url = URL(string: "https://aerialscreensaver.github.io/troubleshooting.html")!
        workspace.open(url)
    }
Severity: Major
Found in Resources/MainUI/Infos panels/HelpViewController.swift and 16 other locations - About 35 mins to fix
Resources/MainUI/First time setup/RecapViewController.swift on lines 24..28
Resources/MainUI/First time setup/RecapViewController.swift on lines 30..34
Resources/MainUI/First time setup/TimeSetupViewController.swift on lines 105..109
Resources/MainUI/First time setup/VideoFormatViewController.swift on lines 59..63
Resources/MainUI/Infos panels/CreditsViewController.swift on lines 21..25
Resources/MainUI/Infos panels/CreditsViewController.swift on lines 27..31
Resources/MainUI/Infos panels/CreditsViewController.swift on lines 33..37
Resources/MainUI/Infos panels/CreditsViewController.swift on lines 39..43
Resources/MainUI/Infos panels/HelpViewController.swift on lines 18..22
Resources/MainUI/Infos panels/HelpViewController.swift on lines 30..34
Resources/MainUI/Infos panels/HelpViewController.swift on lines 36..40
Resources/MainUI/Infos panels/InfoViewController.swift on lines 21..25
Resources/MainUI/Infos panels/InfoViewController.swift on lines 27..31
Resources/MainUI/Settings panels/AdvancedViewController.swift on lines 295..299
Resources/MainUI/Settings panels/AdvancedViewController.swift on lines 301..305
Resources/MainUI/Settings panels/SourcesViewController.swift on lines 116..120

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

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

    @IBAction func discordButton(_ sender: Any) {
        let workspace = NSWorkspace.shared
        let url = URL(string: "https://discord.gg/TPuA5WG")!
        workspace.open(url)
    }
Severity: Major
Found in Resources/MainUI/Infos panels/CreditsViewController.swift and 16 other locations - About 35 mins to fix
Resources/MainUI/First time setup/RecapViewController.swift on lines 24..28
Resources/MainUI/First time setup/RecapViewController.swift on lines 30..34
Resources/MainUI/First time setup/TimeSetupViewController.swift on lines 105..109
Resources/MainUI/First time setup/VideoFormatViewController.swift on lines 59..63
Resources/MainUI/Infos panels/CreditsViewController.swift on lines 21..25
Resources/MainUI/Infos panels/CreditsViewController.swift on lines 27..31
Resources/MainUI/Infos panels/CreditsViewController.swift on lines 33..37
Resources/MainUI/Infos panels/HelpViewController.swift on lines 18..22
Resources/MainUI/Infos panels/HelpViewController.swift on lines 24..28
Resources/MainUI/Infos panels/HelpViewController.swift on lines 30..34
Resources/MainUI/Infos panels/HelpViewController.swift on lines 36..40
Resources/MainUI/Infos panels/InfoViewController.swift on lines 21..25
Resources/MainUI/Infos panels/InfoViewController.swift on lines 27..31
Resources/MainUI/Settings panels/AdvancedViewController.swift on lines 295..299
Resources/MainUI/Settings panels/AdvancedViewController.swift on lines 301..305
Resources/MainUI/Settings panels/SourcesViewController.swift on lines 116..120

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

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

    @IBAction func checkFAQ(_ sender: Any) {
        let workspace = NSWorkspace.shared
        let url = URL(string: "https://aerialscreensaver.github.io/faq.html")!
        workspace.open(url)
    }
Severity: Major
Found in Resources/MainUI/First time setup/RecapViewController.swift and 16 other locations - About 35 mins to fix
Resources/MainUI/First time setup/RecapViewController.swift on lines 30..34
Resources/MainUI/First time setup/TimeSetupViewController.swift on lines 105..109
Resources/MainUI/First time setup/VideoFormatViewController.swift on lines 59..63
Resources/MainUI/Infos panels/CreditsViewController.swift on lines 21..25
Resources/MainUI/Infos panels/CreditsViewController.swift on lines 27..31
Resources/MainUI/Infos panels/CreditsViewController.swift on lines 33..37
Resources/MainUI/Infos panels/CreditsViewController.swift on lines 39..43
Resources/MainUI/Infos panels/HelpViewController.swift on lines 18..22
Resources/MainUI/Infos panels/HelpViewController.swift on lines 24..28
Resources/MainUI/Infos panels/HelpViewController.swift on lines 30..34
Resources/MainUI/Infos panels/HelpViewController.swift on lines 36..40
Resources/MainUI/Infos panels/InfoViewController.swift on lines 21..25
Resources/MainUI/Infos panels/InfoViewController.swift on lines 27..31
Resources/MainUI/Settings panels/AdvancedViewController.swift on lines 295..299
Resources/MainUI/Settings panels/AdvancedViewController.swift on lines 301..305
Resources/MainUI/Settings panels/SourcesViewController.swift on lines 116..120

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

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

    @IBAction func translationButton(_ sender: Any) {
        let workspace = NSWorkspace.shared
        let url = URL(string: "https://github.com/JohnCoates/Aerial/issues/792")!
        workspace.open(url)
    }
Severity: Major
Found in Resources/MainUI/Infos panels/CreditsViewController.swift and 16 other locations - About 35 mins to fix
Resources/MainUI/First time setup/RecapViewController.swift on lines 24..28
Resources/MainUI/First time setup/RecapViewController.swift on lines 30..34
Resources/MainUI/First time setup/TimeSetupViewController.swift on lines 105..109
Resources/MainUI/First time setup/VideoFormatViewController.swift on lines 59..63
Resources/MainUI/Infos panels/CreditsViewController.swift on lines 27..31
Resources/MainUI/Infos panels/CreditsViewController.swift on lines 33..37
Resources/MainUI/Infos panels/CreditsViewController.swift on lines 39..43
Resources/MainUI/Infos panels/HelpViewController.swift on lines 18..22
Resources/MainUI/Infos panels/HelpViewController.swift on lines 24..28
Resources/MainUI/Infos panels/HelpViewController.swift on lines 30..34
Resources/MainUI/Infos panels/HelpViewController.swift on lines 36..40
Resources/MainUI/Infos panels/InfoViewController.swift on lines 21..25
Resources/MainUI/Infos panels/InfoViewController.swift on lines 27..31
Resources/MainUI/Settings panels/AdvancedViewController.swift on lines 295..299
Resources/MainUI/Settings panels/AdvancedViewController.swift on lines 301..305
Resources/MainUI/Settings panels/SourcesViewController.swift on lines 116..120

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

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

        min.string = "\(String(format: "%.0f", tmin!))°"

        (min.font, min.fontSize) = min.makeFont(name: PrefsInfo.weather.fontName, size: size/4)
Severity: Major
Found in Aerial/Source/Views/Layers/Weather/ForecastLayer.swift and 6 other locations - About 35 mins to fix
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 175..177
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 197..199
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 274..276
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 285..287
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 296..298
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 415..416

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

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

        temp.string = "\(String(format: "%.0f", hour.main!.temp!))°"

        (temp.font, temp.fontSize) = temp.makeFont(name: PrefsInfo.weather.fontName, size: size/4)
Severity: Major
Found in Aerial/Source/Views/Layers/Weather/ForecastLayer.swift and 6 other locations - About 35 mins to fix
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 175..177
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 186..188
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 197..199
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 285..287
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 296..298
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 415..416

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

        var minX: CGFloat, minY: CGFloat, maxX: CGFloat, maxY: CGFloat, scaleFactor: CGFloat
Severity: Minor
Found in Aerial/Source/Views/PrefPanel/DisplayView.swift and 1 other location - About 35 mins to fix
Aerial/Source/Views/PrefPanel/DisplayView.swift on lines 217..217

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

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

        albumLayer.string = ""
        (albumLayer.font, albumLayer.fontSize) = albumLayer.makeFont(name: PrefsInfo.music.fontName, size: PrefsInfo.music.fontSize)
Severity: Minor
Found in Aerial/Source/Views/Layers/Music/MusicLayer.swift and 2 other locations - About 35 mins to fix
Aerial/Source/Views/Layers/Music/MusicLayer.swift on lines 78..79
Aerial/Source/Views/Layers/Music/MusicLayer.swift on lines 83..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 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

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

        humidity.string = "\(hour.main!.humidity!)%"

        (humidity.font, humidity.fontSize) = humidity.makeFont(name: PrefsInfo.weather.fontName, size: size/4)
Severity: Major
Found in Aerial/Source/Views/Layers/Weather/ForecastLayer.swift and 6 other locations - About 35 mins to fix
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 175..177
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 186..188
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 197..199
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 274..276
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 285..287
Aerial/Source/Views/Layers/Weather/ForecastLayer.swift on lines 415..416

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

Severity
Category
Status
Source
Language