phodal/growth

View on GitHub

Showing 225 of 225 total issues

File SKILL_TREE_DATA.js has 1093 lines of code (exceeds 250 allowed). Consider refactoring.
Open

export default [
  {
    id: 1,
    title: 'HTML',
    description: 'Internet主要由从服务器通过HTTP协议向浏览器发送的HTML文档组成。HTML被用来结构化信息——例如标题、段落和列表等等,也可用来在一定程度上描述文档的外观和语义。',
Severity: Major
Found in src/containers/skill-tree/SKILL_TREE_DATA.js - About 2 days to fix

    Function getHtml has 501 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      static getHtml(html) {
        if (html) {
          return (`
          <!DOCTYPE html>
          <html lang="en">
    Severity: Major
    Found in src/utils/HtmlHelper.js - About 2 days to fix

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

            <View style={{ height: 420 }}>
              <View style={AppStyle.discoverTitle}>
                <Text style={AppStyle.discoverTextColor}>在线资源</Text>
              </View>
              <View style={AppStyle.discoverFirstGrid}>
      Severity: Major
      Found in src/containers/discover/Discover.js and 1 other location - About 2 days to fix
      src/containers/discover/Discover.js on lines 35..51

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

      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={{ height: 420 }}>
              <View style={AppStyle.discoverTitle}>
                <Text style={AppStyle.discoverTextColor}>本地资源</Text>
              </View>
              <View style={AppStyle.discoverFirstGrid}>
      Severity: Major
      Found in src/containers/discover/Discover.js and 1 other location - About 2 days to fix
      src/containers/discover/Discover.js on lines 18..34

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

      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

        render() {
          const { loading, rowData } = this.state;
      
          if (loading) {
            return (<View
      Severity: Major
      Found in src/containers/discover/awesomes/AwesomeLists.js and 1 other location - About 1 day to fix
      src/containers/discover/awesomes/AwesomesDetail.js on lines 55..88

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

      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

        render() {
          const { loading, rowData } = this.state;
      
          if (loading) {
            return (<View
      Severity: Major
      Found in src/containers/discover/awesomes/AwesomesDetail.js and 1 other location - About 1 day to fix
      src/containers/discover/awesomes/AwesomeLists.js on lines 61..94

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

      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

      File index.js has 526 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* eslint-disable react/prefer-stateless-function */
      import React from 'react';
      import { View, TouchableOpacity } from 'react-native';
      import { Actions, Scene } from 'react-native-router-flux';
      import { Icon } from 'react-native-elements';
      Severity: Major
      Found in src/navigation/index.js - About 1 day to fix

        File HtmlHelper.js has 506 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        class HtmlHelper {
          static getHtml(html) {
            if (html) {
              return (`
              <!DOCTYPE html>
        Severity: Major
        Found in src/utils/HtmlHelper.js - About 1 day to fix

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

            componentDidMount() {
              AsyncStorageHelper.get('discover.awesomes', (result) => {
                if (result) {
                  this.setState({
                    loading: false,
          Severity: Major
          Found in src/containers/discover/awesomes/AwesomeLists.js and 1 other location - About 7 hrs to fix
          src/containers/discover/free-book-list/FreeBookList.js on lines 20..42

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

          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

            componentDidMount() {
              AsyncStorageHelper.get('discover.freebook', (result) => {
                if (result) {
                  this.setState({
                    loading: false,
          Severity: Major
          Found in src/containers/discover/free-book-list/FreeBookList.js and 1 other location - About 7 hrs to fix
          src/containers/discover/awesomes/AwesomeLists.js on lines 21..43

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

          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

              <List containerStyle={{ borderTopWidth: 0 }}>
                {CONTRIBUTORS.latest.contributors.map(contributor =>
                  <ListItem
                    key={contributor.nickname}
                    title={contributor.nickname}
          Severity: Major
          Found in src/containers/user-center/about-us/AboutUs.js and 1 other location - About 7 hrs to fix
          src/containers/user-center/about-us/AboutUs.js on lines 54..70

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

          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

              <List containerStyle={{ borderTopWidth: 0 }}>
                {CONTRIBUTORS.old.contributors.map(contributor =>
                  <ListItem
                    key={contributor.nickname}
                    title={contributor.nickname}
          Severity: Major
          Found in src/containers/user-center/about-us/AboutUs.js and 1 other location - About 7 hrs to fix
          src/containers/user-center/about-us/AboutUs.js on lines 35..51

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

          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 (skillData.books) {
                skillBookList = (<View>
                  <Text style={{ paddingTop: 15, paddingLeft: 15, fontSize: AppFonts.h4.size }}>推荐书籍</Text>
                  <List containerStyle={{ marginBottom: 20 }}>
                    {
          Severity: Major
          Found in src/containers/skill-tree/SkillDetailView.js and 1 other location - About 6 hrs to fix
          src/containers/skill-tree/SkillDetailView.js on lines 36..51

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

          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 (skillData.links) {
                skillLinkList = (<View>
                  <Text style={{ paddingTop: 15, paddingLeft: 15, fontSize: AppFonts.h4.size }}>扩展资料</Text>
                  <List containerStyle={{ borderTopWidth: 0 }}>
                    {
          Severity: Major
          Found in src/containers/skill-tree/SkillDetailView.js and 1 other location - About 6 hrs to fix
          src/containers/skill-tree/SkillDetailView.js on lines 54..69

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

          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

            render() {
              return (<ScrollView style={AppStyle.detailBasisStyle}>
                <Dialog show={this.state.loading} content={this.props.dialogContent} />
                {
                  !this.state.loading
          Severity: Major
          Found in src/containers/discover/toolbox-list/ToolBoxList.js and 1 other location - About 6 hrs to fix
          src/containers/discover/roadmap-list/RoadmapList.js on lines 49..66

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

          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

            render() {
              return (
                <ScrollView style={AppStyle.detailBasisStyle} >
                  <Dialog show={this.state.loading} content={this.props.dialogContent} />
                  {
          Severity: Major
          Found in src/containers/discover/roadmap-list/RoadmapList.js and 1 other location - About 6 hrs to fix
          src/containers/discover/toolbox-list/ToolBoxList.js on lines 48..63

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

          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

            backend: {
              title: '后台',
              intros: [
                {
                  info: { slug: 'backend', type: 'desc' },
          Severity: Major
          Found in src/constants/sections/section-1.js and 1 other location - About 6 hrs to fix
          __tests__/containers/home/sectionGrowthTab.test.js on lines 13..46

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

          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

            const sectionInfo = {
              title: '后台',
              intros: [
                {
                  info: { slug: 'backend', type: 'desc' },
          Severity: Major
          Found in __tests__/containers/home/sectionGrowthTab.test.js and 1 other location - About 6 hrs to fix
          src/constants/sections/section-1.js on lines 51..84

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

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

            render() {
              const bsdProjects = [{
                name: 'React Native',
                link: 'https://github.com/facebook/react-native',
              }];
          Severity: Major
          Found in src/containers/user-center/CopyrightView.js - About 6 hrs to fix

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

              render() {
                return (
                  <ScrollView style={AppStyle.detailBasisStyle}>
                    <Dialog show={this.state.visible} content={this.props.dialogContent} />
                    <List containerStyle={{ borderTopWidth: 0, marginTop: 0 }}>
            Severity: Major
            Found in src/containers/discover/chapter-list/ChapterList.js and 1 other location - About 5 hrs to fix
            src/containers/discover/article-list/ArticleList.js on lines 47..59

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

            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