Showing 12 of 27 total issues
Function exports
has 196 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(grunt) {
grunt.initConfig({
'download-atom-shell': {
version: '0.21.2',
outputDir: '../atom_shell',
Function NotesAPI
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
var NotesAPI = (function() {
// Private API
var api = {
findNote: function(filename, cb) {
JotzBrowser
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
var JotzBrowser = Backbone.Model.extend({
setupReporters: function() {
require('crash-reporter').start();
},
setConfigs: function() {
Function GlobalUtils
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
var GlobalUtils = (function() {
// Private
function S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
Function NotebooksAPI
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
var NotebooksAPI = (function() {
// Private API
var api = {
getNotebooks: function(cb) {
Function NotebooksAPI
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
var NotebooksAPI = (function() {
// Private API
var api = {
getNotebooks: function(cb) {
- 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 AuthAPI
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
var AuthAPI = (function() {
var OAuthBrowser = Backbone.Model.extend({
initialize: function(options) {
this.setInitialState(options);
this.bindMtds();
Function GlobalUtils
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
var GlobalUtils = (function() {
// Private
function S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
- 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 render
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
return (
<div>
<div className='side-container'>
<SideMenu
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
var deleteBtn = null;
var noteTitle = '';
if (this.state.note && this.state.note._id) {
deleteBtn = <button className="btn" onClick={this.deleteNote}>Delete</button>;
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
var menuItems = this.props.menuItems.map(function(menuItem) {
return (
<MenuItem
active={this.props.currentView === menuItem.category}
Function NotesAPI
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
var NotesAPI = (function() {
// Private API
var api = {
findNote: function(filename, cb) {
- 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"