Showing 11 of 40 total issues
File icons.js
has 742 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable max-lines */
// v2.1.35 (total: 740)
export default [
'acre',
'alacritty-alt',
Function addCommands
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addCommands () {
this.subscriptions.add(
atom.commands.add('atom-workspace', {
'project-viewer-plus:clear-current-state': () => {
state.clearState();
Function render
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const blocks = [];
const entry = this.newEntry || this.entry;
if (!entry) {
PVP
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export default class PVP {
/**
* Returns this package configuration object specific to Atom
* @returns {Object} the package configuration
*/
Function addCommands
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
addCommands () {
this.subscriptions.add(
atom.commands.add('atom-workspace', {
'project-viewer-plus:clear-current-state': () => {
state.clearState();
- 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 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
const allowDelete = this.actions.includes('delete')
? 'btn btn-error inline-block-tight'
: 'btn hide';
Function addContextMenu
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addContextMenu () {
this.subscriptions.add(
atom.contextMenu.add({
'.project-viewer-plus': [
{
Function serializeGroupById
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
serializeGroupById (id, withContext = true) {
const level = { groups: [], projects: [] };
const group = this.getEntry(id || NaN);
Function readState
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async readState (currentState) {
let content;
try {
return state.initializeState(currentState, true);
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render () {
return (
<div className="block-container">
{this.children.map(child => child)}
<label class="input-label">
Function render
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
render () {
const blocks = [];
const entry = this.newEntry || this.entry;
if (!entry) {
- 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"