Showing 16 of 29 total issues
File node.d.ts
has 1672 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Type definitions for Node.js v4.x
// Project: http://nodejs.org/
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/borisyankov/DefinitelyTyped>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
File angular.d.ts
has 721 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Type definitions for Angular JS 1.4+
// Project: http://angularjs.org
// Definitions by: Diego Vilar <http://github.com/diegovilar>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
File jquery.d.ts
has 594 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Type definitions for jQuery 1.10.x / 2.0.x
// Project: http://jquery.com/
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Christian Hoffmeister <https://github.com/choffmeister>, Steve Fenton <https://github.com/Steve-Fenton>, Diullei Gomes <https://github.com/Diullei>, Tass Iliopoulos <https://github.com/tasoili>, Jason Swearingen <https://github.com/jasons-novaleaf>, Sean Hill <https://github.com/seanski>, Guus Goossens <https://github.com/Guuz>, Kelly Summerlin <https://github.com/ksummerlin>, Basarat Ali Syed <https://github.com/basarat>, Nicholas Wolverson <https://github.com/nwolverson>, Derek Cicerone <https://github.com/derekcicerone>, Andrew Gaspar <https://github.com/AndrewGaspar>, James Harrison Fisher <https://github.com/jameshfisher>, Seikichi Kondo <https://github.com/seikichi>, Benjamin Jackman <https://github.com/benjaminjackman>, Poul Sorensen <https://github.com/s093294>, Josh Strobl <https://github.com/JoshStrobl>, John Reilly <https://github.com/johnnyreilly/>, Dick van den Brink <https://github.com/DickvdBrink>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
Function stiPagination
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
function stiPagination(stiPaginationConfig) {
return {
restrict: 'EA',
require: '^stTable',
scope: {
- 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
File jasmine.d.ts
has 375 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Type definitions for Jasmine 2.2
// Project: http://jasmine.github.io/
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Theodore Brown <https://github.com/theodorejb>, David Pärsson <https://github.com/davidparsson/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
Function stiPagination
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
function stiPagination(stiPaginationConfig) {
return {
restrict: 'EA',
require: '^stTable',
scope: {
Function link
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function link(scope, element, attrs, ctrl) {
scope.itemsPerPage = scope.itemsPerPage ? scope.itemsPerPage : stiPaginationConfig.itemsPerPage;
scope.maxSize = scope.maxSize ? scope.maxSize : stiPaginationConfig.maxSize;
scope.autoHide = angular.isDefined(scope.autoHide) ? scope.autoHide : false;
Function StiTableController
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function StiTableController($scope) {
let ctrl = this;
$scope.$stiSelected = {};
$scope.$stiNumSelected = 0;
Function stiTable
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function stiTable($parse) {
return {
restrict: 'A',
require: ['stTable', 'stiTable'],
scope: true,
Function stiTable
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function stiTable($parse) {
return {
restrict: 'A',
require: ['stTable', 'stiTable'],
scope: true,
- 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 stiSelectAll
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function stiSelectAll() {
return {
restrict: 'A',
require: [
'^stiTable',
Function writeTemplates
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function writeTemplates() {
return new Promise(function (resolve, reject) {
glob('template/**/*.html', function (err, files) {
if (err) {
reject(err);
Function link
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function link(scope, element, attrs, ctrls) {
let [stTableCtrl, stiTableCtrl] = ctrls;
scope.$stiRowIdField = angular.isDefined(attrs.rowIdField) ? attrs.rowIdField : '$$hashKey';
if (attrs.trackSelectedMode === 'all') {
Avoid too many return
statements within this function. Open
return i;
Avoid too many return
statements within this function. Open
return i;
Function StiTableController
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function StiTableController($scope) {
let ctrl = this;
$scope.$stiSelected = {};
$scope.$stiNumSelected = 0;
- 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"