Showing 6 of 12 total issues
File md-datepicker.js
has 323 lines of code (exceeds 250 allowed). Consider refactoring. Open
import Ember from 'ember';
import layout from '../templates/components/md-datepicker';
export default Ember.Component.extend({
layout,
`` has 23 functions (exceeds 20 allowed). Consider refactoring. Open
export default Ember.Component.extend({
layout,
classNames: ['md-datepicker-group'],
locale: null,
init() {
Function daySpans
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
daySpans: Ember.computed('viewingDate', 'selectedDate', 'minDate', 'maxDate', 'hourOffset', function() {
let viewingDate = this.get('viewingDate');
let selectedDate = this.get('selectedDate');
let minDate = this.get('minDate');
let maxDate = this.get('maxDate');
- 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 daySpans
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
daySpans: Ember.computed('viewingDate', 'selectedDate', 'minDate', 'maxDate', 'hourOffset', function() {
let viewingDate = this.get('viewingDate');
let selectedDate = this.get('selectedDate');
let minDate = this.get('minDate');
let maxDate = this.get('maxDate');
Function dateClicked
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
dateClicked(dayspan) {
let date = dayspan.date;
let isValid = true;
// Preserve selected time
- 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 keyUp
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
keyUp() {
this.set('isDirty', true);
let dateText = this.get('dateText');
let isValid = this.get('isValidDate');
- 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"