ronin-rb/ronin-support-web

View on GitHub

Showing 27 of 27 total issues

Class Agent has 40 methods (exceeds 20 allowed). Consider refactoring.
Open

      class Agent

        #
        # Base-class for all {Agent} exceptions.
        #
Severity: Minor
Found in lib/ronin/support/web/agent.rb - About 5 hrs to fix

    File agent.rb has 357 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    require 'ronin/support/network/http'
    
    require 'addressable/uri'
    require 'nokogiri'
    require 'json'
    Severity: Minor
    Found in lib/ronin/support/web/agent.rb - About 4 hrs to fix

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

      module Ronin
        module Support
          module Web
            #
            # XML helper methods.
      Severity: Minor
      Found in lib/ronin/support/web/xml.rb and 1 other location - About 50 mins to fix
      lib/ronin/support/web/html.rb on lines 23..111

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

      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

      module Ronin
        module Support
          module Web
            #
            # HTML helper methods.
      Severity: Minor
      Found in lib/ronin/support/web/html.rb and 1 other location - About 50 mins to fix
      lib/ronin/support/web/xml.rb on lines 23..105

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

      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

      Method get has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

              def get(url, follow_redirects: @follow_redirects,
                           max_redirects:    @max_redirects,
                           **kwargs)
                response = http_get(url,**kwargs)
      
      
      Severity: Minor
      Found in lib/ronin/support/web/agent.rb - About 45 mins 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

      Method ws_connect_and_send has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

                def ws_connect_and_send(data,host,port=80, type: :text, ssl: {}, **kwargs,&block)
      Severity: Minor
      Found in lib/ronin/support/web/websocket/mixin.rb - About 35 mins to fix

        Method wss_connect_and_send has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                  def wss_connect_and_send(data,host,port=443, type: :text, ssl: {}, **kwargs,&block)
        Severity: Minor
        Found in lib/ronin/support/web/websocket/mixin.rb - About 35 mins to fix

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

                    def wss_connect_and_send(data,host,port=443, type: :text, ssl: {}, **kwargs,&block)
                      uri = URI::WSS.build(host: host, port: port)
          
                      WebSocket.connect_and_send(data,uri, type: type, ssl: ssl, **kwargs, &block)
          Severity: Minor
          Found in lib/ronin/support/web/websocket/mixin.rb and 1 other location - About 25 mins to fix
          lib/ronin/support/web/websocket/mixin.rb on lines 447..450

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

          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 ws_connect_and_send(data,host,port=80, type: :text, ssl: {}, **kwargs,&block)
                      uri = URI::WS.build(host: host, port: port)
          
                      WebSocket.connect_and_send(data,uri, type: type, ssl: ssl, **kwargs,&block)
          Severity: Minor
          Found in lib/ronin/support/web/websocket/mixin.rb and 1 other location - About 25 mins to fix
          lib/ronin/support/web/websocket/mixin.rb on lines 609..612

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

          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

          module Ronin
            module Support
              module Web
                module XML
                  #
          Severity: Minor
          Found in lib/ronin/support/web/xml/mixin.rb and 1 other location - About 20 mins to fix
          lib/ronin/support/web/html/mixin.rb on lines 23..109

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

          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 ws_send(data,host,port=80, type: :text, ssl: {}, **kwargs)
                      uri = URI::WS.build(host: host, port: port)
          
                      WebSocket.send(data,uri, type: type, ssl: ssl, **kwargs)
          Severity: Minor
          Found in lib/ronin/support/web/websocket/mixin.rb and 1 other location - About 20 mins to fix
          lib/ronin/support/web/websocket/mixin.rb on lines 646..649

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

          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

          module Ronin
            module Support
              module Web
                module HTML
                  #
          Severity: Minor
          Found in lib/ronin/support/web/html/mixin.rb and 1 other location - About 20 mins to fix
          lib/ronin/support/web/xml/mixin.rb on lines 23..105

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

          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 wss_send(data,host,port=443, type: :text, ssl: {}, **kwargs)
                      uri = URI::WSS.build(host: host, port: port)
          
                      WebSocket.send(data,uri, type: type, ssl: ssl, **kwargs)
          Severity: Minor
          Found in lib/ronin/support/web/websocket/mixin.rb and 1 other location - About 20 mins to fix
          lib/ronin/support/web/websocket/mixin.rb on lines 484..487

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

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

                  def get_html(url,**kwargs)
                    response = get(url,**kwargs)
          
                    unless response.content_type.include?('text/html')
                      raise(ContentTypeError,"response 'Content-Type' was not 'text/html': #{response.content_type.inspect}")
          Severity: Minor
          Found in lib/ronin/support/web/agent.rb and 3 other locations - About 15 mins to fix
          lib/ronin/support/web/agent.rb on lines 1163..1170
          lib/ronin/support/web/agent.rb on lines 1299..1306
          lib/ronin/support/web/agent.rb on lines 1341..1348

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

          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 post_json(url,**kwargs)
                    response = post(url,**kwargs)
          
                    unless response.content_type.include?('application/json')
                      raise(ContentTypeError,"response 'Content-Type' was not 'application/json': #{response.content_type.inspect}")
          Severity: Minor
          Found in lib/ronin/support/web/agent.rb and 1 other location - About 15 mins to fix
          lib/ronin/support/web/agent.rb on lines 1203..1210

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

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

                    def ws_accept(host,port=80, ssl: {}, **kwargs,&block)
                      uri = URI::WS.build(host: host, port: port)
          
                      WebSocket.accept(uri, ssl: ssl, **kwargs,&block)
          Severity: Major
          Found in lib/ronin/support/web/websocket/mixin.rb and 7 other locations - About 15 mins to fix
          lib/ronin/support/web/websocket/mixin.rb on lines 402..405
          lib/ronin/support/web/websocket/mixin.rb on lines 564..567
          lib/ronin/support/web/websocket/mixin.rb on lines 684..687
          lib/ronin/support/web/websocket/mixin.rb on lines 723..726
          lib/ronin/support/web/websocket/mixin.rb on lines 800..803
          lib/ronin/support/web/websocket/mixin.rb on lines 839..842
          lib/ronin/support/web/websocket/mixin.rb on lines 879..882

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

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

                    def ws_server(host,port=80, ssl: {}, **kwargs,&block)
                      uri = URI::WS.build(host: host, port: port)
          
                      WebSocket.server(uri, ssl: ssl, **kwargs,&block)
          Severity: Major
          Found in lib/ronin/support/web/websocket/mixin.rb and 7 other locations - About 15 mins to fix
          lib/ronin/support/web/websocket/mixin.rb on lines 402..405
          lib/ronin/support/web/websocket/mixin.rb on lines 564..567
          lib/ronin/support/web/websocket/mixin.rb on lines 723..726
          lib/ronin/support/web/websocket/mixin.rb on lines 762..765
          lib/ronin/support/web/websocket/mixin.rb on lines 800..803
          lib/ronin/support/web/websocket/mixin.rb on lines 839..842
          lib/ronin/support/web/websocket/mixin.rb on lines 879..882

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

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

                  def post_xml(url,**kwargs)
                    response = post(url,**kwargs)
          
                    unless response.content_type.include?('text/xml')
                      raise(ContentTypeError,"response 'Content-Type' was not 'application/json': #{response.content_type.inspect}")
          Severity: Minor
          Found in lib/ronin/support/web/agent.rb and 3 other locations - About 15 mins to fix
          lib/ronin/support/web/agent.rb on lines 1124..1131
          lib/ronin/support/web/agent.rb on lines 1163..1170
          lib/ronin/support/web/agent.rb on lines 1299..1306

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

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

                    def ws_connect(host,port=80, ssl: {}, **kwargs,&block)
                      uri = URI::WS.build(host: host, port: port)
          
                      WebSocket.connect(uri, ssl: ssl, **kwargs, &block)
          Severity: Major
          Found in lib/ronin/support/web/websocket/mixin.rb and 7 other locations - About 15 mins to fix
          lib/ronin/support/web/websocket/mixin.rb on lines 564..567
          lib/ronin/support/web/websocket/mixin.rb on lines 684..687
          lib/ronin/support/web/websocket/mixin.rb on lines 723..726
          lib/ronin/support/web/websocket/mixin.rb on lines 762..765
          lib/ronin/support/web/websocket/mixin.rb on lines 800..803
          lib/ronin/support/web/websocket/mixin.rb on lines 839..842
          lib/ronin/support/web/websocket/mixin.rb on lines 879..882

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

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

                    def ws_server_loop(host,port=80, ssl: {}, **kwargs,&block)
                      uri = URI::WS.build(host: host, port: port)
          
                      WebSocket.server_loop(uri, ssl: ssl, **kwargs,&block)
          Severity: Major
          Found in lib/ronin/support/web/websocket/mixin.rb and 7 other locations - About 15 mins to fix
          lib/ronin/support/web/websocket/mixin.rb on lines 402..405
          lib/ronin/support/web/websocket/mixin.rb on lines 564..567
          lib/ronin/support/web/websocket/mixin.rb on lines 684..687
          lib/ronin/support/web/websocket/mixin.rb on lines 762..765
          lib/ronin/support/web/websocket/mixin.rb on lines 800..803
          lib/ronin/support/web/websocket/mixin.rb on lines 839..842
          lib/ronin/support/web/websocket/mixin.rb on lines 879..882

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

          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