asseinfo/br_danfe

View on GitHub

Showing 15 of 32 total issues

Method lie has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

        def lie(h, w, x, y, xml, xpath_uf, xpath_ie, options = {})
Severity: Major
Found in lib/br_danfe/danfe_lib/nfe_lib/document.rb - About 1 hr to fix

    Method inumeric has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            def inumeric(h, w, x, y, i18n = '', data = '', options = {})
    Severity: Major
    Found in lib/br_danfe/danfe_lib/nfe_lib/document.rb - About 50 mins to fix

      Method ibox has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              def ibox(h, w, x, y, title = '', info = '', options = {})
      Severity: Major
      Found in lib/br_danfe/danfe_lib/nfe_lib/document.rb - About 50 mins to fix

        Method lcnpj has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                def lcnpj(h, w, x, y, xml, xpath, options = {})
        Severity: Major
        Found in lib/br_danfe/danfe_lib/nfe_lib/document.rb - About 50 mins to fix

          Method lnumeric has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  def lnumeric(h, w, x, y, xml, xpath, options = {})
          Severity: Major
          Found in lib/br_danfe/danfe_lib/nfe_lib/document.rb - About 50 mins to fix

            Method i18n_lbox has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    def i18n_lbox(h, w, x, y, i18n = '', info = '', options = {})
            Severity: Major
            Found in lib/br_danfe/danfe_lib/nfe_lib/document.rb - About 50 mins to fix

              Method lbox has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      def lbox(h, w, x, y, xml, xpath, options = {})
              Severity: Major
              Found in lib/br_danfe/danfe_lib/nfe_lib/document.rb - About 50 mins to fix

                Method ldate has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        def ldate(h, w, x, y, i18n = '', info = '', options = {})
                Severity: Major
                Found in lib/br_danfe/danfe_lib/nfe_lib/document.rb - About 50 mins to fix

                  Method repeated_information has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                        def repeated_information(page, y_position, emitter, footer_info, xml, total_pages, initial_page_of_pdf)
                  Severity: Major
                  Found in lib/br_danfe/danfe_lib/nfe.rb - About 50 mins to fix

                    Method ltime has 7 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            def ltime(h, w, x, y, i18n = '', info = '', options = {})
                    Severity: Major
                    Found in lib/br_danfe/danfe_lib/nfe_lib/document.rb - About 50 mins to fix

                      Method box has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              def box(at, w, h, title = '', info = '', options = {})
                      Severity: Minor
                      Found in lib/br_danfe/danfe_lib/nfe_lib/document.rb - About 45 mins to fix

                        Method numeric has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                def numeric(at, w, h, title = '', info = '', options = {})
                        Severity: Minor
                        Found in lib/br_danfe/danfe_lib/nfe_lib/document.rb - About 45 mins to fix

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

                                  def ibarcode(h, w, x, y, info)
                          Severity: Minor
                          Found in lib/br_danfe/danfe_lib/nfe_lib/document.rb - About 35 mins to fix

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

                                    def ititle(h, w, x, y, i18n)
                            Severity: Minor
                            Found in lib/br_danfe/danfe_lib/nfe_lib/document.rb - About 35 mins to fix

                              Method generate has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                    def generate(footer_info)
                                      last_index = @xmls.size - 1
                              
                                      @xmls.each_with_index do |xml, index|
                                        break unless BrDanfe::Helper.nfe?(xml)
                              Severity: Minor
                              Found in lib/br_danfe/danfe_lib/nfe.rb - About 35 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

                              Severity
                              Category
                              Status
                              Source
                              Language