NullVoxPopuli/aeonvera-ui

View on GitHub

Showing 28 of 319 total issues

Function exports has 151 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function(environment) {
  let ENV = {
    modulePrefix: 'aeonvera',
    podModulePrefix: 'aeonvera/pods',
    i18n: {
Severity: Major
Found in config/environment.js - About 6 hrs to fix

    Function _drawGraph has 116 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      _drawGraph() {
        const explanationId = 'chart-event-sunburst-explanation';
        const chartId = 'chart-event-sunburst';
    
        const width = Ember.$(`#${chartId}`).parent().parent().width();
    Severity: Major
    Found in app/pods/components/charts/event/sunburst-purchases/component.js - About 4 hrs to fix

      File router.js has 269 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import EmberRouter from '@ember/routing/router';
      import config from './config/environment';
      import RouterScroll from 'ember-router-scroll';
      
      const Router = EmberRouter.extend(RouterScroll, {
      Severity: Minor
      Found in app/router.js - About 2 hrs to fix

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

        module.exports = function(defaults) {
          var fingerprintPrepend = '';
          console.log(env);
          switch(env){
            case 'staging':
        Severity: Minor
        Found in ember-cli-build.js - About 2 hrs to fix

          Function get has 49 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                get() {
                  const model = this.get('model');
          
                  const startTime = this.get('startTime');
                  const endTime = this.get('endTime');
          Severity: Minor
          Found in app/pods/components/event/revenue-list/component.js - About 1 hr to fix

            Function get has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                  get() {
                    const model = this.get('model');
            
                    const startTime = this.get('startTime');
                    const endTime = this.get('endTime');
            Severity: Minor
            Found in app/pods/components/event/revenue-list/component.js - About 1 hr 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

            Function _drawGraph has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
            Open

              _drawGraph() {
                const explanationId = 'chart-event-sunburst-explanation';
                const chartId = 'chart-event-sunburst';
            
                const width = Ember.$(`#${chartId}`).parent().parent().width();
            Severity: Minor
            Found in app/pods/components/charts/event/sunburst-purchases/component.js - About 1 hr 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

            Function calculateForSubTotal has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              calculateForSubTotal(subTotal: any, absorbFees: boolean = false, allowNegative: boolean = false) {
                let value = parseFloat(subTotal);
            
                if (isNaN(value)) {
                  value = 0;
            Severity: Minor
            Found in app/services/price-calculator.ts - About 1 hr to fix

              Function model has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                model(params, transition) {
                  const { queryParams } = transition;
                  let token = queryParams.token;
                  let order = null;
              
              
              Severity: Minor
              Found in app/pods/register/community-registration/register/index/route.js - About 1 hr to fix

                Function exports has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                module.exports = function(deployTarget) {
                  var bucketSuffix = deployTarget === 'development' ? 'dev' : deployTarget;
                
                  var ENV = {
                    build: {},
                Severity: Minor
                Found in config/deploy.js - About 1 hr to fix

                  Function initialize has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    initialize: function() {
                      if (alreadyRun) {
                        return;
                      }
                      alreadyRun = true;
                  Severity: Minor
                  Found in app/initializers/model-extensions.js - About 1 hr to fix

                    Function allergyText has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                    Open

                      allergyText: Ember.computed('housingRequest', function() {
                        const noPreference = this.get('noPreference');
                        const pets = this.get('allergicToPets');
                        const smoke = this.get('allergicToSmoke');
                        const other = this.get('otherAllergies');

                    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

                    Function _fillData has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      _fillData() {
                        const model = this.get('model');
                        const incomes = model.get('incomes');
                        const registrationTimes = model.get('registrationTimes');
                        const incomeTimes = model.get('incomeTimes');

                      Function submitInformation has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          submitInformation() {
                            const complete = this.get('formComplete');
                      
                            if (!complete) return;
                      
                      

                        Function messageFromError has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                        export function messageFromError(error, msgTemplate) {
                          msgTemplate = msgTemplate || defaultTemplate;
                        
                          if (typeof error === 'string') return error;
                        
                        
                        Severity: Minor
                        Found in app/helpers/message-from-error.js - About 55 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

                        Function orderQuery has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          orderQuery(hostId, hostType, pastDays, showPaid, selectedLineItem, nameContains) {
                        Severity: Minor
                        Found in app/pods/components/order/order-report/component.js - About 45 mins to fix

                          Function orderQuery has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                            orderQuery(hostId, hostType, pastDays, showPaid, selectedLineItem, nameContains) {
                              const query = { host_id_eq: hostId, host_type_eq: hostType };
                          
                              if (isPresent(pastDays)) {
                                const m = moment(new Date());
                          Severity: Minor
                          Found in app/pods/components/order/order-report/component.js - 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

                          Function paymentStatus has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                            paymentStatus: function() {
                              const owed = this.get('amountOwed');
                              const paid = this.get('amountPaid');
                              const doesOwe = owed > 0;
                              const hasPaid = paid > 0;
                          Severity: Minor
                          Found in app/mixins/models/payment-status.js - 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

                          Function didSubmitHousing has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                          Open

                              didSubmitHousing() {
                                const option = parseInt(this.get('selectedHousingOption'));
                                const housingProvision = this.get('housingProvision');
                                const housingRequest = this.get('housingRequest');
                          
                          
                          Severity: Minor
                          Found in app/pods/register/event-registration/show/edit/housing/controller.js - 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

                          Avoid too many return statements within this function.
                          Open

                            return msgTemplate(attribute, attributeDetail);
                          Severity: Major
                          Found in app/helpers/message-from-error.js - About 30 mins to fix
                            Severity
                            Category
                            Status
                            Source
                            Language