Showing 12 of 32 total issues
Function exports
has 327 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function ( grunt ) {
/**
* Load required Grunt tasks. These are installed based on the versions listed
* in `package.json` when you do `npm install` in this directory.
Function CreateContainerCtrl
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
function CreateContainerCtrl( $scope, params, Cookies, Config, Image, Container, Env ) {
var imageName = decodeURIComponent(params.name);
$scope.settings = Cookies.settings;
$scope.hostVolumes = [];
File Gruntfile.js
has 329 lines of code (exceeds 250 allowed). Consider refactoring. Open
module.exports = function ( grunt ) {
/**
* Load required Grunt tasks. These are installed based on the versions listed
* in `package.json` when you do `npm install` in this directory.
Function CreateContainerCtrl
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
function CreateContainerCtrl( $scope, params, Cookies, Config, Image, Container, Env ) {
var imageName = decodeURIComponent(params.name);
$scope.settings = Cookies.settings;
$scope.hostVolumes = [];
- 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 config
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
.config( function config( $stateProvider ) {
var home = 'home';
$stateProvider
.state( 'containerInfo', {
url: 'containers/:name',
Function config
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
.config( function config( $stateProvider ) {
var home = 'home';
var size = '';
$stateProvider
.state( 'createContainerMain', {
Function ContainerInfoCtrl
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ContainerInfoCtrl( $scope, params, $location, ContainerService, Container ) {
ContainerService.getByName( decodeURIComponent(params.name) )
.then(function( container ) {
Container.get({ id: container.Id }, function( data ) {
Function ContainerNetworkCtrl
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ContainerNetworkCtrl( $scope, $q, Network ) {
$scope.networks = [];
var inspectNetwork = function( id ) {
Network.get({ id: id }, function( data ) {
Avoid deeply nested control flow statements. Open
for(var j in addresses) {
if(addresses[j].ip == containerIp) {
addresses.splice(j,1);
break;
}
Function BindingAddressCtrl
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function BindingAddressCtrl( $scope, Cookies, Config, ContainerService ) {
$scope.settings = Cookies.settings;
if($scope.settings.disableAddressesLookup) {
- 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 ImagesCtrl
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function ImagesCtrl( $scope, $interval, Cookies, ImageService ) {
$scope.settings = Cookies.settings;
$scope.searchThreshold = 10;
$scope.viewLimit = 10;
- 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 ContainerInfoCtrl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function ContainerInfoCtrl( $scope, params, $location, ContainerService, Container ) {
ContainerService.getByName( decodeURIComponent(params.name) )
.then(function( container ) {
Container.get({ id: container.Id }, function( data ) {
- 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"