Showing 34 of 100 total issues
Function render
has 244 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
// Everything needs to eventually be refactored
const formSchemaGeneral = t.struct({
minimizeToTray: t.maybe(t.Boolean),
runOnStartup: t.maybe(t.Boolean),
Function render
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div
className={cx({
series: true,
File Settings.js
has 324 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import _ from 'lodash';
import t from 'tcomb-form';
import cx from 'classnames';
import React, { Component, PropTypes } from 'react';
Function render
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div
ref="listItem"
className={cx({
Function render
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const statusOptions = [
{
text: 'Current',
value: 'current'
Function render
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const ratingIcons = [];
let ratingOverLabel = this.state.ratingOver !== null
? this.state.ratingOver.toFixed(1)
Function render
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="day">
<div
ref="dayInfo"
Function filePickerTemplate
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const filePickerTemplate = (locals) => {
const selectFolder = (e) => {
e.preventDefault();
const { dialog } = remote;
dialog.showOpenDialog({
Function render
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="list">
<ListTabs
filterListByStatus={this.props.filterListByStatus}
Function render
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<Collapse
isOpened={this.props.expanded}
springConfig={{ stiffness: 420, damping: 30 }}
Function switchToMyAnimeList
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function switchToMyAnimeList() {
return (dispatch, getState) => {
const { currentListName } = getState();
const malSyncer = new SyncerFactory({
username: toshoStore.get('myanimelist.username'),
Function render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="search">
<input
autoFocus
Function render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="onboard">
<div className="onboard-step">
<div className="onboard-step-header">
Function SideBarNavigation
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SideBarNavigation = () => {
return (
<div className="sidebar-navigation">
<div className="sidebar-navigation-label">
Main
Function render
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
render() {
const ratingIcons = [];
let ratingOverLabel = this.state.ratingOver !== null
? this.state.ratingOver.toFixed(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 switchToHummingbird
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function switchToHummingbird() {
return (dispatch, getState) => {
const { currentListName } = getState();
const hbSyncer = new SyncerFactory({
username: toshoStore.get('hummingbird.username'),
Function render
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="ui-select">
<div
onClick={this.toggleVisible}
Function render
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="picker-btn" ref="pickerBtn">
<div className="picker-animate-success" ref="successOvl">
<div className="icon-check" ref="successIcon"></div>
Function scan
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
scan() {
return new Promise((resolve, reject) => {
let scriptPath;
if (process.env.NODE_ENV === 'development') {
scriptPath = path.resolve(__dirname, '../bin/detect-media.ps1');
Function requestScrobble
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function requestScrobble(data) {
return (dispatch, getState) => {
const { currentScrobble, currentList } = getState();
if (!_.isEqual(currentScrobble, data)) {
request