solsort/direape

View on GitHub

Showing 14 of 14 total issues

File direape.js has 616 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// <img src=https://direape.solsort.com/icon.png width=96 height=96 align=right>
//
// [![website](https://img.shields.io/badge/website-direape.solsort.com-blue.svg)](https://direape.solsort.com/)
// [![github](https://img.shields.io/badge/github-solsort/direape-blue.svg)](https://github.com/solsort/direape)
// [![codeclimate](https://img.shields.io/codeclimate/github/solsort/direape.svg)](https://codeclimate.com/github/solsort/direape)
Severity: Major
Found in direape.js - About 1 day to fix

    Function equals has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      da.equals = (a,b) => {
        if(a === b) {
          return true;
        }
    
    
    Severity: Minor
    Found in direape.js - About 1 hr to fix

      Function startServer has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          da.startServer = () => {
            var app = require('express')();
            app.use(require('express').static(__dirname));
      
            var server = require('http').createServer(app);
      Severity: Minor
      Found in direape.js - About 1 hr to fix

        Function runTest has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function runTest(t) {
            var err, p;
        
            try {
              p = Promise.resolve(t());
        Severity: Minor
        Found in direape.js - About 1 hr to fix

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

            function jsonReplacer(o) {
              var jsonifyWhitelist = ['stack', 'name', 'message', 'id', 'class', 'value'];
          
              if((typeof o !== 'object' && typeof o !== 'function') ||
                  o === null || Array.isArray(o) || o.constructor === Object) {
          Severity: Minor
          Found in direape.js - About 1 hr to fix

            Function online has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                da.online = function(url) {
                  if(arguments.length === 0) {
                    return websocket && websocket.readyState === 1;
                  }
            
            
            Severity: Minor
            Found in direape.js - About 1 hr to fix

              Avoid too many return statements within this function.
              Open

                    return true;
              Severity: Major
              Found in direape.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                          return false;
                Severity: Major
                Found in direape.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                        return true;
                  Severity: Major
                  Found in direape.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                              return false;
                    Severity: Major
                    Found in direape.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return false;
                      Severity: Major
                      Found in direape.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                              return a.equals(b);
                        Severity: Major
                        Found in direape.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return false;
                          Severity: Major
                          Found in direape.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                    return false;
                            Severity: Major
                            Found in direape.js - About 30 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language