igor-starostenko/report_factory-web

View on GitHub

Showing 232 of 232 total issues

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

function EditProjectForm(props) {
  function onSubmit(values, dispatch) {
    props.action(values.name).then(response => {
      if (!response.payload.data) {
        return dispatch(editProjectFailure(response.payload));
Severity: Minor
Found in src/containers/edit_project_form.jsx - About 1 hr to fix

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

    export default function Scenario(props) {
      const {
        projectName,
        scenarioDetails,
        status,
    Severity: Minor
    Found in src/components/scenario.jsx - About 1 hr to fix

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

        getAllProjects(xApiKey) {
          const url = `${this.baseUrl}api/v1/projects`;
          const headers = ApiClient.formatHeaders(xApiKey);
          return fetch(new Request(url, { method: 'GET', headers }));
        }
      Severity: Major
      Found in src/api/projects_client.js and 3 other locations - About 1 hr to fix
      src/api/scenarios_client.js on lines 41..45
      src/api/users_client.js on lines 23..27
      src/api/users_client.js on lines 29..33

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

        authUser(xApiKey) {
          const url = `${this.baseUrl}api/v1/user`;
          const headers = ApiClient.formatHeaders(xApiKey);
          return fetch(new Request(url, { method: 'GET', headers }));
        }
      Severity: Major
      Found in src/api/users_client.js and 3 other locations - About 1 hr to fix
      src/api/projects_client.js on lines 21..25
      src/api/scenarios_client.js on lines 41..45
      src/api/users_client.js on lines 23..27

      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

          case GET_PROJECT_RSPEC_REPORTS_FAILURE: {
            const error = action.payload.errors;
            const { data } = state.rspecReportsList;
            return { ...state, rspecReportsList: { data, error, loading: false } };
          }
      Severity: Major
      Found in src/reducers/project_reports_reducers.js and 1 other location - About 1 hr to fix
      src/reducers/reports_reducers.js on lines 115..119

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

        getScenarios(xApiKey) {
          const url = `${this.baseUrl}api/v1/scenarios`;
          const headers = ApiClient.formatHeaders(xApiKey);
          return fetch(new Request(url, { method: 'GET', headers }));
        }
      Severity: Major
      Found in src/api/scenarios_client.js and 3 other locations - About 1 hr to fix
      src/api/projects_client.js on lines 21..25
      src/api/users_client.js on lines 23..27
      src/api/users_client.js on lines 29..33

      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

          case GET_RSPEC_REPORTS_FAILURE: {
            const error = action.payload.errors;
            const { data } = state.rspecReportsList;
            return { ...state, rspecReportsList: { data, error, loading: false } };
          }
      Severity: Major
      Found in src/reducers/reports_reducers.js and 1 other location - About 1 hr to fix
      src/reducers/project_reports_reducers.js on lines 131..135

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

        getAllUsers(xApiKey) {
          const url = `${this.baseUrl}api/v1/users`;
          const headers = ApiClient.formatHeaders(xApiKey);
          return fetch(new Request(url, { method: 'GET', headers }));
        }
      Severity: Major
      Found in src/api/users_client.js and 3 other locations - About 1 hr to fix
      src/api/projects_client.js on lines 21..25
      src/api/scenarios_client.js on lines 41..45
      src/api/users_client.js on lines 29..33

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

      export const getUser = (userId, xApiKey) => {
        const request = usersClient.showUser(userId, xApiKey);
      
        return {
          type: GET_USER,
      Severity: Major
      Found in src/actions/users_actions.js and 15 other locations - About 1 hr to fix
      src/actions/project_reports_actions.js on lines 21..28
      src/actions/projects_actions.js on lines 17..24
      src/actions/projects_actions.js on lines 26..33
      src/actions/projects_actions.js on lines 49..56
      src/actions/projects_actions.js on lines 60..67
      src/actions/projects_actions.js on lines 88..95
      src/actions/reports_actions.js on lines 19..26
      src/actions/reports_actions.js on lines 28..35
      src/actions/reports_actions.js on lines 42..49
      src/actions/reports_actions.js on lines 51..58
      src/actions/scenarios_actions.js on lines 43..50
      src/actions/users_actions.js on lines 81..88
      src/actions/users_actions.js on lines 95..102
      src/actions/users_actions.js on lines 124..131
      src/actions/users_actions.js on lines 154..161

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

      export const getProjectScenarios = (projectName, xApiKey) => {
        const request = scenariosClient.getAllProjectScenarios(projectName, xApiKey);
      
        return {
          type: GET_PROJECT_SCENARIOS,
      Severity: Major
      Found in src/actions/scenarios_actions.js and 15 other locations - About 1 hr to fix
      src/actions/project_reports_actions.js on lines 21..28
      src/actions/projects_actions.js on lines 17..24
      src/actions/projects_actions.js on lines 26..33
      src/actions/projects_actions.js on lines 49..56
      src/actions/projects_actions.js on lines 60..67
      src/actions/projects_actions.js on lines 88..95
      src/actions/reports_actions.js on lines 19..26
      src/actions/reports_actions.js on lines 28..35
      src/actions/reports_actions.js on lines 42..49
      src/actions/reports_actions.js on lines 51..58
      src/actions/users_actions.js on lines 81..88
      src/actions/users_actions.js on lines 95..102
      src/actions/users_actions.js on lines 113..120
      src/actions/users_actions.js on lines 124..131
      src/actions/users_actions.js on lines 154..161

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

      export const getReports = (xApiKey, options) => {
        const request = reportsClient.getReports(xApiKey, options);
      
        return {
          type: GET_REPORTS,
      Severity: Major
      Found in src/actions/reports_actions.js and 15 other locations - About 1 hr to fix
      src/actions/project_reports_actions.js on lines 21..28
      src/actions/projects_actions.js on lines 17..24
      src/actions/projects_actions.js on lines 26..33
      src/actions/projects_actions.js on lines 49..56
      src/actions/projects_actions.js on lines 60..67
      src/actions/projects_actions.js on lines 88..95
      src/actions/reports_actions.js on lines 19..26
      src/actions/reports_actions.js on lines 28..35
      src/actions/reports_actions.js on lines 51..58
      src/actions/scenarios_actions.js on lines 43..50
      src/actions/users_actions.js on lines 81..88
      src/actions/users_actions.js on lines 95..102
      src/actions/users_actions.js on lines 113..120
      src/actions/users_actions.js on lines 124..131
      src/actions/users_actions.js on lines 154..161

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

      export const createProject = (name, xApiKey) => {
        const request = projectsClient.createProject(name, xApiKey);
      
        return {
          type: EDIT_PROJECT,
      Severity: Major
      Found in src/actions/projects_actions.js and 15 other locations - About 1 hr to fix
      src/actions/project_reports_actions.js on lines 21..28
      src/actions/projects_actions.js on lines 17..24
      src/actions/projects_actions.js on lines 26..33
      src/actions/projects_actions.js on lines 49..56
      src/actions/projects_actions.js on lines 88..95
      src/actions/reports_actions.js on lines 19..26
      src/actions/reports_actions.js on lines 28..35
      src/actions/reports_actions.js on lines 42..49
      src/actions/reports_actions.js on lines 51..58
      src/actions/scenarios_actions.js on lines 43..50
      src/actions/users_actions.js on lines 81..88
      src/actions/users_actions.js on lines 95..102
      src/actions/users_actions.js on lines 113..120
      src/actions/users_actions.js on lines 124..131
      src/actions/users_actions.js on lines 154..161

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

      export const getRspecReport = (reportId, xApiKey) => {
        const request = reportsClient.showRspecReport(reportId, xApiKey);
      
        return {
          type: GET_RSPEC_REPORT,
      Severity: Major
      Found in src/actions/reports_actions.js and 15 other locations - About 1 hr to fix
      src/actions/project_reports_actions.js on lines 21..28
      src/actions/projects_actions.js on lines 17..24
      src/actions/projects_actions.js on lines 26..33
      src/actions/projects_actions.js on lines 49..56
      src/actions/projects_actions.js on lines 60..67
      src/actions/projects_actions.js on lines 88..95
      src/actions/reports_actions.js on lines 19..26
      src/actions/reports_actions.js on lines 28..35
      src/actions/reports_actions.js on lines 42..49
      src/actions/scenarios_actions.js on lines 43..50
      src/actions/users_actions.js on lines 81..88
      src/actions/users_actions.js on lines 95..102
      src/actions/users_actions.js on lines 113..120
      src/actions/users_actions.js on lines 124..131
      src/actions/users_actions.js on lines 154..161

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

      export const queryUserReports = (xApiKey, filters) => {
        const request = usersClient.queryUserReports(xApiKey, filters);
      
        return {
          type: USER_REPORTS,
      Severity: Major
      Found in src/actions/users_actions.js and 15 other locations - About 1 hr to fix
      src/actions/project_reports_actions.js on lines 21..28
      src/actions/projects_actions.js on lines 17..24
      src/actions/projects_actions.js on lines 26..33
      src/actions/projects_actions.js on lines 49..56
      src/actions/projects_actions.js on lines 60..67
      src/actions/projects_actions.js on lines 88..95
      src/actions/reports_actions.js on lines 19..26
      src/actions/reports_actions.js on lines 28..35
      src/actions/reports_actions.js on lines 42..49
      src/actions/reports_actions.js on lines 51..58
      src/actions/scenarios_actions.js on lines 43..50
      src/actions/users_actions.js on lines 95..102
      src/actions/users_actions.js on lines 113..120
      src/actions/users_actions.js on lines 124..131
      src/actions/users_actions.js on lines 154..161

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

      export const queryProjects = (xApiKey, filters) => {
        const request = projectsClient.queryProjects(xApiKey, filters);
      
        return {
          type: PROJECTS,
      Severity: Major
      Found in src/actions/projects_actions.js and 15 other locations - About 1 hr to fix
      src/actions/project_reports_actions.js on lines 21..28
      src/actions/projects_actions.js on lines 26..33
      src/actions/projects_actions.js on lines 49..56
      src/actions/projects_actions.js on lines 60..67
      src/actions/projects_actions.js on lines 88..95
      src/actions/reports_actions.js on lines 19..26
      src/actions/reports_actions.js on lines 28..35
      src/actions/reports_actions.js on lines 42..49
      src/actions/reports_actions.js on lines 51..58
      src/actions/scenarios_actions.js on lines 43..50
      src/actions/users_actions.js on lines 81..88
      src/actions/users_actions.js on lines 95..102
      src/actions/users_actions.js on lines 113..120
      src/actions/users_actions.js on lines 124..131
      src/actions/users_actions.js on lines 154..161

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

      export const deleteProject = (name, xApiKey) => {
        const request = projectsClient.deleteProject(name, xApiKey);
      
        return {
          type: EDIT_PROJECT,
      Severity: Major
      Found in src/actions/projects_actions.js and 15 other locations - About 1 hr to fix
      src/actions/project_reports_actions.js on lines 21..28
      src/actions/projects_actions.js on lines 17..24
      src/actions/projects_actions.js on lines 26..33
      src/actions/projects_actions.js on lines 49..56
      src/actions/projects_actions.js on lines 60..67
      src/actions/reports_actions.js on lines 19..26
      src/actions/reports_actions.js on lines 28..35
      src/actions/reports_actions.js on lines 42..49
      src/actions/reports_actions.js on lines 51..58
      src/actions/scenarios_actions.js on lines 43..50
      src/actions/users_actions.js on lines 81..88
      src/actions/users_actions.js on lines 95..102
      src/actions/users_actions.js on lines 113..120
      src/actions/users_actions.js on lines 124..131
      src/actions/users_actions.js on lines 154..161

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

      export const queryProjectRspecReports = (xApiKey, variables) => {
        const request = reportsClient.queryRspecReports(xApiKey, variables);
      
        return {
          type: PROJECT_RSPEC_REPORTS,
      Severity: Major
      Found in src/actions/project_reports_actions.js and 15 other locations - About 1 hr to fix
      src/actions/projects_actions.js on lines 17..24
      src/actions/projects_actions.js on lines 26..33
      src/actions/projects_actions.js on lines 49..56
      src/actions/projects_actions.js on lines 60..67
      src/actions/projects_actions.js on lines 88..95
      src/actions/reports_actions.js on lines 19..26
      src/actions/reports_actions.js on lines 28..35
      src/actions/reports_actions.js on lines 42..49
      src/actions/reports_actions.js on lines 51..58
      src/actions/scenarios_actions.js on lines 43..50
      src/actions/users_actions.js on lines 81..88
      src/actions/users_actions.js on lines 95..102
      src/actions/users_actions.js on lines 113..120
      src/actions/users_actions.js on lines 124..131
      src/actions/users_actions.js on lines 154..161

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

      export const queryRspecReports = (xApiKey, variables) => {
        const request = reportsClient.queryRspecReports(xApiKey, variables);
      
        return {
          type: RSPEC_REPORTS,
      Severity: Major
      Found in src/actions/reports_actions.js and 15 other locations - About 1 hr to fix
      src/actions/project_reports_actions.js on lines 21..28
      src/actions/projects_actions.js on lines 17..24
      src/actions/projects_actions.js on lines 26..33
      src/actions/projects_actions.js on lines 49..56
      src/actions/projects_actions.js on lines 60..67
      src/actions/projects_actions.js on lines 88..95
      src/actions/reports_actions.js on lines 19..26
      src/actions/reports_actions.js on lines 42..49
      src/actions/reports_actions.js on lines 51..58
      src/actions/scenarios_actions.js on lines 43..50
      src/actions/users_actions.js on lines 81..88
      src/actions/users_actions.js on lines 95..102
      src/actions/users_actions.js on lines 113..120
      src/actions/users_actions.js on lines 124..131
      src/actions/users_actions.js on lines 154..161

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

      export const deleteUser = (userId, xApiKey) => {
        const request = usersClient.deleteUser(userId, xApiKey);
      
        return {
          type: EDIT_USER,
      Severity: Major
      Found in src/actions/users_actions.js and 15 other locations - About 1 hr to fix
      src/actions/project_reports_actions.js on lines 21..28
      src/actions/projects_actions.js on lines 17..24
      src/actions/projects_actions.js on lines 26..33
      src/actions/projects_actions.js on lines 49..56
      src/actions/projects_actions.js on lines 60..67
      src/actions/projects_actions.js on lines 88..95
      src/actions/reports_actions.js on lines 19..26
      src/actions/reports_actions.js on lines 28..35
      src/actions/reports_actions.js on lines 42..49
      src/actions/reports_actions.js on lines 51..58
      src/actions/scenarios_actions.js on lines 43..50
      src/actions/users_actions.js on lines 81..88
      src/actions/users_actions.js on lines 95..102
      src/actions/users_actions.js on lines 113..120
      src/actions/users_actions.js on lines 124..131

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

      export const queryReports = (xApiKey, variables) => {
        const request = reportsClient.queryReports(xApiKey, variables);
      
        return {
          type: REPORTS,
      Severity: Major
      Found in src/actions/reports_actions.js and 15 other locations - About 1 hr to fix
      src/actions/project_reports_actions.js on lines 21..28
      src/actions/projects_actions.js on lines 17..24
      src/actions/projects_actions.js on lines 26..33
      src/actions/projects_actions.js on lines 49..56
      src/actions/projects_actions.js on lines 60..67
      src/actions/projects_actions.js on lines 88..95
      src/actions/reports_actions.js on lines 28..35
      src/actions/reports_actions.js on lines 42..49
      src/actions/reports_actions.js on lines 51..58
      src/actions/scenarios_actions.js on lines 43..50
      src/actions/users_actions.js on lines 81..88
      src/actions/users_actions.js on lines 95..102
      src/actions/users_actions.js on lines 113..120
      src/actions/users_actions.js on lines 124..131
      src/actions/users_actions.js on lines 154..161

      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

      Severity
      Category
      Status
      Source
      Language