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;
- Read upRead up
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);
- Read upRead up
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);
},
- Read upRead up
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;
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);
},
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); }, []);
},
- Read upRead up
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;
- Read upRead up
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,
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); }, []);
},
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;
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) {
- Read upRead up
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;
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);
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,
- Read upRead up
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 {
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';
},
- Read upRead up
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) {
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) {
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) {
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;
- Read upRead up
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"