hackedteam/rcs-db-ext

View on GitHub

Showing 14,269 of 14,269 total issues

File entities.rb has 2127 lines of code (exceeds 250 allowed). Consider refactoring.
Open

RDoc::Markdown::HTML_ENTITIES = {
  "AElig" => [0x000C6],
  "AMP" => [0x00026],
  "Aacute" => [0x000C1],
  "Abreve" => [0x00102],
Severity: Major
Found in Ruby/lib/ruby/2.0.0/rdoc/markdown/entities.rb - About 5 days to fix

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

    class GrepParamsDialog(dialog.Dialog):
        def __init__(self, items):
            self.items = items
            self.newitems = []
            style = win32con.DS_MODALFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT
    Severity: Major
    Found in Python/Lib/site-packages/pythonwin/pywin/framework/sgrepmdi.py and 1 other location - About 5 days to fix
    Python/Lib/site-packages/pythonwin/pywin/framework/mdi_pychecker.py on lines 576..622

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

    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 TheParamsDialog(dialog.Dialog):
        def __init__(self, items):
            self.items = items
            self.newitems = []
            style = win32con.DS_MODALFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT
    Python/Lib/site-packages/pythonwin/pywin/framework/sgrepmdi.py on lines 474..520

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

    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

    Class Markdown has 280 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class RDoc::Markdown
      # :stopdoc:
    
        # This is distinct from setup_parser so that a standalone parser
        # can redefine #initialize and still have access to the proper
    Severity: Major
    Found in Ruby/lib/ruby/2.0.0/rdoc/markdown.rb - About 5 days to fix

      File base.py has 2047 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # engine/base.py
      # Copyright (C) 2005-2011 the SQLAlchemy authors and contributors <see AUTHORS file>
      #
      # This module is part of SQLAlchemy and is released under
      # the MIT License: http://www.opensource.org/licenses/mit-license.php
      Severity: Major
      Found in Python/Lib/site-packages/pypm/external/2/sqlalchemy/engine/base.py - About 5 days to fix

        File tarfile.py has 2008 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        Severity: Major
        Found in Python/Lib/tarfile.py - About 5 days to fix

          Method _HorizontalRule has a Cognitive Complexity of 267 (exceeds 5 allowed). Consider refactoring.
          Open

            def _HorizontalRule
          
              _save = self.pos
              while true # sequence
                _tmp = apply(:_NonindentSpace)
          Severity: Minor
          Found in Ruby/lib/ruby/2.0.0/rdoc/markdown.rb - About 5 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 scintillacon.py has 1984 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          # Generated by h2py from Include\scintilla.h
          
          # Included from BaseTsd.h
          def HandleToUlong(h): return HandleToULong(h)
          
          Severity: Major
          Found in Python/Lib/site-packages/pythonwin/pywin/scintilla/scintillacon.py - About 5 days to fix

            File pydoc.py has 1975 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            #!/usr/bin/env python
            # -*- coding: latin-1 -*-
            """Generate Python documentation in HTML or text for interactive use.
            
            In the Python interpreter, do "from pydoc import help" to provide online
            Severity: Major
            Found in Python/Lib/pydoc.py - About 5 days to fix

              File schema.py has 1947 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              # sqlalchemy/schema.py
              # Copyright (C) 2005-2011 the SQLAlchemy authors and contributors <see AUTHORS file>
              #
              # This module is part of SQLAlchemy and is released under
              # the MIT License: http://www.opensource.org/licenses/mit-license.php
              Severity: Major
              Found in Python/Lib/site-packages/pypm/external/2/sqlalchemy/schema.py - About 5 days to fix

                File doctest.py has 1934 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                # Module doctest.
                # Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org).
                # Major enhancements and refactoring by:
                #     Jim Fulton
                #     Edward Loper
                Severity: Major
                Found in Python/Lib/doctest.py - About 5 days to fix

                  File mapper.py has 1922 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  # orm/mapper.py
                  # Copyright (C) 2005-2011 the SQLAlchemy authors and contributors <see AUTHORS file>
                  #
                  # This module is part of SQLAlchemy and is released under
                  # the MIT License: http://www.opensource.org/licenses/mit-license.php
                  Severity: Major
                  Found in Python/Lib/site-packages/pypm/external/2/sqlalchemy/orm/mapper.py - About 5 days to fix

                    TexinfoParser has 260 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class TexinfoParser:
                    
                        COPYRIGHT_SYMBOL = "&copy;"
                        FN_ID_PATTERN = "(%(id)s)"
                        FN_SOURCE_PATTERN = '<A NAME=footnoteref%(id)s' \
                    Severity: Major
                    Found in Python/Tools/scripts/texi2html.py - About 5 days to fix

                      File pkg_resources.py has 1914 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      """Package resource API
                      --------------------
                      
                      A resource is a logical file contained within a package, or a logical
                      subdirectory thereof.  The package resource API expects resource names
                      Severity: Major
                      Found in Python/Lib/site-packages/pkg_resources.py - About 5 days to fix

                        File mailbox.py has 1842 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        #! /usr/bin/env python
                        
                        """Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes."""
                        
                        # Notes for authors of new mailbox subclasses:
                        Severity: Major
                        Found in Python/Lib/mailbox.py - About 5 days to fix

                          File mkmf.rb has 1826 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          require 'rbconfig'
                          require 'fileutils'
                          require 'shellwords'
                          
                          # :stopdoc:
                          Severity: Major
                          Found in Ruby/lib/ruby/2.0.0/mkmf.rb - About 4 days to fix

                            File pickletools.py has 1760 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            '''"Executable documentation" for the pickle module.
                            
                            Extensive comments about the pickle protocols and pickle-machine opcodes
                            can be found here.  Some functions meant for external use:
                            
                            Severity: Major
                            Found in Python/Lib/pickletools.py - About 4 days to fix

                              Function _save_obj has a Cognitive Complexity of 224 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def _save_obj(self, states, uowtransaction, single=False):
                                      """Issue ``INSERT`` and/or ``UPDATE`` statements for a list 
                                      of objects.
                              
                                      This is called within the context of a UOWTransaction during a
                              Severity: Minor
                              Found in Python/Lib/site-packages/pypm/external/2/sqlalchemy/orm/mapper.py - About 4 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 win32cryptcon.py has 1659 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              # Generated by h2py from WinCrypt.h
                              def GET_ALG_CLASS(x): return (x & (7 << 13))
                              
                              def GET_ALG_TYPE(x): return (x & (15 << 9))
                              
                              Severity: Major
                              Found in Python/Lib/site-packages/win32/lib/win32cryptcon.py - About 4 days to fix

                                Method scan_tokens has a Cognitive Complexity of 217 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def scan_tokens encoder, options
                                      
                                      if check(RE::PHP_START) ||  # starts with <?
                                       (match?(/\s*<\S/) && check(/.{1,1000}#{RE::PHP_START}/om)) || # starts with tag and contains <?
                                       check(/.{0,1000}#{RE::HTML_INDICATOR}/om) ||

                                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

                                Severity
                                Category
                                Status
                                Source
                                Language