grommet/grommet-ferret

View on GitHub

Showing 151 of 386 total issues

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

  render () {
    const { productName } = this.props;
    const { settings, errors } = this.state;

    let networkErrors;
Severity: Major
Found in src/js/components/settings/IdentityEdit.js - About 2 hrs to fix

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

      render () {
        const { virtualMachine, nav, notifications, role, category } = this.props;
    
        let state;
        if (! notifications.alert && ! notifications.aggregate &&
    Severity: Major
    Found in src/js/components/virtualMachine/VirtualMachineShow.js - About 2 hrs to fix

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

        render () {
          const { virtualMachine, onClose } = this.props;
      
          let name;
          let closeControl;
      Severity: Major
      Found in src/js/components/virtualMachine/VirtualMachineActions.js - About 2 hrs to fix

        File Utilization.js has 274 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
        
        import React, { Component, PropTypes } from 'react';
        import ReactDOM from 'react-dom';
        import { connect } from 'react-redux';
        Severity: Minor
        Found in src/js/components/Utilization.js - About 2 hrs to fix

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

          const DirectorySection = (props) => {
          
            const { productName, role, settings, onOpen } = props;
            const directory = settings.directory || {};
            let contents;
          Severity: Major
          Found in src/js/components/settings/DirectorySection.js - About 2 hrs to fix

            Function createActivity has 62 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function createActivity () {
              // associate alerts and tasks with resources
              let resources = [];
              SCHEMA.filter(category => (
                'alerts' !== category.name && 'tasks' !== category.name &&
            Severity: Major
            Found in server/generator.js - About 2 hrs to fix

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

                render() {
                  const { item, index, onlyActiveStatus, includeResource } = this.props;
              
                  let separator;
                  if (0 === index) {
              Severity: Major
              Found in src/js/components/activity/ActivityListItem.js - About 2 hrs to fix

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

                  render () {
                    let { image, fileName, errors } = this.state;
                    const osType = image.osType || {};
                
                    let osTypeField;
                Severity: Major
                Found in src/js/components/image/ImageForm.js - About 2 hrs to fix

                  Function DirectorySection has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                  const DirectorySection = (props) => {
                  
                    const { productName, role, settings, onOpen } = props;
                    const directory = settings.directory || {};
                    let contents;
                  Severity: Minor
                  Found in src/js/components/settings/DirectorySection.js - About 2 hrs 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 render has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    render () {
                      const { productName } = this.props;
                      const software = this.props.software || {};
                      const hypervisorVersion =
                        (software.hypervisor ? software.hypervisor.version : '--');
                  Severity: Major
                  Found in src/js/components/settings/Software.js - About 2 hrs to fix

                    File SettingsEdit.js has 265 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
                    
                    import React, { Component, PropTypes } from 'react';
                    import { connect } from 'react-redux';
                    import { loadSettings, updateSettings, settingsResponsive,
                    Severity: Minor
                    Found in src/js/components/settings/SettingsEdit.js - About 2 hrs to fix

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

                        render () {
                          const { index, role, uploads } = this.props;
                          const { searchText } = this.state;
                          const result = index.result || {};
                      
                      
                      Severity: Major
                      Found in src/js/components/image/ImageIndex.js - About 2 hrs to fix

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

                          render () {
                            let { size, errors } = this.state;
                        
                            let removeControl;
                            if (this.props.removable) {
                        Severity: Major
                        Found in src/js/components/size/SizeForm.js - About 2 hrs to fix

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

                            render () {
                              const { network, errors } = this.state;
                              let removeControl;
                              if (this.props.onRemove) {
                                removeControl = (
                          Severity: Major
                          Found in src/js/components/virtualMachine/VirtualMachineEditNetwork.js - About 2 hrs to fix

                            Function _onSubmit has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              _onSubmit () {
                                const { directory, phase } = this.props;
                                const { credentials, needCredentials } = this.state;
                                let errors = {...this.state.errors};
                                let noErrors = true;
                            Severity: Major
                            Found in src/js/components/settings/DirectoryEdit.js - About 2 hrs to fix

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

                                render () {
                                  const { index, role } = this.props;
                                  const { filterActive, searchText } = this.state;
                                  const result = index.result || {};
                              
                              
                              Severity: Major
                              Found in src/js/components/virtualMachine/VirtualMachineIndex.js - About 2 hrs to fix

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

                                  render () {
                                    const { index } = this.props;
                                    const filter = index.filter || {};
                                    return (
                                      <Layer align='right' flush={true} closer={false}
                                Severity: Major
                                Found in src/js/components/activity/ActivityFilter.js - About 2 hrs to fix

                                  Function NodesSection has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  const NodesSection = (props) => {
                                  
                                    const { productName, role, settings, onOpen } = props;
                                    const nodes = settings.nodes || [];
                                    let contents;
                                  Severity: Minor
                                  Found in src/js/components/settings/NodesSection.js - About 2 hrs 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 sessionWatcher has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function sessionWatcher () {
                                    const {route, session, status} = store.getState();
                                    if (route && route.location) {
                                  
                                      if (route.masterRoute && (! route.ignoreMasterUntil ||
                                  Severity: Minor
                                  Found in src/js/Session.js - About 2 hrs 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 buildParams has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function buildParams (config, query, filter, sort) {
                                    let result = {
                                      category: config.category,
                                      count: pageSize,
                                      start: 0
                                  Severity: Minor
                                  Found in src/js/actions/index.js - About 2 hrs 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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language