chartmogul/chartmogul-go

View on GitHub

Showing 11 of 38 total issues

Function TestConnectSubscriptions has 125 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func TestConnectSubscriptions(t *testing.T) {
    if testing.Short() {
        t.Skip("Integration test.")
    }

Severity: Major
Found in integration_tests/connect_subscription_test.go - About 4 hrs to fix

    Function TestCreateInvoice has 95 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func TestCreateInvoice(t *testing.T) {
        if testing.Short() {
            t.Skip("Integration test.")
        }
    
    
    Severity: Major
    Found in integration_tests/create_invoice_test.go - About 2 hrs to fix

      Function TestEmptyDataSource has 94 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func TestEmptyDataSource(t *testing.T) {
          if testing.Short() {
              t.Skip("Integration test.")
          }
      
      
      Severity: Major
      Found in integration_tests/empty_data_source_test.go - About 2 hrs to fix

        Function TestDeleteInvoice has 81 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func TestDeleteInvoice(t *testing.T) {
            if testing.Short() {
                t.Skip("Integration test.")
            }
        
        
        Severity: Major
        Found in integration_tests/delete_invoice_test.go - About 2 hrs to fix

          Function TestRetrieveInvoice has 78 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func TestRetrieveInvoice(t *testing.T) {
              if testing.Short() {
                  t.Skip("Integration test.")
              }
          
          
          Severity: Major
          Found in integration_tests/retrieve_invoice_test.go - About 2 hrs to fix

            Function TestCreatePlanGroup has 63 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func TestCreatePlanGroup(t *testing.T) {
                if testing.Short() {
                    t.Skip("Integration test.")
                }
            
            
            Severity: Minor
            Found in integration_tests/create_plan_group_test.go - About 1 hr to fix

              Function TestFormattingOfSourceInCustomAttributeUpdate has 62 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

              func TestFormattingOfSourceInCustomAttributeUpdate(t *testing.T) {
              
                  expected := map[string]interface{}{
                      "attributes": map[string]interface{}{
                          "custom": map[string]interface{}{
              Severity: Minor
              Found in customers_test.go - About 1 hr to fix

                Function TestConnectSubscriptions has 55 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

                func TestConnectSubscriptions(t *testing.T) {
                    expected := map[string]interface{}{
                        "subscriptions": []interface{}{
                            map[string]interface{}{
                                "data_source_uuid": "ds_uuid1",
                Severity: Minor
                Found in subscriptions_test.go - About 1 hr to fix

                  Function TestImportCustomers has 54 lines of code (exceeds 50 allowed). Consider refactoring.
                  Open

                  func TestImportCustomers(t *testing.T) {
                      if !*cm {
                          t.SkipNow()
                          return
                      }
                  Severity: Minor
                  Found in customers_test.go - About 1 hr to fix

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

                    func (api API) updateImpl(path string, uuid string, input interface{}, output interface{}, method string) error {
                    Severity: Minor
                    Found in generic.go - About 35 mins to fix

                      Method Errors.IsInvoiceAndItsEntitiesAlreadyExist has 5 return statements (exceeds 4 allowed).
                      Open

                      func (e Errors) IsInvoiceAndItsEntitiesAlreadyExist() (is bool) {
                          if e == nil {
                              return
                          }
                          if msg := e[ErrKeyExternalID]; msg != ErrValInvoiceExternalIDExists {
                      Severity: Major
                      Found in chartmogul.go - About 35 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language