grommet/grommet-ferret

View on GitHub

Showing 151 of 386 total issues

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

  render () {
    const { productName } = this.props;
    return (
      <Article scrollStep={true} controls={true}>
        <Section full={true}
Severity: Minor
Found in src/js/components/Promo.js - About 1 hr to fix

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

      render () {
        const { support, role } = this.props;
    
        let status, message, details, control;
        if (support.creating) {
    Severity: Minor
    Found in src/js/components/settings/SupportDumpNotification.js - About 1 hr to fix

      Function TextTerm has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function TextTerm (text) {
        this._not = false;
        this._text = text;
      
        // if the string is quoted, require matching at both ends
      Severity: Minor
      Found in server/filter.js - About 1 hr to fix

        Function getAggregate has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function getAggregate (url, queryParams) {
          let items = getItems(queryParams.category) || [];
          items = filteredItems(items, queryParams);
        
          let attributes;
        Severity: Minor
        Found in server/rest.js - About 1 hr to fix

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

            render () {
              const { virtualMachine } = this.state;
          
              let guidance;
              if ('Online' === virtualMachine.state) {
          Severity: Minor
          Found in src/js/components/virtualMachine/VirtualMachineEdit.js - About 1 hr to fix

            Function HypervisorSection has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
            Open

            const HypervisorSection = (props) => {
            
              const { productName, role, settings, onOpen } = props;
              const hypervisor = settings.hypervisor || {};
              let contents;
            Severity: Minor
            Found in src/js/components/settings/HypervisorSection.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 _renderBaseFields has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              _renderBaseFields () {
                const { directory, phase, productName, settings } = this.props;
                const { errors } = this.state;
            
                let directoryErrors;
            Severity: Minor
            Found in src/js/components/settings/DirectoryEdit.js - About 1 hr to fix

              Function sessionWatcher has 39 lines of code (exceeds 25 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 1 hr to fix

                Function _renderFooter has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  _renderFooter () {
                    const series = THRESHOLDS.map(threshold => ({
                      label: threshold.label,
                      colorIndex: threshold.colorIndex
                    }));
                Severity: Minor
                Found in src/js/components/Utilization.js - About 1 hr to fix

                  Function sessionLogin has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function sessionLogin (host, userName, password) {
                    let token;
                    return function (dispatch) {
                      dispatch({ type: SESSION_LOGIN, host: host, userName: userName });
                      configure({ host: host });
                  Severity: Minor
                  Found in src/js/actions/session.js - About 1 hr to fix

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

                      render () {
                        const { responsive, onClose } = this.props;
                        let name, closeControl;
                        if ('single' === responsive) {
                          name = <Heading tag="h3">Settings</Heading>;
                    Severity: Minor
                    Found in src/js/components/settings/SettingsActions.js - About 1 hr to fix

                      Function AttributeTerm has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function AttributeTerm (text) {
                        this._not = false;
                      
                        const parts = text.toLowerCase().split(':');
                        this._name = parts[0];
                      Severity: Minor
                      Found in server/filter.js - About 1 hr to fix

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

                          render () {
                            const { backup, role } = this.props;
                        
                            let status, message, details, control;
                            if (false !== backup.valid) {
                        Severity: Minor
                        Found in src/js/components/settings/BackupNotification.js - About 1 hr to fix

                          Function _renderLayer has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                            _renderLayer () {
                              const { addNetwork, editNetworkIndex, layer, template } = this.state;
                              let result;
                              if (layer) {
                                if ('network' === layer) {
                          Severity: Minor
                          Found in src/js/components/virtualMachine/VirtualMachineAdd.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 watchNotifications has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function watchNotifications (config, preserveUris, dispatch) {
                            const context = config.context;
                            let queryText, filter;
                            if (context.uri || context.category || context.global) {
                              if (context.uri) {
                          Severity: Minor
                          Found in src/js/actions/notifications.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 _renderLayer has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                            _renderLayer () {
                              const { virtualMachine, layer, addNetwork, editNetworkIndex } = this.state;
                              let result;
                              if (layer) {
                                if ('network' === layer) {
                          Severity: Minor
                          Found in src/js/components/virtualMachine/VirtualMachineEdit.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 constructor has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            constructor (props) {
                              super(props);
                              this._onSubmit = this._onSubmit.bind(this);
                              this._onLayerOpen = this._onLayerOpen.bind(this);
                              this._onLayerClose = this._onLayerClose.bind(this);
                          Severity: Minor
                          Found in src/js/components/virtualMachine/VirtualMachineAdd.js - About 1 hr to fix

                            Function _renderRole has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              _renderRole (role) {
                                const { directory, search, searchResponse } = this.props;
                                let groups = [];
                                directory.groups.forEach((group, index) => {
                                  if (group.role === role) {
                            Severity: Minor
                            Found in src/js/components/settings/DirectoryEdit.js - About 1 hr to fix

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

                                render () {
                              
                                  const countField = this._renderCountField();
                                  const nameFields = this._renderNameFields();
                                  const sizeFields = this._renderSizeFields();
                              Severity: Minor
                              Found in src/js/components/virtualMachine/VirtualMachineAdd.js - About 1 hr to fix

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

                                function alphanum (a, b) {
                                  function chunkify(t) {
                                    var tz = [],
                                      x = 0,
                                      y = -1,
                                Severity: Minor
                                Found in server/filter.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language