appbaseio/mirage

View on GitHub

Showing 357 of 7,143 total issues

Avoid too many return statements within this function.
Open

            return size;
Severity: Major
Found in assets/vendor/jquery.layout/jquery.layout.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return; // handle incorrect mouseleave trigger, like when over a SELECT-list in IE
    Severity: Major
    Found in assets/vendor/jquery.layout/jquery.layout.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                      return true; // DONE - next pane
      Severity: Major
      Found in assets/vendor/jquery.layout/jquery.layout.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return false;
        Severity: Major
        Found in assets/vendor/jquery.layout/jquery-ui.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return true;
          Severity: Major
          Found in assets/vendor/jquery.layout/jquery-ui.js - About 30 mins to fix

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

                ngOnInit() {
                    this.options = JSON.parse(JSON.stringify(this.default_options));
                    try {
                        if(this.appliedQuery['common'][this.fieldName]['query']) {
                            this.inputs.query.value = this.appliedQuery['common'][this.fieldName]['query']
            Severity: Minor
            Found in app/queryBlocks/singlequery/queries/common.query.ts - 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

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

                ngOnChanges() {
                    if(this.selectedField != '') {
                        if(this.selectedField !== this.fieldName) {
                            this.fieldName = this.selectedField;
                            this.getFormat();
            Severity: Minor
            Found in app/queryBlocks/singlequery/queries/geohashcell.query.ts - 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

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

                ngOnChanges() {
                    if (this.selectedField != '') {
                        if (this.selectedField !== this.fieldName) {
                            this.fieldName = this.selectedField;
                            this.getFormat();
            Severity: Minor
            Found in app/queryBlocks/singlequery/queries/simple_query_string.query.ts - 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

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

                ngOnChanges() {
                    if(this.selectedField != '') {
                        if(this.selectedField !== this.fieldName) {
                            this.fieldName = this.selectedField;
                            this.getFormat();
            Severity: Minor
            Found in app/queryBlocks/singlequery/queries/geoboundingbox.query.ts - 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

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

              setProp(propInfo: any) {
                if (propInfo.name === "finalUrl") {
                  this.finalUrl = propInfo.value;
                  this.urlShare.inputs["finalUrl"] = this.finalUrl;
                }
            Severity: Minor
            Found in app/app.component.ts - 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

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

                ngOnChanges() {
                    if(this.selectedField != '') {
                        if(this.selectedField !== this.fieldName) {
                            this.fieldName = this.selectedField;
                            this.getFormat();
            Severity: Minor
            Found in app/queryBlocks/singlequery/queries/common.query.ts - 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

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

                ngOnChanges() {
                    if(this.selectedField != '') {
                        if(this.selectedField !== this.fieldName) {
                            this.fieldName = this.selectedField;
                            this.getFormat();
            Severity: Minor
            Found in app/queryBlocks/singlequery/queries/ids.query.ts - 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

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

              detectConfig(cb) {
                let config = null;
                let isDefault =
                  window.location.href.indexOf("#?default=true") > -1 ? true : false;
                let isInputState =
            Severity: Minor
            Found in app/app.component.ts - 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

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

                ngOnChanges() {
                    if (this.selectedField != '') {
                        if (this.selectedField !== this.fieldName) {
                            this.fieldName = this.selectedField;
                            this.getFormat();
            Severity: Minor
            Found in app/queryBlocks/singlequery/queries/query_string.query.ts - 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

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

              parseHash() {
                var token = this.storageService.get("mirage_id_token");
                if (token !== null && !this.isTokenExpired(token)) {
                  this.show_logged_in(token);
                } else {
            Severity: Minor
            Found in app/features/subscribe/AuthOperation.ts - 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

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

              setLayoutResizer() {
                this.setLayoutFlag = true;
                var self = this;
                $("body").layout({
                  east__size: "50%",
            Severity: Minor
            Found in app/app.component.ts - 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

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

                ngOnChanges() {
                    if(this.selectedField != '') {
                        if(this.selectedField !== this.fieldName) {
                            this.fieldName = this.selectedField;
                            this.getFormat();
            Severity: Minor
            Found in app/queryBlocks/singlequery/queries/lt.query.ts - 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

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

                ngOnInit() {
                    this.options = JSON.parse(JSON.stringify(this.default_options));
                    try {
                        if(this.appliedQuery[this.current_query][this.fieldName]['shape']['type']) {
                            this.inputs.type.value = this.appliedQuery[this.current_query][this.fieldName]['shape']['type'];
            Severity: Minor
            Found in app/queryBlocks/singlequery/queries/geoshape.query.ts - 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

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

                ngOnChanges() {
                    if(this.selectedField != '') {
                        if(this.selectedField !== this.fieldName) {
                            this.fieldName = this.selectedField;
                            this.getFormat();
            Severity: Minor
            Found in app/queryBlocks/singlequery/queries/terms.query.ts - 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

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

                ngOnChanges() {
                    if(this.selectedField != '') {
                        if(this.selectedField !== this.fieldName) {
                            this.fieldName = this.selectedField;
                            this.getFormat();
            Severity: Minor
            Found in app/queryBlocks/singlequery/queries/fuzzy.query.ts - 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

            Severity
            Category
            Status
            Source
            Language