mongoclient/mongoclient

View on GitHub
client/imports/ui/querying/querying.js

Summary

Maintainability
F
6 days
Test Coverage

File querying.js has 708 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Meteor } from 'meteor/meteor';
import { Enums, Notification, ExtendedJSON, UIComponents, SessionManager } from '/client/imports/modules';
import { Connection, QueryRender, QueryingOptions } from '/client/imports/ui';
import { Communicator } from '/client/imports/facades';
import { _ } from 'meteor/underscore';
Severity: Major
Found in client/imports/ui/querying/querying.js - About 1 day to fix

    Function initOptions has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      initOptions(optionEnum, showRunOnAdmin, ...excludedOptions) {
        switch (optionEnum) {
          case Enums.ADD_USER_OPTIONS:
            initOptions.call(this, $('#cmbAddUserOptions'), Enums.ADD_USER_OPTIONS, showRunOnAdmin, ...excludedOptions);
            break;
    Severity: Major
    Found in client/imports/ui/querying/querying.js - About 2 hrs to fix

      Function getFindModifyFinalObject has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

      const getFindModifyFinalObject = function (queryStr) {
        return {
          execute(historyParams) {
            const options = historyParams ? historyParams.options : QueryingOptions.getOptions(Enums.FINDONE_MODIFY_OPTIONS);
            const selector = getFromHistoryOrEditor(historyParams, $('#divSelector'));
      Severity: Minor
      Found in client/imports/ui/querying/querying.js - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function getFindModifyFinalObject has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const getFindModifyFinalObject = function (queryStr) {
        return {
          execute(historyParams) {
            const options = historyParams ? historyParams.options : QueryingOptions.getOptions(Enums.FINDONE_MODIFY_OPTIONS);
            const selector = getFromHistoryOrEditor(historyParams, $('#divSelector'));
      Severity: Minor
      Found in client/imports/ui/querying/querying.js - About 1 hr to fix

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

        const getFindFinalObject = function (queryStr, cmbOptionsId) {
          return {
            execute(historyParams, exportFormat) {
              const cursorOptions = historyParams ? historyParams.cursorOptions : QueryingOptions.getOptions(Enums.CURSOR_OPTIONS);
              const selector = getFromHistoryOrEditor(historyParams, $('#divSelector'));
        Severity: Minor
        Found in client/imports/ui/querying/querying.js - About 1 hr to fix

          Function getFindFinalObject has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
          Open

          const getFindFinalObject = function (queryStr, cmbOptionsId) {
            return {
              execute(historyParams, exportFormat) {
                const cursorOptions = historyParams ? historyParams.cursorOptions : QueryingOptions.getOptions(Enums.CURSOR_OPTIONS);
                const selector = getFromHistoryOrEditor(historyParams, $('#divSelector'));
          Severity: Minor
          Found in client/imports/ui/querying/querying.js - About 1 hr to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function execute has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              execute(historyParams) {
                const options = historyParams ? historyParams.options : QueryingOptions.getOptions(Enums.FINDONE_MODIFY_OPTIONS);
                const selector = getFromHistoryOrEditor(historyParams, $('#divSelector'));
          
                if (!checkErrorField(selector, 'selector')) return;
          Severity: Minor
          Found in client/imports/ui/querying/querying.js - About 1 hr to fix

            Function execute has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                  execute(historyParams) {
                    let xAxis = historyParams ? historyParams.xAxis : $('#inputXAxis').val();
                    if (xAxis) xAxis = parseInt(xAxis, 10);
            
                    let yAxis = historyParams ? historyParams.yAxis : $('#inputYAxis').val();
            Severity: Minor
            Found in client/imports/ui/querying/querying.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

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

                BulkWrite: {
                  execute(historyParams) {
                    const operations = getFromHistoryOrEditor(historyParams, $('#divBulkWrite'), 'bulkWrite');
                    const options = historyParams ? historyParams.options : QueryingOptions.getOptions(Enums.BULK_WRITE_OPTIONS);
            
            
            Severity: Major
            Found in client/imports/ui/querying/querying.js and 1 other location - About 7 hrs to fix
            client/imports/ui/querying/querying.js on lines 685..708

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

            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

                InsertMany: {
                  execute(historyParams) {
                    const docs = getFromHistoryOrEditor(historyParams, $('#divDocs'), 'docs');
                    const options = historyParams ? historyParams.options : QueryingOptions.getOptions(Enums.INSERT_MANY_OPTIONS);
            
            
            Severity: Major
            Found in client/imports/ui/querying/querying.js and 1 other location - About 7 hrs to fix
            client/imports/ui/querying/querying.js on lines 460..483

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

            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

                    proceedQueryExecution({
                      methodName: 'distinct',
                      args: { selector, fieldName, options },
                      isAdmin: false,
                      queryParams: { selector, field: fieldName, options },
            Severity: Major
            Found in client/imports/ui/querying/querying.js and 2 other locations - About 1 hr to fix
            client/imports/ui/querying/querying.js on lines 618..624
            client/imports/ui/querying/querying.js on lines 727..733

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

                    proceedQueryExecution({
                      methodName: 'geoHaystackSearch',
                      args: { xAxis, yAxis, options },
                      isAdmin: false,
                      queryParams: { xAxis, yAxis, options },
            Severity: Major
            Found in client/imports/ui/querying/querying.js and 2 other locations - About 1 hr to fix
            client/imports/ui/querying/querying.js on lines 563..569
            client/imports/ui/querying/querying.js on lines 727..733

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

                    proceedQueryExecution({
                      methodName: 'mapReduce',
                      args: { map, reduce, options },
                      isAdmin: false,
                      queryParams: { map, reduce, options },
            Severity: Major
            Found in client/imports/ui/querying/querying.js and 2 other locations - About 1 hr to fix
            client/imports/ui/querying/querying.js on lines 563..569
            client/imports/ui/querying/querying.js on lines 618..624

            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

                render(query) {
                  proceedRendering({
                    params: query.queryParams,
                    options: query.queryParams.options,
                    optionEnum: Enums.UPDATE_OPTIONS,
            Severity: Major
            Found in client/imports/ui/querying/querying.js and 1 other location - About 1 hr to fix
            client/imports/ui/querying/querying.js on lines 226..233

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 66.

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

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

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

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

            Refactorings

            Further Reading

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

                render(query) {
                  proceedRendering({
                    params: query.queryParams,
                    options: query.queryParams.cursorOptions,
                    optionEnum: Enums.CURSOR_OPTIONS,
            Severity: Major
            Found in client/imports/ui/querying/querying.js and 1 other location - About 1 hr to fix
            client/imports/ui/querying/querying.js on lines 137..144

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 66.

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

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

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

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

            Refactorings

            Further Reading

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

                  case Enums.UPDATE_OPTIONS:
                    initOptions.call(this, $('#cmbUpdateManyOptions'), Enums.UPDATE_OPTIONS, showRunOnAdmin, ...excludedOptions);
                    initOptions.call(this, $('#cmbUpdateOneOptions'), Enums.UPDATE_OPTIONS, showRunOnAdmin, ...excludedOptions);
                    break;
            Severity: Major
            Found in client/imports/ui/querying/querying.js and 1 other location - About 1 hr to fix
            client/imports/ui/querying/querying.js on lines 264..267

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 59.

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

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

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

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

            Refactorings

            Further Reading

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

                  case Enums.CURSOR_OPTIONS:
                    initOptions.call(this, $('#cmbFindCursorOptions'), Enums.CURSOR_OPTIONS, showRunOnAdmin, ...excludedOptions);
                    initOptions.call(this, $('#cmbFindOneCursorOptions'), Enums.CURSOR_OPTIONS, showRunOnAdmin, ...excludedOptions);
                    break;
            Severity: Major
            Found in client/imports/ui/querying/querying.js and 1 other location - About 1 hr to fix
            client/imports/ui/querying/querying.js on lines 283..286

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 59.

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

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

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

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

            Refactorings

            Further Reading

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

                  if (queryStr === 'findOneAndUpdate') {
                    const setObject = getFromHistoryOrEditor(historyParams, $('#divSet'), 'set');
                    if (!checkErrorField(setObject, 'set')) return;
                    args.setObject = setObject;
                    queryParams.set = setObject;
            Severity: Major
            Found in client/imports/ui/querying/querying.js and 1 other location - About 1 hr to fix
            client/imports/ui/querying/querying.js on lines 168..173

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

            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

                  } else if (queryStr === 'findOneAndReplace') {
                    const replacement = getFromHistoryOrEditor(historyParams, $('#divReplacement'), 'replacement');
                    if (!checkErrorField(replacement, 'replacement')) return;
                    args.replacement = replacement;
                    queryParams.replacement = replacement;
            Severity: Major
            Found in client/imports/ui/querying/querying.js and 1 other location - About 1 hr to fix
            client/imports/ui/querying/querying.js on lines 163..173

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

            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

                    proceedQueryExecution({
                      methodName: 'delete',
                      args: { selector },
                      isAdmin: false,
                      queryParams: { selector },
            Severity: Major
            Found in client/imports/ui/querying/querying.js and 3 other locations - About 35 mins to fix
            client/imports/ui/querying/querying.js on lines 585..591
            client/imports/ui/querying/querying.js on lines 672..678
            client/imports/ui/querying/querying.js on lines 788..794

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

            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

                    proceedQueryExecution({
                      methodName: 'dropIndex',
                      args: { indexName },
                      isAdmin: false,
                      queryParams: { name: indexName },
            Severity: Major
            Found in client/imports/ui/querying/querying.js and 3 other locations - About 35 mins to fix
            client/imports/ui/querying/querying.js on lines 542..548
            client/imports/ui/querying/querying.js on lines 672..678
            client/imports/ui/querying/querying.js on lines 788..794

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

            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

                    proceedQueryExecution({
                      methodName: 'indexInformation',
                      args: { isFull: fullVal },
                      isAdmin: false,
                      queryParams: { fullInformation: fullVal },
            Severity: Major
            Found in client/imports/ui/querying/querying.js and 3 other locations - About 35 mins to fix
            client/imports/ui/querying/querying.js on lines 542..548
            client/imports/ui/querying/querying.js on lines 585..591
            client/imports/ui/querying/querying.js on lines 788..794

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

            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

                    proceedQueryExecution({
                      methodName: 'stats',
                      args: { options },
                      isAdmin: false,
                      queryParams: { options },
            Severity: Major
            Found in client/imports/ui/querying/querying.js and 3 other locations - About 35 mins to fix
            client/imports/ui/querying/querying.js on lines 542..548
            client/imports/ui/querying/querying.js on lines 585..591
            client/imports/ui/querying/querying.js on lines 672..678

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

            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

            There are no issues that match your filters.

            Category
            Status