EventGhost/EventGhost

View on GitHub

Showing 2,434 of 2,440 total issues

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

class MenuEventsDialog(wx.MiniFrame):

    def __init__(self, parent, plugin):
        wx.MiniFrame.__init__(
            self,
Severity: Major
Found in plugins/RadioSure/__init__.py and 1 other location - About 2 wks to fix
plugins/MediaPlayerClassic/__init__.py on lines 851..1019

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

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 MenuEventsDialog(wx.MiniFrame):

    def __init__(self, parent, plugin):
        wx.MiniFrame.__init__(
            self,
Severity: Major
Found in plugins/MediaPlayerClassic/__init__.py and 1 other location - About 2 wks to fix
plugins/RadioSure/__init__.py on lines 3370..3538

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

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

File __init__.py has 5797 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-
version = "3.13.3"
#
# This file is part of EventGhost.
# Copyright © 2005-2020 EventGhost Project <http://www.eventghost.net/>
Severity: Major
Found in plugins/Webserver/__init__.py - About 2 wks to fix

    File __init__.py has 5422 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # -*- coding: utf-8 -*-
    
    version="0.2.22"
    
    # plugins/RadioSure/__init__.py
    Severity: Major
    Found in plugins/RadioSure/__init__.py - About 2 wks to fix

      File __init__.py has 4895 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # -*- coding: utf-8 -*-
      #
      # This file is a plugin for EventGhost.
      # plugins/SunTracker/__init__.py
      #
      Severity: Major
      Found in plugins/SunTracker/__init__.py - About 2 wks to fix

        File __init__.py has 4500 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        #!/usr/bin/env python
        # -*- coding: UTF-8 -*-
        
        PLUGIN_VERSION                       = "3.0.1"
        SUPPORTED_DVBVIEWER_VERSIONS         = '4.9.x (older versions might work but are untested)'
        Severity: Major
        Found in plugins/DVBViewer/__init__.py - About 1 wk to fix

          File __init__.py has 4015 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          # -*- coding: utf-8 -*-
          #
          # plugins/MediaMonkey/__init__.py
          #
          # Copyright (C)  2009-2011 Pako  <lubos.ruckl@quick.cz>
          Severity: Major
          Found in plugins/MediaMonkey/__init__.py - About 1 wk to fix

            File __init__.py has 3695 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            # -*- coding: utf-8 -*-
            
            version = "0.1.9"
            
            # This file is part of EventGhost.
            Severity: Major
            Found in plugins/E-mail/__init__.py - About 1 wk to fix

              Function run has a Cognitive Complexity of 477 (exceeds 5 allowed). Consider refactoring.
              Open

                  def run(self):
                      try:
                          dummy
                      except NameError:
                          dummy = 0
              Severity: Minor
              Found in plugins/SunTracker/__init__.py - About 1 wk to fix

              Cognitive Complexity

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

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

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

              Further reading

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

                  def Configure(self, ScreamerPath=None, path2 = None):
                      panel = eg.ConfigPanel(self)
                      label1Text = wx.StaticText(panel, -1, self.text.label1)
                      label2Text = wx.StaticText(panel, -1, self.text.label2)
                      filepathCtrl = MyDirBrowseButton(
              Severity: Major
              Found in plugins/ScreamerRadio/__init__.py and 1 other location - About 1 wk to fix
              plugins/Billy/__init__.py on lines 181..300

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

              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

                  def Configure(self, BillyPath=None, path2 = None):
                      panel = eg.ConfigPanel(self)
                      label1Text = wx.StaticText(panel, -1, self.text.label1)
                      label2Text = wx.StaticText(panel, -1, self.text.label2)
                      filepathCtrl = MyDirBrowseButton(
              Severity: Major
              Found in plugins/Billy/__init__.py and 1 other location - About 1 wk to fix
              plugins/ScreamerRadio/__init__.py on lines 231..350

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

              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

              File __init__.py has 3199 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              # -*- coding: utf-8 -*-
              
              version="0.1.19"
              
              # plugins/SchedulGhost/__init__.py
              Severity: Major
              Found in plugins/SchedulGhost/__init__.py - About 1 wk to fix

                Function NextRun has a Cognitive Complexity of 439 (exceeds 5 allowed). Consider refactoring.
                Open

                    def NextRun(self, type, data):
                
                        def FindRunDateTime(runList, cond, cond2):
                            runList.sort()
                            runDateTime = ""
                Severity: Minor
                Found in plugins/SchedulGhost/__init__.py - About 1 wk 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

                Function NextRun has a Cognitive Complexity of 378 (exceeds 5 allowed). Consider refactoring.
                Open

                    def NextRun(self, type, data):
                
                        def FindRunDateTime(runList, cond):
                            runList.sort()
                            runDateTime = ""
                Severity: Minor
                Found in plugins/RadioSure/__init__.py - About 1 wk 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

                Function __init__ has a Cognitive Complexity of 363 (exceeds 5 allowed). Consider refactoring.
                Open

                    def __init__(self, text, plugin):
                        wx.Dialog.__init__(
                            self,
                            None,
                            -1,
                Severity: Minor
                Found in plugins/RadioSure/__init__.py - About 1 wk to fix

                Cognitive Complexity

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

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

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

                Further reading

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

                class EventListCtrl(wx.ListCtrl):
                
                    def __init__(self, parent, id, evtList, ix, plugin):
                        width = 205
                        wx.ListCtrl.__init__(self, parent, id, style=wx.LC_REPORT |
                Severity: Major
                Found in plugins/MediaPlayerClassic/__init__.py and 1 other location - About 1 wk to fix
                plugins/OOo_Impress/__init__.py on lines 405..488

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

                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 EventListCtrl(wx.ListCtrl):
                
                    def __init__(self, parent, id, evtList, ix, action):
                        width = 205
                        wx.ListCtrl.__init__(self, parent, id, style=wx.LC_REPORT |
                Severity: Major
                Found in plugins/OOo_Impress/__init__.py and 1 other location - About 1 wk to fix
                plugins/MediaPlayerClassic/__init__.py on lines 492..575

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

                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

                Function __init__ has a Cognitive Complexity of 351 (exceeds 5 allowed). Consider refactoring.
                Open

                    def __init__(self, text, plugin):
                        wx.Dialog.__init__(
                            self,
                            None,
                            -1,
                Severity: Minor
                Found in plugins/SchedulGhost/__init__.py - About 1 wk 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

                Function JSONRPCNotifications has a Cognitive Complexity of 339 (exceeds 5 allowed). Consider refactoring.
                Open

                    def JSONRPCNotifications(self, stopJSONRPCNotifications):
                            import os
                            import struct
                            from collections import deque
                            import select
                Severity: Minor
                Found in plugins/XBMCRepeat/__init__.py - About 6 days 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

                File __init__.py has 2399 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                # -*- coding: utf-8 -*-
                #
                # plugins/MediaPlayerClassic/__init__.py
                #
                # Copyright (C) 2006 MonsterMagnet
                Severity: Major
                Found in plugins/MediaPlayerClassic/__init__.py - About 6 days to fix
                  Severity
                  Category
                  Status
                  Source
                  Language