suever/MATL-Online

View on GitHub

Showing 5 of 54 total issues

File main.js has 375 lines of code (exceeds 250 allowed). Consider refactoring.
Open

$(document).ready(function() {
var table = null;
 
var socket = io.connect(window.location.protocol +
'//' + document.domain +
Severity: Minor
Found in matl_online/static/js/main.js - About 5 hrs to fix

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

    function toggleDocumentation(){
     
    var navitem = $('#doctoggle').parent();
    var activeClasses = 'col-md-6 col-lg-6 col-sm-6';
     
     
    Severity: Major
    Found in matl_online/static/js/main.js - About 2 hrs to fix

      Function parse_matl_results has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

      def parse_matl_results(output: str) -> List[Dict[str, str]]:
      """Convert MATL output to a custom data structure.
       
      Takes all the output and parses it out into sections to pass back
      to the client which indicates stderr/stdout/images, etc.
      Severity: Minor
      Found in matl_online/matl/io.py - About 1 hr to fix

      Function refresh_releases has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      def refresh_releases(
      repository: str = Config.MATL_REPOSITORY,
      source_root: pathlib.Path = Config.MATL_SOURCE_DIRECTORY,
      ) -> None:
      """Fetch new release information from GitHub and update local database."""
      Severity: Minor
      Found in matl_online/matl/releases.py - About 35 mins to fix

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

      def process_message(self, message: str) -> None:
      """Append a message to be sent back to the user."""
      print(message)
       
      if message == "[PAUSE]":
      Severity: Minor
      Found in matl_online/tasks.py - About 25 mins to fix
      Severity
      Category
      Status
      Source
      Language