jfilter/frag-den-staat-app

View on GitHub

Showing 110 of 110 total issues

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

export default {
  notYetImplemented:
    'Diese Funktion ist noch nicht verfügbar. Wir arbeiten hart um sie so schnell wie möglich nachzureichen.',
  request: 'Anfrage',
  requests: 'Anfragen',
Severity: Major
Found in src/i18n/de.js and 1 other location - About 2 days to fix
src/i18n/en.js on lines 1..104

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

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

export default {
  notYetImplemented:
    'This feature is not yet implemented. We are working hard to bring it to you as soon as possible.',
  request: 'Request',
  requests: 'Requests',
Severity: Major
Found in src/i18n/en.js and 1 other location - About 2 days to fix
src/i18n/de.js on lines 1..104

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

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

import {
  ActivityIndicator,
  Linking,
  Platform,
  Share,
Severity: Major
Found in src/components/screens/FoiRequestDetails/index.js - About 1 day to fix

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

      render() {
        const {
          navigateToAboutApp,
          navigateToAboutFOIMaster,
          navigateToFAQ,
    Severity: Major
    Found in src/containers/profile/ProfileStartScreen.js - About 7 hrs to fix

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

              <ListItem
                leftIcon={{
                  name: 'star',
                  color: chosenFollowingFilter ? primaryColor : fontColor,
                }}
      Severity: Major
      Found in src/containers/foiRequests/FoiRequestsDrawer.js and 1 other location - About 6 hrs to fix
      src/containers/foiRequests/FoiRequestsDrawer.js on lines 94..129

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

      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
                leftIcon={{
                  name: 'person',
                  color: chosenMyRequestsFilter ? primaryColor : fontColor,
                }}
      Severity: Major
      Found in src/containers/foiRequests/FoiRequestsDrawer.js and 1 other location - About 6 hrs to fix
      src/containers/foiRequests/FoiRequestsDrawer.js on lines 130..165

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

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

        render() {
          const {
            filterChange,
            currentUserId,
            currentUserFilter,
      Severity: Major
      Found in src/containers/foiRequests/FoiRequestsDrawer.js - About 5 hrs to fix

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

        const mapStateToProps = (state, props) => {
          return {
            request: props.navigation.state.params.request,
            messages:
              state.singleFoiRequest.foiRequest != null
        Severity: Major
        Found in src/containers/search/SearchFoiRequestDetailsScreen.js and 1 other location - About 3 hrs to fix
        src/containers/foiRequests/FoiRequestsDetailsScreen.js on lines 30..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 109.

        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 mapStateToProps = (state, props) => {
          return {
            request: props.navigation.state.params.request,
            messages:
              state.singleFoiRequest.foiRequest != null
        Severity: Major
        Found in src/containers/foiRequests/FoiRequestsDetailsScreen.js and 1 other location - About 3 hrs to fix
        src/containers/search/SearchFoiRequestDetailsScreen.js on lines 33..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 109.

        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

        function searchPublicBodies() {
          return (dispatch, getState) => {
            const buildUrl = (function makeBuildUrl() {
              return () =>
                `${ORIGIN}${SEARCH_PUBLIC_BODIES_PATH}?q=${getState().search.query}`;
        Severity: Major
        Found in src/actions/search.js and 1 other location - About 3 hrs to fix
        src/actions/search.js on lines 89..107

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

        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

        function searchFoiRequests() {
          return (dispatch, getState) => {
            const buildUrl = (function makeBuildUrl() {
              return () =>
                `${ORIGIN}${SEARCH_FOI_REQUESTS_PATH}?q=${getState().search.query}`;
        Severity: Major
        Found in src/actions/search.js and 1 other location - About 3 hrs to fix
        src/actions/search.js on lines 109..127

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

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

          render() {
            const { clampedScroll } = this.state;
        
            const headerTranslate = clampedScroll.interpolate({
              inputRange: [0, LIST_HEADER_HEIGHT],
        Severity: Major
        Found in src/containers/foiRequests/FoiRequestsMasterScreen.js - About 3 hrs to fix

          File FoiRequestsMasterScreen.js has 304 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import {
            Alert,
            Animated,
            FlatList,
            Platform,
          Severity: Minor
          Found in src/containers/foiRequests/FoiRequestsMasterScreen.js - About 3 hrs to fix

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

              render() {
                const { title, description, letterEnd, letterStart, anon } = this.state;
                const { publicBody } = this.props.navigation.state.params;
            
                const mainElements = (
            Severity: Major
            Found in src/containers/newRequest/NewRequestWriteScreen.js - About 3 hrs to fix

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

                render() {
                  const { filter, updateFilter } = this.props;
              
                  // special tab for public body, somehwat hacky
                  const publicBodyTab = filter.publicBody && (
              Severity: Major
              Found in src/containers/foiRequests/FoiRequestsListHeader.js - About 3 hrs to fix

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

                const mapDispatchToProps = dispatch => {
                  return {
                    fetchSingleFoiRequest: urls => dispatch(fetchSingleFoiRequest(urls)),
                    navigateToPublicBody: params =>
                      dispatch(
                Severity: Major
                Found in src/containers/search/SearchFoiRequestDetailsScreen.js and 2 other locations - About 3 hrs to fix
                src/containers/foiRequests/FoiRequestsDetailsScreen.js on lines 44..62
                src/containers/foiRequests/FoiRequestsSingleScreen.js on lines 67..85

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

                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

                const mapDispatchToProps = dispatch => {
                  return {
                    fetchSingleFoiRequest: urls => dispatch(fetchSingleFoiRequest(urls)),
                    navigateToPublicBody: params =>
                      dispatch(
                Severity: Major
                Found in src/containers/foiRequests/FoiRequestsDetailsScreen.js and 2 other locations - About 3 hrs to fix
                src/containers/foiRequests/FoiRequestsSingleScreen.js on lines 67..85
                src/containers/search/SearchFoiRequestDetailsScreen.js on lines 47..65

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

                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

                const mapDispatchToProps = dispatch => {
                  return {
                    fetchSingleFoiRequest: id => dispatch(fetchSingleFoiRequest(id)),
                    navigateToPublicBody: params =>
                      dispatch(
                Severity: Major
                Found in src/containers/foiRequests/FoiRequestsSingleScreen.js and 2 other locations - About 3 hrs to fix
                src/containers/foiRequests/FoiRequestsDetailsScreen.js on lines 44..62
                src/containers/search/SearchFoiRequestDetailsScreen.js on lines 47..65

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

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

                function search(state = initialState, action) {
                  switch (action.type) {
                    case 'SEARCH_FOI_REQUESTS_ERROR':
                      return {
                        ...state,
                Severity: Major
                Found in src/reducers/search.js - About 3 hrs to fix

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

                    function share() {
                      Share.share(
                        {
                          ...Platform.select({
                            ios: {
                  Severity: Major
                  Found in src/components/screens/PdfViewer/index.js and 2 other locations - About 3 hrs to fix
                  src/components/foiRequests/WebView/index.js on lines 14..36
                  src/components/screens/FoiRequestDetails/index.js on lines 514..536

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

                  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