ccarruitero/sunat_books

View on GitHub

Showing 14 of 14 total issues

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

      def draw_table_header(tickets, counts, total_sums, data, date)
Severity: Minor
Found in lib/sunat_books/pdf/simplified_diary.rb - About 35 mins to fix

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

          def initialize(ruc, tickets, month, year, options = {})
    Severity: Minor
    Found in lib/sunat_books/ple/base.rb - About 35 mins to fix

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

            def initialize(ruc, tickets, month, year, options = {})
      Severity: Minor
      Found in lib/sunat_books/ple/buys.rb - About 35 mins to fix

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

          def sales_entry(tickets, counts, total_sums, data, period_date)
        Severity: Minor
        Found in lib/sunat_books/pdf/diary_entries.rb - About 35 mins to fix

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

                def entries_data(tickets, counts, total_sums, data, period_date)
          Severity: Minor
          Found in lib/sunat_books/pdf/simplified_diary.rb - About 35 mins to fix

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

                  def ple_book_name(uid, ruc, month, year, *args)
            Severity: Minor
            Found in lib/sunat_books/ple/utils.rb - About 35 mins to fix

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

                    def initialize(ruc, tickets, month, year, options = {})
              Severity: Minor
              Found in lib/sunat_books/ple/sales.rb - About 35 mins to fix

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

                      def table_hash(field, ticket, tbody, widths, aligns)
                Severity: Minor
                Found in lib/sunat_books/pdf/base.rb - About 35 mins to fix

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

                    def row_data(data, widths, aligns, fields, operation)
                  Severity: Minor
                  Found in lib/sunat_books/pdf/pages_utils.rb - About 35 mins to fix

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

                      def buys_entry(tickets, counts, total_sums, data, period_date)
                    Severity: Minor
                    Found in lib/sunat_books/pdf/diary_entries.rb - About 35 mins to fix

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

                            ticket_data = []
                            counts.each_with_index do |count, i|
                              value = mother_count?(count, ticket) ? get_value(ticket, count) : 0
                              increase_value(ticket_data, total_sums, i, value)
                            end
                      Severity: Minor
                      Found in lib/sunat_books/pdf/diary_entries.rb and 1 other location - About 35 mins to fix
                      lib/sunat_books/pdf/diary_entries.rb on lines 52..58

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

                      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

                            ticket_data = []
                            counts.each_with_index do |count, i|
                              value = mother_count?(count, ticket) ? get_value(ticket, count) : 0
                              increase_value(ticket_data, total_sums, i, value)
                            end
                      Severity: Minor
                      Found in lib/sunat_books/pdf/diary_entries.rb and 1 other location - About 35 mins to fix
                      lib/sunat_books/pdf/diary_entries.rb on lines 39..45

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

                      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 buys_entry(tickets, counts, total_sums, data, period_date)
                          buys = tickets.where(operation_type: "compras")
                          title = "COMPRAS DEL PERIODO"
                          return unless buys.count.positive?
                      
                      
                      Severity: Minor
                      Found in lib/sunat_books/pdf/diary_entries.rb and 1 other location - About 20 mins to fix
                      lib/sunat_books/pdf/diary_entries.rb on lines 26..32

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

                      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 sales_entry(tickets, counts, total_sums, data, period_date)
                          sales = tickets.where(operation_type: "ventas")
                          title = "VENTAS DEL PERIODO"
                          return unless sales.count.positive?
                      
                      
                      Severity: Minor
                      Found in lib/sunat_books/pdf/diary_entries.rb and 1 other location - About 20 mins to fix
                      lib/sunat_books/pdf/diary_entries.rb on lines 17..23

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

                      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