OpenC3/cosmos

View on GitHub

Showing 1,379 of 1,379 total issues

Avoid too many return statements within this method.
Open

        return read(identify_and_define)
Severity: Major
Found in openc3/lib/openc3/logs/packet_log_reader.rb - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            return @packet.extra['HTTP_PACKET']
    Severity: Major
    Found in openc3/lib/openc3/accessors/http_accessor.rb - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return read(identify_and_define)
      Severity: Major
      Found in openc3/lib/openc3/logs/packet_log_reader.rb - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                    return @buffer.slice!(0..-1)
        Severity: Major
        Found in openc3/lib/openc3/io/buffered_file.rb - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  return nil if @level != "DEBUG"
          Severity: Major
          Found in openc3-cosmos-cmd-tlm-api/app/models/messages_thread.rb - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    return nil if @level == "FATAL"
            Severity: Major
            Found in openc3-cosmos-cmd-tlm-api/app/models/messages_thread.rb - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return nil if @level == "ERROR" or @level == "FATAL"
              Severity: Major
              Found in openc3-cosmos-cmd-tlm-api/app/models/messages_thread.rb - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                    return 'python' if text =~ /^\s*(if|def|while|else|elif|class).*:\s*$/
                Severity: Major
                Found in openc3-cosmos-script-runner-api/app/models/script.rb - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                            return(
                              {
                                'title' => 'Syntax Check Successful',
                                'description' => ["Syntax OK"].as_json(:allow_nan => true).to_json(:allow_nan => true),
                              }
                  Severity: Major
                  Found in openc3-cosmos-script-runner-api/app/models/script.rb - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                            return nil if @level == "WARN" or @level == "ERROR" or @level == "FATAL"
                    Severity: Major
                    Found in openc3-cosmos-cmd-tlm-api/app/models/messages_thread.rb - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                          return 'ruby' if text =~ /^\s*end\s*$/
                      Severity: Major
                      Found in openc3-cosmos-script-runner-api/app/models/script.rb - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                            return 'ruby' # otherwise guess Ruby
                        Severity: Major
                        Found in openc3-cosmos-script-runner-api/app/models/script.rb - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                      return result
                          Severity: Major
                          Found in openc3/lib/openc3/io/buffered_file.rb - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                return log_entry
                            Severity: Major
                            Found in openc3-cosmos-cmd-tlm-api/app/models/messages_thread.rb - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                      return log_entry
                              Severity: Major
                              Found in openc3-cosmos-cmd-tlm-api/app/models/messages_thread.rb - About 30 mins to fix

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

                                  domElementGetter: function () {
                                    let elem = document.getElementById("openc3-tool");
                                    if (elem) {
                                      return elem;
                                    } else {
                                Severity: Minor
                                Found in openc3/templates/tool_react/src/openc3-tool_name.js and 1 other location - About 30 mins to fix
                                openc3/templates/tool_svelte/src/tool_name.js on lines 7..14

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

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

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

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

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

                                Refactorings

                                Further Reading

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

                                  domElementGetter: function () {
                                    let elem = document.getElementById("openc3-tool");
                                    if (elem) {
                                      return elem;
                                    } else {
                                Severity: Minor
                                Found in openc3/templates/tool_svelte/src/tool_name.js and 1 other location - About 30 mins to fix
                                openc3/templates/tool_react/src/openc3-tool_name.js on lines 14..21

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

                                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 packet.target_name == self.target_name and packet.packet_name == self.packet_name:
                                            return "STOP"
                                openc3/python/openc3/interfaces/protocols/ignore_packet_protocol.py on lines 37..39

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

                                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

                                        leave = ast.parse(
                                            self.post_line_instrumentation.format(self.filename, node.lineno)
                                Severity: Minor
                                Found in openc3-cosmos-script-runner-api/scripts/script_instrumentor.py and 2 other locations - About 30 mins to fix
                                openc3-cosmos-script-runner-api/scripts/script_instrumentor.py on lines 50..51
                                openc3-cosmos-script-runner-api/scripts/script_instrumentor.py on lines 107..108

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

                                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

                                        reach = ast.parse(
                                            self.pre_line_instrumentation.format(self.filename, node.lineno)
                                Severity: Minor
                                Found in openc3-cosmos-script-runner-api/scripts/script_instrumentor.py and 2 other locations - About 30 mins to fix
                                openc3-cosmos-script-runner-api/scripts/script_instrumentor.py on lines 50..51
                                openc3-cosmos-script-runner-api/scripts/script_instrumentor.py on lines 53..54

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

                                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