marcells/node-build-monitor

View on GitHub

Showing 110 of 159 total issues

Function VSTSRestBuilds has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
Open

function VSTSRestBuilds() {
  let basicAuth = null;
  let url = null;
  let project = null;
  let collection = null;
Severity: Minor
Found in app/services/Tfs.js - About 1 day 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

Function exports has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
Open

module.exports = function () {
    var self = this,
        requestWithDefaults,
        flatten = function (arrayOfArray) {
            return [].concat.apply([], arrayOfArray);
Severity: Minor
Found in app/services/Jenkins.js - About 1 day 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

Function exports has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
Open

module.exports = function () {
    var self = this,
        flatten = function(arrayOfArray) {
            return [].concat.apply([], arrayOfArray);
        },
Severity: Minor
Found in app/services/GitLab.js - About 1 day 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

Function VSTSRestBuilds has 236 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function VSTSRestBuilds() {
  let basicAuth = null;
  let url = null;
  let project = null;
  let collection = null;
Severity: Major
Found in app/services/Tfs.js - About 1 day to fix

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

    module.exports = function () {
        var self = this,
            flatten = function(arrayOfArray) {
                return [].concat.apply([], arrayOfArray);
            },
    Severity: Major
    Found in app/services/GitLab.js - About 1 day to fix

      Function exports has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
      Open

      module.exports = function () {
          var self = this,
              selectMany = function (array, selector) {
                  return array.map(selector).reduce(function (x, y) { return x.concat(y); }, []);
              },
      Severity: Minor
      Found in app/services/TeamCity.js - About 1 day 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

      Function TfsRestRelease has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
      Open

      function TfsRestRelease() {
        let basicAuth = null;
        let instance = null;
        let project = null;
        let protocol = null;
      Severity: Minor
      Found in app/services/TfsRelease.js - About 1 day 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

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

      module.exports = function() {
        var self = this,
          requestBuilds = function (callback) {
            const {
              vcs,
      Severity: Major
      Found in app/services/CircleCI.js - About 1 day to fix

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

        module.exports = function () {
            var self = this,
                selectMany = function (array, selector) {
                    return array.map(selector).reduce(function (x, y) { return x.concat(y); }, []);
                },
        Severity: Major
        Found in app/services/TeamCity.js - About 6 hrs to fix

          Function TfsRestRelease has 159 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function TfsRestRelease() {
            let basicAuth = null;
            let instance = null;
            let project = null;
            let protocol = null;
          Severity: Major
          Found in app/services/TfsRelease.js - About 6 hrs to fix

            Function exports has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
            Open

            module.exports = function () {
                var self = this,
                queryBuilds = function (callback) {
                    requestBuilds(function (error, body) {
                        if (error) {
            Severity: Minor
            Found in app/services/Bamboo.js - About 6 hrs 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

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

            module.exports = function () {
                var self = this,
                    getRequestHeaders = function () { // build request header
                        if (typeof process.env.BUILDBUDDY_ACCESS_TOKEN !== 'undefined') {
                            self.configuration.access_token = process.env.BUILDBUDDY_ACCESS_TOKEN;
            Severity: Major
            Found in app/services/BuddyBuild.js - About 6 hrs to fix

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

              module.exports = function () {
                  var self = this,
                      requestWithDefaults,
                      flatten = function (arrayOfArray) {
                          return [].concat.apply([], arrayOfArray);
              Severity: Major
              Found in app/services/Jenkins.js - About 5 hrs to fix

                Function exports has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                Open

                module.exports = function() {
                  var self = this,
                    requestBuilds = function (callback) {
                      const {
                        vcs,
                Severity: Minor
                Found in app/services/CircleCI.js - About 5 hrs 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

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

                module.exports = function() {
                  var configuration = {};
                  var graph;
                
                  return {
                Severity: Major
                Found in app/services/Buildkite.js - About 5 hrs to fix

                  Function exports has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                  Open

                  module.exports = function () {
                      var self = this,
                          makeUrl = function () {
                              return 'https://api.bitbucket.org/2.0/repositories/' + (self.configuration.teamname || self.configuration.username) + '/' + self.configuration.slug + '/pipelines/?sort=-created_on&pagelen=1';
                          },
                  Severity: Minor
                  Found in app/services/BitbucketPipelines.js - About 5 hrs 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

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

                  module.exports = function () {
                    var self = this,
                      requestBuilds = function (callback) {
                        const url = `${self.api_base}/repos/${self.configuration.slug}/builds`;
                        if (self.configuration.debug) {
                  Severity: Major
                  Found in app/services/Drone.js - About 5 hrs to fix

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

                    module.exports = function () {
                        var self = this,
                        queryBuilds = function (callback) {
                            requestBuilds(function (error, body) {
                                if (error) {
                    Severity: Major
                    Found in app/services/Bamboo.js - About 4 hrs to fix

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

                      module.exports = function () {
                          var self = this,
                              queryBuilds = function (callback) {
                                  fetchDeployments(function (error, body) {
                                      if (error) {
                      Severity: Major
                      Found in app/services/BambooDeploy.js - About 4 hrs to fix

                        Function exports has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                        Open

                        module.exports = function () {
                            var self = this,
                                makeUrl = function (url, odata) {
                                    var baseUrl = self.configuration.url + '/_apis/build' + url;
                        
                        
                        Severity: Minor
                        Found in app/services/Tfs2015.js - About 4 hrs 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