jonshaffer/angular-data-table

View on GitHub
src/components/menu/dropdown/DropdownDirective.js

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 3 of 3 total issues

Function DropdownDirective has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function DropdownDirective($document, $timeout) {
return {
restrict: 'C',
controller: 'DropdownController',
link($scope, $elm) {
Severity: Minor
Found in src/components/menu/dropdown/DropdownDirective.js - About 1 hr to fix

Function link has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

link($scope, $elm) {
function closeDropdown(ev) {
if ($elm[0].contains(ev.target)) {
return;
}
Severity: Minor
Found in src/components/menu/dropdown/DropdownDirective.js - About 1 hr to fix

Function DropdownDirective has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

export default function DropdownDirective($document, $timeout) {
return {
restrict: 'C',
controller: 'DropdownController',
link($scope, $elm) {
Severity: Minor
Found in src/components/menu/dropdown/DropdownDirective.js - About 25 mins to fix
Category
Status