suever/MATL-Online

View on GitHub

Showing 54 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 has too many statements (45). Maximum allowed is 30.
    Open

    $(document).ready(function() {
    Severity: Minor
    Found in matl_online/static/js/main.js by eslint

    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 has a complexity of 7.
      Open

      data['data'].forEach(function(item) {
      Severity: Minor
      Found in matl_online/static/js/main.js by eslint

      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

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

      socket.on('killed', function(data) {
      $('#run').text(runtext);
      running = false;
      console.log('Task killed.');
      });
      Severity: Minor
      Found in matl_online/static/js/main.js and 1 other location - About 50 mins to fix
      matl_online/static/js/main.js on lines 162..166

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

      socket.on('complete', function(msg) {
      $('#run').text(runtext);
      running = false;
      console.log('Task complete.');
      });
      Severity: Minor
      Found in matl_online/static/js/main.js and 1 other location - About 50 mins to fix
      matl_online/static/js/main.js on lines 156..160

      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

      Don't use IDs in selectors.
      Open

      #paste_input_field {
      Severity: Minor
      Found in matl_online/static/css/style.css by csslint

      Don't use IDs in selectors.
      Open

      #sharelink {
      Severity: Minor
      Found in matl_online/static/css/style.css by csslint

      Using width with border can sometimes make elements larger than you expect.
      Open

      border: 1px solid #666;
      Severity: Minor
      Found in matl_online/static/css/style.css by csslint

      Don't use IDs in selectors.
      Open

      #share {
      Severity: Minor
      Found in matl_online/static/css/style.css by csslint

      Rule doesn't have all its properties in alphabetical order.
      Open

      #save {
      Severity: Minor
      Found in matl_online/static/css/style.css by csslint

      Expected (auto | optimizeSpeed | optimizeQuality) but found 'pixelated'.
      Open

      image-rendering: pixelated; /* Chrome */
      Severity: Minor
      Found in matl_online/static/css/style.css by csslint

      Using height with border-top can sometimes make elements larger than you expect.
      Open

      border-top: 1px solid #DDD;
      Severity: Minor
      Found in matl_online/static/css/style.css by csslint

      Don't use IDs in selectors.
      Open

      #right_div {
      Severity: Minor
      Found in matl_online/static/css/style.css by csslint

      Using width with border can sometimes make elements larger than you expect.
      Open

      border: 1px solid #DDD;
      Severity: Minor
      Found in matl_online/static/css/style.css by csslint

      Rule doesn't have all its properties in alphabetical order.
      Open

      .imagedetaildiv {
      Severity: Minor
      Found in matl_online/static/css/style.css by csslint

      Rule doesn't have all its properties in alphabetical order.
      Open

      #paste_input_field {
      Severity: Minor
      Found in matl_online/static/css/style.css by csslint
      Severity
      Category
      Status
      Source
      Language