gabrielbull/react-desktop

View on GitHub

Showing 257 of 257 total issues

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

  render() {
    const { children, style, selected, push, ...props } = this.props;
    delete props.index;
    let componentStyle = { ...styles.master, ...style };
    let spanStyle = { ...styles.masterSpan };
Severity: Minor
Found in src/MasterDetailsView/windows/Master/index.js - About 1 hr to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        if (this.context.titlebarChild) {
          inputStyle = { ...inputStyle, ...styles.titleBarTextField };
          if (this.state.isFocused && focusRing) {
            inputStyle = { ...inputStyle, ...styles.titleBarTextFieldFocus };
          }
    Severity: Major
    Found in src/TextInput/macOs/index.js and 1 other location - About 1 hr to fix
    src/TextArea/macOs/index.js on lines 237..242

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 70.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

      onSiblingChange = () => {
        if (this.refs.element.checked !== this.state.checked) {
          this.setState({ checked: this.refs.element.checked });
        }
      };
    Severity: Major
    Found in src/Radio/macOs/index.js and 1 other location - About 1 hr to fix
    src/Radio/windows/index.js on lines 53..57

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 70.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

      onSiblingChange = () => {
        if (this.refs.element.checked !== this.state.checked) {
          this.setState({ checked: this.refs.element.checked });
        }
      };
    Severity: Major
    Found in src/Radio/windows/index.js and 1 other location - About 1 hr to fix
    src/Radio/macOs/index.js on lines 50..54

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 70.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        if (this.context.titlebarChild) {
          inputStyle = { ...inputStyle, ...styles.titleBarTextArea };
          if (this.state.isFocused && focusRing) {
            inputStyle = { ...inputStyle, ...styles.titleBarTextAreaFocus };
          }
    Severity: Major
    Found in src/TextArea/macOs/index.js and 1 other location - About 1 hr to fix
    src/TextInput/macOs/index.js on lines 238..243

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 70.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

      render() {
        const {
          children,
          style,
          controls,
    Severity: Minor
    Found in src/TitleBar/windows/index.js - About 1 hr to fix

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

        renderItem(item, path = '', subtitle = false) {
          let finalChildren = [];
          for (let prop in item) {
            if (item.hasOwnProperty(prop)) {
              if (typeof item[prop] === 'object') {
      Severity: Minor
      Found in playground/ui/examples/examples.js - About 1 hr to fix

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

          renderIcon(name) {
            const fill = this.props.theme === 'dark' ? '#ffffff' : '#000000';
            switch(name) {
            case 'Item 1':
              return (
        Severity: Minor
        Found in examples/windows/components/navPane.js - About 1 hr to fix

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                  <Minimize
                    onClick={this.props.onMinimizeClick}
                    showIcon={this.state.isOver}
                    disabled={this.props.disableMinimize}
                    isWindowFocused={this.props.isWindowFocused}
          Severity: Major
          Found in src/TitleBar/macOs/Controls/index.js and 1 other location - About 1 hr to fix
          src/TitleBar/macOs/Controls/index.js on lines 49..54

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 67.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                  <Close
                    onClick={this.props.onCloseClick}
                    showIcon={this.state.isOver}
                    disabled={this.props.disableClose}
                    isWindowFocused={this.props.isWindowFocused}
          Severity: Major
          Found in src/TitleBar/macOs/Controls/index.js and 1 other location - About 1 hr to fix
          src/TitleBar/macOs/Controls/index.js on lines 55..60

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 67.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                  <ListViewSection header={this.renderSectionHeader('My Section 2')}>
                    {this.renderItem('Item 4', 'This is the fourth item.')}
                    {this.renderItem('Item 5', 'This is the fifth item.')}
                    {this.renderItem('Item 6', 'This is the sixth item.')}
                  </ListViewSection>
          Severity: Major
          Found in examples/macOs/components/listView.js and 1 other location - About 1 hr to fix
          examples/macOs/components/listView.js on lines 25..29

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 66.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                  <ListViewSection header={this.renderSectionHeader('My Section')}>
                    {this.renderItem('Item 1', 'This is the first item.')}
                    {this.renderItem('Item 2', 'This is the second item.')}
                    {this.renderItem('Item 3', 'This is the third item.')}
                  </ListViewSection>
          Severity: Major
          Found in examples/macOs/components/listView.js and 1 other location - About 1 hr to fix
          examples/macOs/components/listView.js on lines 31..35

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 66.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 4 locations. Consider refactoring.
          Open

            handleChange = event => {
              this.setState({ checked: event.target.checked });
              if (this.props.onChange) {
                this.props.onChange(event);
              }
          Severity: Major
          Found in src/Radio/windows/index.js and 3 other locations - About 1 hr to fix
          src/Checkbox/macOs/index.js on lines 42..47
          src/Checkbox/windows/index.js on lines 36..41
          src/Radio/macOs/index.js on lines 56..61

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 66.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 4 locations. Consider refactoring.
          Open

            handleChange = event => {
              this.setState({ checked: event.target.checked });
              if (this.props.onChange) {
                this.props.onChange(event);
              }
          Severity: Major
          Found in src/Checkbox/windows/index.js and 3 other locations - About 1 hr to fix
          src/Checkbox/macOs/index.js on lines 42..47
          src/Radio/macOs/index.js on lines 56..61
          src/Radio/windows/index.js on lines 59..64

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 66.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 4 locations. Consider refactoring.
          Open

            onChange = event => {
              this.setState({ checked: event.target.checked });
              if (this.props.onChange) {
                this.props.onChange(event);
              }
          Severity: Major
          Found in src/Checkbox/macOs/index.js and 3 other locations - About 1 hr to fix
          src/Checkbox/windows/index.js on lines 36..41
          src/Radio/macOs/index.js on lines 56..61
          src/Radio/windows/index.js on lines 59..64

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 66.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 4 locations. Consider refactoring.
          Open

            handleChange = event => {
              this.setState({ checked: event.target.checked });
              if (this.props.onChange) {
                this.props.onChange(event);
              }
          Severity: Major
          Found in src/Radio/macOs/index.js and 3 other locations - About 1 hr to fix
          src/Checkbox/macOs/index.js on lines 42..47
          src/Checkbox/windows/index.js on lines 36..41
          src/Radio/windows/index.js on lines 59..64

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 66.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            title: {
              WebkitUserSelect: 'none',
              userSelect: 'none',
              cursor: 'default',
              fontFamily:
          Severity: Major
          Found in src/TitleBar/macOs/styles/10.11.js and 1 other location - About 1 hr to fix
          src/NavPane/windows/style/windows10.js on lines 28..41

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 66.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            title: {
              position: 'relative',
              color: '#000000',
              height: '48px',
              display: 'flex',
          Severity: Major
          Found in src/NavPane/windows/style/windows10.js and 1 other location - About 1 hr to fix
          src/TitleBar/macOs/styles/10.11.js on lines 39..53

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 66.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

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

            render() {
              const { children, style, isWindowFocused, ...props } = this.props;
              let componentStyle = { ...styles.nav };
          
              let fillOpacity = '.8';
          Severity: Minor
          Found in src/Toolbar/macOs/Nav/index.js - About 1 hr to fix

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

              render() {
                let error;
                if (this.state.error) {
                  error = <Text color="red" marginBottom="16px">{this.state.error}</Text>;
                }
            Severity: Minor
            Found in examples/macOs/advanced/pinDialog.js - About 1 hr to fix
              Severity
              Category
              Status
              Source
              Language