hoschi/sweetp-service-github-issues

View on GitHub

Showing 7 of 22 total issues

File method_all.js has 2114 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var nock = require('nock');

nock('http://localhost:8800')
    .get('/services/test-github-issues/password/manager/get?key=github')
    .reply(200, {
Severity: Major
Found in fixtures/method_all.js - About 5 days to fix

    File method_all_with_all_props.js has 2114 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    var nock = require('nock');
    
    nock('http://localhost:8800')
        .get('/services/test-github-issues/password/manager/get?key=github')
        .reply(200, {
    Severity: Major
    Found in fixtures/method_all_with_all_props.js - About 5 days to fix

      File method_all_state_closed.js has 1703 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      var nock = require('nock');
      
      nock('http://localhost:8800')
          .get('/services/test-github-issues/password/manager/get?key=github')
          .reply(200, {
      Severity: Major
      Found in fixtures/method_all_state_closed.js - About 4 days to fix

        File method_all_state_open.js has 676 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        var nock = require('nock');
        
        nock('http://localhost:8800')
            .get('/services/test-github-issues/password/manager/get?key=github')
            .reply(200, {
        Severity: Major
        Found in fixtures/method_all_state_open.js - About 1 day to fix

          Function exports has 66 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          module.exports = function(grunt) {
              // Show elapsed time at the end
              //require('time-grunt')(grunt);
              // Load all grunt tasks
              require('load-grunt-tasks')(grunt);
          Severity: Major
          Found in Gruntfile.js - About 2 hrs to fix

            Function callWithCache has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            exports.callWithCache = function (id, get, callback) {
                exports.memoryCache.wrap(id, function (setInMemoryCache) {
                    var eTag, writeToCacheAndReturn;
            
                    writeToCacheAndReturn = function (response) {
            Severity: Minor
            Found in src/service.js - About 1 hr to fix

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

              exports.getCredentials = function (params, callback) {
                  var service, project, serviceParams, key;
              
                  service = this.defaultCredentialService;
                  project = params.config.name;
              Severity: Minor
              Found in src/service.js - About 35 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