scottohara/loot

View on GitHub

Showing 298 of 298 total issues

Function constructor has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public constructor(
        transactionMockProvider: TransactionMockProvider,
        transactionBatchMockProvider: TransactionBatchMockProvider,
        $qMockProvider: QMockProvider,
    ) {
Severity: Major
Found in src/mocks/transactions/models/transaction.ts - About 2 hrs to fix

    Function checkRowMatches has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function checkRowMatches(
        expectedValues: Transaction | TransactionEdit,
    ): void {
        const {
            transactionDate,
    Severity: Minor
    Found in cypress/support/transactions/index.ts - About 2 hrs to fix

      Method children has 50 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def children
              # Get the child transactions
              transactions =
                  ::TransactionSplit
                  .select(
      Severity: Minor
      Found in app/models/split_transaction.rb - About 2 hrs to fix

        Function commonBehaviour has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function commonBehaviour(
                targetRow: string,
                targetRowAfter: string,
                isSubcategory = false,
                hasChildren = false,
        Severity: Minor
        Found in cypress/e2e/categories/delete.cy.ts - About 1 hr to fix

          Function constructor has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public constructor(
                  $sce: angular.ISCEService,
                  $uibModal: angular.ui.bootstrap.IModalService,
                  ogTableNavigableService: OgTableNavigableService,
                  ogModalErrorService: OgModalErrorService,
          Severity: Minor
          Found in src/transactions/directives/flag.ts - About 1 hr to fix

            Function deleteSecurity has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public deleteSecurity(index: number): void {
                    // Check if the security can be deleted
                    this.securityModel
                        .find(Number(this.securities[index].id))
                        .then((security: Security): void => {
            Severity: Minor
            Found in src/securities/controllers/index.ts - About 1 hr to fix

              Function deletePayee has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public deletePayee(index: number): void {
                      // Check if the payee can be deleted
                      this.payeeModel
                          .find(Number(this.payees[index].id))
                          .then((payee: Payee): void => {
              Severity: Minor
              Found in src/payees/controllers/index.ts - About 1 hr to fix

                Function constructor has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public constructor(numberFilter: angular.IFilterNumber) {
                        const directive: angular.IDirective = {
                            restrict: "A",
                            priority: 1,
                            require: "ngModel",
                Severity: Minor
                Found in src/og-components/og-input-currency/directives/og-input-currency.ts - About 1 hr to fix

                  Function deleteAccount has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public deleteAccount(accountType: string, index: number): void {
                          // Check if the account can be deleted
                          this.accountModel
                              .find(Number(this.accounts[accountType].accounts[index].id))
                              .then((account: Account): void => {
                  Severity: Minor
                  Found in src/accounts/controllers/index.ts - About 1 hr to fix

                    Function updateInvestmentDetails has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public updateInvestmentDetails(): void {
                            const QUANTITY_DECIMAL_PLACES = 4,
                                PRICE_DECIMAL_PLACES = 3,
                                AMOUNT_DECIMAL_PLACES = 2;
                    
                    
                    Severity: Minor
                    Found in src/schedules/controllers/edit.ts - About 1 hr to fix

                      Function updateInvestmentDetails has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public updateInvestmentDetails(): void {
                              const QUANTITY_DECIMAL_PLACES = 4,
                                  PRICE_DECIMAL_PLACES = 3,
                                  AMOUNT_DECIMAL_PLACES = 2;
                      
                      
                      Severity: Minor
                      Found in src/transactions/controllers/edit.ts - About 1 hr to fix

                        Function editSecurity has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public editSecurity(index?: number): void {
                                // Helper function to sort by security current holding and name
                                function byHoldingAndName(a: Security, b: Security): number {
                                    let x: boolean, y: boolean;
                        
                        
                        Severity: Minor
                        Found in src/securities/controllers/index.ts - About 1 hr to fix

                          Function link has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                          link(scope: TransactionStatusScope, iElement: JQuery<Element>): void {
                                              // Set the current status & icon, calculate the next status
                                              function setCurrentStatus(status: TransactionStatus): void {
                                                  scope.currentStatus =
                                                      null === status || "" === status ? "Unreconciled" : status;
                          Severity: Minor
                          Found in src/transactions/directives/status.ts - About 1 hr to fix

                            Function editAccount has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public editAccount(accountType?: string, index?: number): void {
                                    // Helper function to sort by account name
                                    function byName(a: Account, b: Account): number {
                                        return a.name.localeCompare(b.name);
                                    }
                            Severity: Minor
                            Found in src/accounts/controllers/index.ts - About 1 hr to fix

                              Function reconcile has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public reconcile(): void {
                                      if (!this.reconciling) {
                                          // Disable navigation on the table
                                          this.ogTableNavigableService.enabled = false;
                              
                              
                              Severity: Minor
                              Found in src/transactions/controllers/index.ts - About 1 hr to fix

                                Function calculateNextDue has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private calculateNextDue(): void {
                                        const WEEK = 1,
                                            FORTNIGHT = 2,
                                            MONTH = 1,
                                            BIMONTH = 2,
                                Severity: Minor
                                Found in src/schedules/controllers/edit.ts - About 1 hr to fix

                                  Function constructor has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public constructor(
                                          categoryMockProvider: CategoryMockProvider,
                                          categoriesMockProvider: CategoriesMockProvider,
                                          $qMockProvider: QMockProvider,
                                      ) {
                                  Severity: Minor
                                  Found in src/mocks/categories/models/category.ts - About 1 hr to fix

                                    Function constructor has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public constructor(
                                            $scope: angular.IScope,
                                            $transitions: angular.ui.IStateParamsService,
                                            private readonly $uibModal: angular.ui.bootstrap.IModalService,
                                            private readonly $timeout: angular.ITimeoutService,
                                    Severity: Minor
                                    Found in src/categories/controllers/index.ts - About 1 hr to fix

                                      Function constructor has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public constructor(
                                              accountMockProvider: AccountMockProvider,
                                              accountsMockProvider: AccountsMockProvider,
                                              accountsWithBalancesMockProvider: AccountsWithBalancesMockProvider,
                                              $qMockProvider: QMockProvider,
                                      Severity: Minor
                                      Found in src/mocks/accounts/models/account.ts - About 1 hr to fix

                                        Function constructor has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public constructor(
                                                $scope: angular.IScope,
                                                $transitions: angular.ui.IStateParamsService,
                                                private readonly $uibModal: angular.ui.bootstrap.IModalService,
                                                private readonly $timeout: angular.ITimeoutService,
                                        Severity: Minor
                                        Found in src/securities/controllers/index.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language