ariofrio/oration

View on GitHub

Showing 71 of 71 total issues

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

Severity: Major
Found in templates/azure/py/WorkerRole/virtualenv.py and 1 other location - About 3 mos to fix
templates/azure/java/WorkerRole/virtualenv.py on lines 0..1952

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

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

Severity: Major
Found in templates/azure/java/WorkerRole/virtualenv.py and 1 other location - About 3 mos to fix
templates/azure/py/WorkerRole/virtualenv.py on lines 0..1952

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

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

Severity: Major
Found in templates/azure/java/WorkerRole/app/winazurestorage.py and 1 other location - About 1 mo to fix
templates/azure/py/WorkerRole/app/winazurestorage.py on lines 0..378

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

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

Severity: Major
Found in templates/azure/py/WorkerRole/app/winazurestorage.py and 1 other location - About 1 mo to fix
templates/azure/java/WorkerRole/app/winazurestorage.py on lines 0..378

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

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

Severity: Major
Found in templates/azure/java/WorkerRole/app/main.py and 1 other location - About 1 wk to fix
templates/azure/py/WorkerRole/app/main.py on lines 0..134

Duplicated Code

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

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

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

Tuning

This issue has a mass of 1043.

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

Severity: Major
Found in templates/azure/py/WorkerRole/app/main.py and 1 other location - About 1 wk to fix
templates/azure/java/WorkerRole/app/main.py on lines 0..134

Duplicated Code

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

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

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

Tuning

This issue has a mass of 1043.

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 virtualenv.py has 1566 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/env python
"""Create a "virtual" Python installation
"""

# If you change the version here, change it in setup.py 
Severity: Major
Found in templates/azure/py/WorkerRole/virtualenv.py - About 4 days to fix

    File virtualenv.py has 1566 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    #!/usr/bin/env python
    """Create a "virtual" Python installation
    """
    
    # If you change the version here, change it in setup.py 
    Severity: Major
    Found in templates/azure/java/WorkerRole/virtualenv.py - About 4 days to fix

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

      Severity: Major
      Found in templates/azure/py/WorkerRole/app/azure.py and 1 other location - About 2 days to fix
      templates/azure/java/WorkerRole/app/azure.py on lines 0..33

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

      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

      Severity: Major
      Found in templates/azure/java/WorkerRole/app/azure.py and 1 other location - About 2 days to fix
      templates/azure/py/WorkerRole/app/azure.py on lines 0..33

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

      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 install_python has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring.
      Open

      def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear):
          """Install just the base environment, no distutils patches etc"""
          if sys.executable.startswith(bin_dir):
              print('Please use the *system* python to run this script')
              return
      Severity: Minor
      Found in templates/azure/java/WorkerRole/virtualenv.py - About 1 day 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 install_python has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring.
      Open

      def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear):
          """Install just the base environment, no distutils patches etc"""
          if sys.executable.startswith(bin_dir):
              print('Please use the *system* python to run this script')
              return
      Severity: Minor
      Found in templates/azure/py/WorkerRole/virtualenv.py - About 1 day 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 call_subprocess has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
      Open

      def call_subprocess(cmd, show_stdout=True,
                          filter_stdout=None, cwd=None,
                          raise_on_returncode=True, extra_env=None,
                          remove_from_env=None):
          cmd_parts = []
      Severity: Minor
      Found in templates/azure/py/WorkerRole/virtualenv.py - About 6 hrs 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 call_subprocess has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
      Open

      def call_subprocess(cmd, show_stdout=True,
                          filter_stdout=None, cwd=None,
                          raise_on_returncode=True, extra_env=None,
                          remove_from_env=None):
          cmd_parts = []
      Severity: Minor
      Found in templates/azure/java/WorkerRole/virtualenv.py - About 6 hrs 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 _install_req has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
      Open

      def _install_req(py_executable, unzip=False, distribute=False,
                       search_dirs=None, never_download=False):
      
          if search_dirs is None:
              search_dirs = file_search_dirs()
      Severity: Minor
      Found in templates/azure/java/WorkerRole/virtualenv.py - About 5 hrs 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 _install_req has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
      Open

      def _install_req(py_executable, unzip=False, distribute=False,
                       search_dirs=None, never_download=False):
      
          if search_dirs is None:
              search_dirs = file_search_dirs()
      Severity: Minor
      Found in templates/azure/py/WorkerRole/virtualenv.py - About 5 hrs 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 fixup_pth_and_egg_link has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
      Open

      def fixup_pth_and_egg_link(home_dir, sys_path=None):
          """Makes .pth and .egg-link files use relative paths"""
          home_dir = os.path.normcase(os.path.abspath(home_dir))
          if sys_path is None:
              sys_path = sys.path
      Severity: Minor
      Found in templates/azure/py/WorkerRole/virtualenv.py - About 3 hrs 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 fixup_pth_and_egg_link has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
      Open

      def fixup_pth_and_egg_link(home_dir, sys_path=None):
          """Makes .pth and .egg-link files use relative paths"""
          home_dir = os.path.normcase(os.path.abspath(home_dir))
          if sys_path is None:
              sys_path = sys.path
      Severity: Minor
      Found in templates/azure/java/WorkerRole/virtualenv.py - About 3 hrs 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 winazurestorage.py has 318 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      #!/usr/bin/env python
      # encoding: utf-8
      """
      Python wrapper around Windows Azure storage
      Sriram Krishnan <sriramk@microsoft.com>
      Severity: Minor
      Found in templates/azure/py/WorkerRole/app/winazurestorage.py - About 3 hrs to fix

        File winazurestorage.py has 318 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        #!/usr/bin/env python
        # encoding: utf-8
        """
        Python wrapper around Windows Azure storage
        Sriram Krishnan <sriramk@microsoft.com>
        Severity: Minor
        Found in templates/azure/java/WorkerRole/app/winazurestorage.py - About 3 hrs to fix
          Severity
          Category
          Status
          Source
          Language