Showing 48 of 144 total issues
Function NoteEditor
has a Cognitive Complexity of 103 (exceeds 5 allowed). Consider refactoring. Open
var NoteEditor = function() {
const NOTE_COMPLETE_CLASS = 'complete';
const DEFAULT_NOTE_CLASS = 'note';
const NOTE_NOT_EDITABLE_CLASS = 'readonly';
const NOTE_TO_BE_MOVED = 'modified';
- 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 NoteEditor
has 285 lines of code (exceeds 25 allowed). Consider refactoring. Open
var NoteEditor = function() {
const NOTE_COMPLETE_CLASS = 'complete';
const DEFAULT_NOTE_CLASS = 'note';
const NOTE_NOT_EDITABLE_CLASS = 'readonly';
const NOTE_TO_BE_MOVED = 'modified';
Function NoteClient
has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring. Open
var NoteClient = function() {
var currentlyFocusedNote = null;
function _init() {
// Initialize note events with callback events.
- 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 NoteClient
has 269 lines of code (exceeds 25 allowed). Consider refactoring. Open
var NoteClient = function() {
var currentlyFocusedNote = null;
function _init() {
// Initialize note events with callback events.
Function Notes
has 264 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Notes = function() {
/**
* Fetches the notes present in the given notebook.
* @param {String} notebookID Notebook ID
* @param {function} cbMain Callback method that is sent an errror object
Function Notes
has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring. Open
var Notes = function() {
/**
* Fetches the notes present in the given notebook.
* @param {String} notebookID Notebook ID
* @param {function} cbMain Callback method that is sent an errror object
- 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 NotebooksClient
has 257 lines of code (exceeds 25 allowed). Consider refactoring. Open
var NotebooksClient = function() {
var notebooksContainerUL, notebooksTabHeading, notebooksTabContainer;
const EMPTY_NOTES_CLASS = 'empty-notebook';
function _init(cbMain) {
Function NoteEvents
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
var NoteEvents = function() {
var _noteHandler = {};
var _eventProperties = ['isEditable', 'isComplete', 'isReadOnly'];
function init(noteCallbackMethods) {
- 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 NoteEvents
has 174 lines of code (exceeds 25 allowed). Consider refactoring. Open
var NoteEvents = function() {
var _noteHandler = {};
var _eventProperties = ['isEditable', 'isComplete', 'isReadOnly'];
function init(noteCallbackMethods) {
Function Settings
has 162 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Settings = function() {
var appSettings = null;
var loadSettings = function() {
try {
Function NotebookEvents
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
var NotebookEvents = function() {
var containerUL = null;
var tabHeading = null;
var tabContainer = null;
var client = null;
Function Notebooks
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Notebooks = function() {
const OPEN_NOTEBOOKS = 'open-notebooks';
const CURRENT_OPEN_NOTEBOOK = 'current-notebook';
/**
Function NotebooksClient
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
var NotebooksClient = function() {
var notebooksContainerUL, notebooksTabHeading, notebooksTabContainer;
const EMPTY_NOTES_CLASS = 'empty-notebook';
function _init(cbMain) {
- 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 Utility
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Utility = function() {
var loadPartial = function(partialName, data, callback) {
loadTemplateFile(partialName, false, data, callback);
};
Function Utility
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
var Utility = function() {
var loadPartial = function(partialName, data, callback) {
loadTemplateFile(partialName, false, data, callback);
};
- 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 NotebookEvents
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
var NotebookEvents = function() {
var containerUL = null;
var tabHeading = null;
var tabContainer = null;
var client = null;
- 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 Settings
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
var Settings = function() {
var appSettings = null;
var loadSettings = function() {
try {
- 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 SettingEvents
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
var SettingEvents = function() {
var settingsClient;
var dlg = null;
var allTabs = null;
var allTabAnchors = null;
File note-editor.js
has 291 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*****************************************************************
* Contains code to determine and change the current state
* of the note. For example to determine when the note is
* currently editable, complete and to make it editable.
* Only deals with the DOM side of things.
File note-client.js
has 282 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*****************************************************************
* Acts like a controller and contains code to handle notes in the
* application. It calls and coordinates the activities of other
* note-related modules such as the notes, note editor and events.
*