SumOfUs/Champaign

View on GitHub

Showing 123 of 270 total issues

File Payment.js has 616 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import $ from 'jquery';
import React, { Component } from 'react';
import { FormattedMessage, FormattedHTMLMessage } from 'react-intl';
import { connect } from 'react-redux';
import braintreeClient from 'braintree-web/client';
Severity: Major
Found in app/javascript/components/Payment/Payment.js - About 1 day to fix

    Function render has 193 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      render() {
        const {
          member,
          hideRecurring,
          onlyRecurring,
    Severity: Major
    Found in app/javascript/components/Payment/Payment.js - About 7 hrs to fix

      Function render has 144 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        render() {
          if (!this.props.paymentMethods.length || this.props.hidden) return null;
      
          return (
            <div className="ExpressDonation">
      Severity: Major
      Found in app/javascript/components/ExpressDonation/ExpressDonation.js - About 5 hrs to fix

        File ExpressDonation.js has 353 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import $ from 'jquery';
        import React, { Component } from 'react';
        import { connect } from 'react-redux';
        import { FormattedMessage } from 'react-intl';
        import ee from '../../shared/pub_sub';
        Severity: Minor
        Found in app/javascript/components/ExpressDonation/ExpressDonation.js - About 4 hrs to fix

          Function render has 101 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            render() {
              if (!this.state.data) {
                return this.renderLoading();
              }
          
          
          Severity: Major
          Found in app/javascript/plugins/call_tool_analytics/CallToolAnalyticsView.js - About 4 hrs to fix

            File action_form.js has 334 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import $ from 'jquery';
            import I18n from 'champaign-i18n';
            import React from 'react';
            import { render } from 'react-dom';
            import _ from 'lodash';
            Severity: Minor
            Found in app/javascript/legacy/member-facing/backbone/action_form.js - About 4 hrs to fix

              Function render has 97 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                render() {
                  return (
                    <div className="email-target">
                      <div className="email-target-form">
                        <form
              Severity: Major
              Found in app/javascript/plugins/email_pension/EmailRepresentativeView.js - About 3 hrs to fix

                Function render has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  render() {
                    const {
                      fundraiser: {
                        formId,
                        fields,
                Severity: Major
                Found in app/javascript/plugins/fundraiser/FundraiserView.js - About 3 hrs to fix

                  ActionForm has 31 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  const ActionForm = Backbone.View.extend({
                    el: 'form.action-form',
                    HIDDEN_FIELDS: [
                      'source',
                      'akid',
                  Severity: Minor
                  Found in app/javascript/legacy/member-facing/backbone/action_form.js - About 3 hrs to fix

                    Function Form has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export default function Form(props: IProps, second?: any) {
                      const dispatch = useDispatch();
                      const values = useSelector((state: IAppState) => state.forms[props.id]);
                      const member = useSelector((state: IAppState) => state.member);
                      const [highlightConsent, setHighlightConsent] = React.useState(false);
                    Severity: Major
                    Found in app/javascript/components/Form/index.tsx - About 3 hrs to fix

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

                      module.exports = function(api) {
                        var validEnv = ['development', 'test', 'production'];
                        var currentEnv = api.env();
                        var isDevelopmentEnv = api.env('development');
                        var isProductionEnv = api.env('production');
                      Severity: Major
                      Found in babel.config.js - About 3 hrs to fix

                        Function render has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          render() {
                            return (
                              <div className="email-target">
                                <div className="email-target-form">
                                  <form onSubmit={this.onSubmit} className="action-form form--big">
                        Severity: Major
                        Found in app/javascript/plugins/email_pension/EmailPensionView.js - About 3 hrs to fix

                          Payment has 27 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          export class Payment extends Component {
                            static title = (<FormattedMessage id="payment" defaultMessage="payment" />);
                          
                            constructor(props) {
                              super(props);
                          Severity: Minor
                          Found in app/javascript/components/Payment/Payment.js - About 3 hrs to fix

                            Function render has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              render() {
                                const { errors } = this.state;
                                return (
                                  <div className="EmailToolView">
                                    <div className="EmailToolView-form">
                            Severity: Major
                            Found in app/javascript/plugins/email_tool/EmailToolView.js - About 3 hrs to fix

                              File action_queue.rb has 288 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              require 'active_support/concern'
                              
                              module ActionQueue
                                module Enqueable
                                  extend ActiveSupport::Concern
                              Severity: Minor
                              Found in app/services/action_queue.rb - About 2 hrs to fix

                                File reducer.js has 286 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                import {
                                  compact,
                                  includes,
                                  isEmpty,
                                  keys,
                                Severity: Minor
                                Found in app/javascript/state/fundraiser/reducer.js - About 2 hrs to fix

                                  Function render has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    render() {
                                      return (
                                        <div className="AmountSelection-container section">
                                          <Thermometer />
                                          <DonationBands
                                  Severity: Major
                                  Found in app/javascript/components/AmountSelection/AmountSelection.js - About 2 hrs to fix

                                    Class LiquidRenderer has 23 methods (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    class LiquidRenderer # rubocop:disable Metrics/ClassLength
                                      include Rails.application.routes.url_helpers
                                    
                                      HIDDEN_FIELDS = %w[source bucket referrer_id rid akid referring_akid].freeze
                                    
                                    
                                    Severity: Minor
                                    Found in app/liquid/liquid_renderer.rb - About 2 hrs to fix

                                      Fundraiser has 23 functions (exceeds 20 allowed). Consider refactoring.
                                      Open

                                      export class Fundraiser extends Plugin<IFundraiserPluginConfig> {
                                        public store: Store<IAppState>;
                                        public customRenderer: (instance: Fundraiser) => any | undefined;
                                      
                                        constructor(options: IPluginOptions<IFundraiserPluginConfig>) {
                                      Severity: Minor
                                      Found in app/javascript/plugins/fundraiser/index.tsx - About 2 hrs to fix

                                        Function render has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          render() {
                                            const errorMessage = this.state.newPensionFundNameError ? (
                                              <FormattedMessage
                                                id="email_tool.form.errors.suggest_fund"
                                                defaultMessage="Name of pension fund can't be blank"
                                        Severity: Major
                                        Found in app/javascript/plugins/email_pension/SuggestFund.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language