Showing 110 of 159 total issues
Function exports
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function () {
var self = this,
getSensors = function(callback) {
var url = self.configuration.url +
'/api/getsensordetails.json?id=' + self.configuration.sensorId +
- 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 29 (exceeds 5 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;
- 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 getListOfRelease
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getListOfRelease = (callback) => {
if(!protocol) {
protocol = "https";
}
Function exports
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function () {
var self = this,
queryBuilds = function (callback) {
fetchDeployments(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 register
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.register = function () {
ko.forcibleComputed = function(readFunc, context, options) {
var trigger = ko.observable(),
target = ko.computed(function() {
trigger();
Function AppViewModel
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
var AppViewModel = function() {
var self = this;
var isLoadingInitially = true;
Function check
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
check: function(callback) {
graph
.query(
`
SimpleQuery {
Function exports
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
var self = this,
getSensors = function(callback) {
var url = self.configuration.url +
'/api/getsensordetails.json?id=' + self.configuration.sensorId +
Function exports
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
var self = this,
getRequestHeaders = function () {
if (typeof process.env.SHIPPABLE_API_TOKEN !== 'undefined') {
self.configuration.token = process.env.SHIPPABLE_API_TOKEN;
Function getListOfBuilds
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getListOfBuilds = (callback) => {
const apiUrl = `${url}/${collection}/${project}/_apis/build/builds?api-version=${apiVersion}${params}`;
let options = {
url : apiUrl,
headers: {
Function exports
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
var self = this,
requestBuilds = function (callback) {
bitriseRequest(
'/apps/' + self.configuration.slug + '/builds',
Function exports
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
var self = this,
requestBuilds = function (callback) {
request({
'url': self.api_base + '/builds?access_token=' + self.configuration.token,
Function exports
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
var self = this,
makeUrl = function (url, odata) {
var baseUrl = self.configuration.url + '/_apis/build' + url;
Function exports
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
var self = this,
tryGetTfsProxyUrlOfDocker = function () {
return 'http://' +
process.env.TFS_PROXY_PORT_4567_TCP_ADDR +
Function exports
has a Cognitive Complexity of 21 (exceeds 5 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) {
- 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 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
var self = this,
getBuilds = function(callback) {
makeRequest(self.config.url, function(err, result) {
if (err) {
Function exports
has 71 lines of code (exceeds 25 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';
},
Function exports
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
var self = this;
self.configuration = {
interval: 5000,
Function BuildViewModel
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
var BuildViewModel = function (build) {
this.isMenuVisible = ko.observable(false);
this.id = ko.observable();
this.isRunning = ko.observable();
Function exports
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function () {
var self = this,
requestBuilds = function (callback) {
request({
'url': self.api_base + '/builds?access_token=' + self.configuration.token,
- 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"