phodal/growth

View on GitHub

Showing 225 of 225 total issues

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

    ...Platform.select({
      ios: {
        shadowColor: 'rgba(0,0,0, .2)',
        shadowOffset: { height: 1, width: 0 },
        shadowOpacity: 1,
Severity: Major
Found in src/components/SuperCardView.js and 1 other location - About 1 hr to fix
src/theme/styles.js on lines 13..23

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 60.

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 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  render() {
    if (!this.state.hasShowIntro) {
      return (<AppIntro
        onDoneBtnClick={this.doneBtnHandle}
        onSkipBtnClick={this.onSkipBtnHandle}
Severity: Minor
Found in src/index.js - About 1 hr to fix

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

      render() {
        const { loading, rowData } = this.state;
    
        if (loading) {
          return (<View
    Severity: Minor
    Found in src/containers/discover/free-book-list/FreeBookList.js - About 1 hr to fix

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

        render() {
          return (
            <ScrollView>
              <List containerStyle={{ borderTopWidth: 0 }}>
                <ListItem
      Severity: Minor
      Found in src/containers/practises/Practises.js - About 1 hr to fix

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

          render() {
            const { loading, rowData } = this.state;
        
            if (loading) {
              return (<View
        Severity: Minor
        Found in src/containers/discover/awesomes/AwesomesDetail.js - About 1 hr to fix

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

            render() {
              const { loading, rowData } = this.state;
          
              if (loading) {
                return (<View
          Severity: Minor
          Found in src/containers/discover/awesomes/AwesomeLists.js - About 1 hr to fix

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

                      this.state.withoutHeading ? <View style={AppStyle.titleVerticalCenterColorGrayStyle}>
                        <Text style={{ color: '#999' }}>{this.state.name}</Text>
                      </View> : null
            src/components/discover/thought-works-books/view/DomainDetailPageItem.js on lines 43..45

            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 59.

            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

                    <View style={AppStyle.titleVerticalCenterColorGrayStyle}>
                      <Text style={{ color: '#999' }}>{this.state.name}</Text>
                    </View>
            src/components/discover/recommend-articles/view/RecommendSimpleItem.js on lines 48..50

            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 59.

            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 componentDidMount has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              componentDidMount() {
                if (this.props.type === NET) {
                  Api.get(this.props.url)
                    .then(response => this.setState({
                      visible: false,
            Severity: Minor
            Found in src/components/HtmlView.js - About 1 hr to fix

              Function renderHeader has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                static renderHeader(section, index, isActive) {
                  return (
                    <Animatable.View
                      duration={100}
                      transition="opacity"
              Severity: Minor
              Found in src/components/SuperCardView.js - About 1 hr to fix

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

                  hello: {
                    name: '入门',
                    achievement: '前途光明',
                    basic: [
                      {
                Severity: Major
                Found in src/constants/TODO_LISTS.js and 4 other locations - About 1 hr to fix
                src/constants/TODO_LISTS.js on lines 22..39
                src/constants/TODO_LISTS.js on lines 136..153
                src/constants/TODO_LISTS.js on lines 214..231
                src/constants/TODO_LISTS.js on lines 232..249

                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 58.

                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 5 locations. Consider refactoring.
                Open

                  server: {
                    name: 'DevOps',
                    achievement: '服务万千',
                    basic: [
                      {
                Severity: Major
                Found in src/constants/TODO_LISTS.js and 4 other locations - About 1 hr to fix
                src/constants/TODO_LISTS.js on lines 4..21
                src/constants/TODO_LISTS.js on lines 22..39
                src/constants/TODO_LISTS.js on lines 136..153
                src/constants/TODO_LISTS.js on lines 232..249

                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 58.

                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 5 locations. Consider refactoring.
                Open

                  refactor: {
                    name: '重构',
                    achievement: '魔法师',
                    basic: [
                      {
                Severity: Major
                Found in src/constants/TODO_LISTS.js and 4 other locations - About 1 hr to fix
                src/constants/TODO_LISTS.js on lines 4..21
                src/constants/TODO_LISTS.js on lines 22..39
                src/constants/TODO_LISTS.js on lines 214..231
                src/constants/TODO_LISTS.js on lines 232..249

                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 58.

                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 5 locations. Consider refactoring.
                Open

                  before: {
                    name: '编码前',
                    achievement: '一点通',
                    basic: [
                      {
                Severity: Major
                Found in src/constants/TODO_LISTS.js and 4 other locations - About 1 hr to fix
                src/constants/TODO_LISTS.js on lines 4..21
                src/constants/TODO_LISTS.js on lines 136..153
                src/constants/TODO_LISTS.js on lines 214..231
                src/constants/TODO_LISTS.js on lines 232..249

                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 58.

                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 5 locations. Consider refactoring.
                Open

                  analytics: {
                    name: '分析',
                    achievement: '分析师',
                    basic: [
                      {
                Severity: Major
                Found in src/constants/TODO_LISTS.js and 4 other locations - About 1 hr to fix
                src/constants/TODO_LISTS.js on lines 4..21
                src/constants/TODO_LISTS.js on lines 22..39
                src/constants/TODO_LISTS.js on lines 136..153
                src/constants/TODO_LISTS.js on lines 214..231

                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 58.

                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

                        <ListItem
                          title={'发现Bug'}
                          rightIcon={{ name: 'open-in-new' }}
                          onPress={() => Helper.openLink('https://github.com/phodal/growth/issues')}
                          leftIcon={{ name: 'bug-report' }}
                Severity: Major
                Found in src/containers/user-center/UserCenter.js and 1 other location - About 1 hr to fix
                src/containers/user-center/UserCenter.js on lines 82..87

                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 58.

                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 3 locations. Consider refactoring.
                Open

                export default class EditorWebViewServices {
                  webView: null;
                
                  static getWebView(): null {
                    return this.webView;
                Severity: Major
                Found in src/utils/EditorWebViewServices.js and 2 other locations - About 1 hr to fix
                src/utils/MoregexWebViewServices.js on lines 1..11
                src/utils/SectionPageHelper.js on lines 1..11

                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 58.

                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

                        <ListItem
                          title={'我想要个功能'}
                          rightIcon={{ name: 'open-in-new' }}
                          onPress={() => Helper.openLink('https://jinshuju.net/f/aZ4CAS')}
                          leftIcon={{ name: 'feedback' }}
                Severity: Major
                Found in src/containers/user-center/UserCenter.js and 1 other location - About 1 hr to fix
                src/containers/user-center/UserCenter.js on lines 76..81

                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 58.

                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 3 locations. Consider refactoring.
                Open

                export default class MoregexWebViewServices {
                  webView: null;
                
                  static getWebView(): null {
                    return this.webView;
                Severity: Major
                Found in src/utils/MoregexWebViewServices.js and 2 other locations - About 1 hr to fix
                src/utils/EditorWebViewServices.js on lines 1..11
                src/utils/SectionPageHelper.js on lines 1..11

                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 58.

                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 3 locations. Consider refactoring.
                Open

                export default class SectionPageHelper {
                  section: null;
                
                  static getSection(): null {
                    return this.section;
                Severity: Major
                Found in src/utils/SectionPageHelper.js and 2 other locations - About 1 hr to fix
                src/utils/EditorWebViewServices.js on lines 1..11
                src/utils/MoregexWebViewServices.js on lines 1..11

                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 58.

                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

                Severity
                Category
                Status
                Source
                Language