Showing 173 of 964 total issues

Function SvgIconExample has 257 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function SvgIconExample() {
    return (
        <div style={style}>
            <div style={cardStyle}>
                <h3>Icon with no icon or children properties defined</h3>
Severity: Major
Found in examples/create-react-app/src/components/svg-icon.js - About 1 day to fix

    File FixedPeriodsGenerator.spec.js has 544 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import FixedPeriodsGenerator from '../FixedPeriodsGenerator';
    
    describe('FixedPeriodsGenerator class', () => {
        const periodsGenerator = new FixedPeriodsGenerator();
    
    

      File FixedPeriodsGenerator.js has 495 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // generatePeriods config object: { boolean offset, boolean filterFuturePeriods, boolean reversePeriods }
      
      function DailyPeriodType(formatYyyyMmDd, fnFilter) {
          this.generatePeriods = config => {
              let periods = [];
      Severity: Minor
      Found in packages/period-selector-dialog/src/modules/FixedPeriodsGenerator.js - About 7 hrs to fix

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

            render() {
                const filterHeight = this.getFilterText().length > 0 ? 15 : 0;
                const styles = {
                    container: {
                        display: 'flex',
        Severity: Major
        Found in packages/group-editor/src/GroupEditor.component.js - About 6 hrs to fix

          File colorbrewer.js has 416 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          // This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).
          // Please see license at http://colorbrewer.org/export/LICENSE.txt
          export default { YlGn: {
              3: ['#f7fcb9', '#addd8e', '#31a354'],
              4: ['#ffffcc', '#c2e699', '#78c679', '#238443'],
          Severity: Minor
          Found in packages/legend/src/colorbrewer.js - About 6 hrs to fix

            File OrgUnitTree.component.js has 410 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import React from 'react';
            import PropTypes from 'prop-types';
            import LinearProgress from '@material-ui/core/LinearProgress';
            import StopIcon from '@material-ui/icons/Stop';
            
            
            Severity: Minor
            Found in packages/org-unit-tree/src/OrgUnitTree.component.js - About 5 hrs to fix

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

                  render () {
                      const { root, roots, preRoot } = this.state;
              
                      if (!root || !roots || !preRoot) {
                          return null;
              Severity: Major
              Found in examples/create-react-app/src/components/org-unit-tree.js - About 5 hrs to fix

                Function PeriodType has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function PeriodType() {
                    const monthNames = [
                        'January',
                        'February',
                        'March',
                Severity: Major
                Found in packages/period-selector-dialog/src/modules/FixedPeriodsGenerator.js - About 4 hrs to fix

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

                      render() {
                          const fields = [
                              {
                                  name: 'exampleTextField',
                                  value: 'Default Value',
                  Severity: Major
                  Found in examples/create-react-app/src/components/form-builder.js - About 4 hrs to fix

                    GroupEditor has 35 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    export default class GroupEditor extends Component {
                        constructor(props, context) {
                            super(props, context);
                    
                            const i18n = this.context.d2.i18n;
                    Severity: Minor
                    Found in packages/group-editor/src/GroupEditor.component.js - About 4 hrs to fix

                      File GroupEditor.component.js has 351 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import React, { Component } from 'react';
                      import PropTypes from 'prop-types';
                      
                      // Material UI
                      import Paper from 'material-ui/Paper/Paper';
                      Severity: Minor
                      Found in packages/group-editor/src/GroupEditor.component.js - About 4 hrs to fix

                        Function getContent has 110 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            getContent() {
                                const {
                                    classes,
                                    fileType,
                                    onSave,
                        Severity: Major
                        Found in packages/file-menu/src/FileMenu.js - About 4 hrs to fix

                          File FormBuilder.component.spec.js has 348 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import React from 'react';
                          import { shallow } from 'enzyme';
                          import TextField from 'material-ui/TextField/TextField';
                          import FormBuilder from '../FormBuilder.component';
                          import AsyncValidatorRunner from '../AsyncValidatorRunner';
                          Severity: Minor
                          Found in packages/forms/src/__tests__/FormBuilder.component.spec.js - About 4 hrs to fix

                            File Validators.spec.js has 344 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import
                                Validators
                             from '../Validators';
                            
                            const {
                            Severity: Minor
                            Found in packages/forms/src/__tests__/Validators.spec.js - About 4 hrs to fix

                              Function SidebarExample has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export default function SidebarExample(props) {
                                  return (
                                      <div>
                                          <div style={styles.box}>
                                              <div style={styles.header}>
                              Severity: Major
                              Found in examples/create-react-app/src/components/sidebar.js - About 3 hrs to fix

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

                                    render() {
                                        const changeRoot = (currentRoot) => {
                                            this.setState({ currentRoot });
                                        };
                                
                                
                                Severity: Major
                                Found in examples/create-react-app/src/components/org-unit-select.js - About 3 hrs to fix

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

                                      render() {
                                          const actions = [
                                              <FlatButton
                                                  label={this.i18n.getTranslation('cancel')}
                                                  secondary
                                  Severity: Major
                                  Found in packages/legend/src/Legend.component.js - About 3 hrs to fix

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

                                        render() {
                                            if (!this.state.d2) {
                                                console.log('no');
                                                return null;
                                            }
                                    Severity: Major
                                    Found in examples/create-react-app/src/App.js - About 3 hrs to fix

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

                                          render() {
                                              const {
                                                  user,
                                                  displayName,
                                                  userAccesses,
                                      Severity: Major
                                      Found in packages/sharing-dialog/src/Sharing.component.js - About 3 hrs to fix

                                        Function createFormValidator has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export default function createFormValidator(fieldConfigs = [], scheduler) {
                                            const validatorQueue = new Rx.Subject();
                                            const statusSubject = new Rx.ReplaySubject(1);
                                            const initialStatuses = fieldConfigs
                                                .filter(fieldConfig => Array.isArray(fieldConfig.validators) && fieldConfig.validators.length > 0)
                                        Severity: Major
                                        Found in packages/forms/src/FormValidator.js - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language