Showing 779 of 1,157 total issues
WorkspaceElement
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
class WorkspaceElement extends HTMLElement {
connectedCallback() {
this.focus();
this.htmlElement = document.querySelector('html');
this.htmlElement.addEventListener('mouseleave', this.handleCenterLeave);
exports
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
module.exports = class WorkspaceCenter {
constructor(params) {
params.location = 'center';
this.paneContainer = new PaneContainer(params);
this.didActivate = params.didActivate;
Function constructor
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(atomApplication, fileRecoveryService, settings = {}) {
StartupTime.addMarker('main-process:atom-window:start');
super();
Function createView
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
createView(object) {
if (object instanceof HTMLElement) {
return 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 openLocations
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
async openLocations(locations) {
const needsProjectPaths =
this.project && this.project.getPaths().length === 0;
const foldersToAddToProject = new Set();
const fileLocationsToOpen = [];
Function render
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div className="welcome">
<div className="welcome-container">
<div className="header">
Function scan
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
scan(regex, options = {}, iterator) {
if (_.isFunction(options)) {
iterator = options;
options = {};
}
- 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 measureHorizontalPositionsOnLine
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
measureHorizontalPositionsOnLine(
lineNode,
textNodes,
columnsToMeasure,
positions
- 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 scan
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
scan(regex, options = {}, iterator) {
if (_.isFunction(options)) {
iterator = options;
options = {};
}
Function update
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(params) {
const displayLayerParams = {};
for (let param of Object.keys(params)) {
const value = params[param];
Function moveToSuccessor
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
moveToSuccessor() {
this.openScopeIds = [];
this.closeScopeIds = [];
while (true) {
if (this.tagIndex === this.currentLineTags.length) {
- 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
DeprecationCopView
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
export default class DeprecationCopView {
constructor({ uri }) {
this.uri = uri;
this.subscriptions = new CompositeDisposable();
this.subscriptions.add(
Function initialize
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
initialize(model, { config, project, styleManager, viewRegistry }) {
this.handleCenterEnter = this.handleCenterEnter.bind(this);
this.handleCenterLeave = this.handleCenterLeave.bind(this);
this.handleEdgesMouseMove = _.throttle(
this.handleEdgesMouseMove.bind(this),
Function exports
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = async function() {
const getWindowLoadSettings = require('./get-window-load-settings');
const {
test,
headless,
Function install
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.install = function(resourcesPath, nodeRequire) {
const snapshotSourceMapConsumer = {
originalPositionFor({ line, column }) {
const { relativePath, row } = snapshotResult.translateSnapshotRow(line);
return {
Function render
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div className="welcome">
<div className="welcome-container">
<header className="welcome-header">
Function doStart
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
async doStart() {
const getRealPath = givenPath => {
if (!givenPath) {
return Promise.resolve(null);
}
File application-delegate.js
has 320 lines of code (exceeds 250 allowed). Consider refactoring. Open
const { ipcRenderer, remote, shell } = require('electron');
const ipcHelpers = require('./ipc-helpers');
const { Emitter, Disposable } = require('event-kit');
const getWindowLoadSettings = require('./get-window-load-settings');
PaneAxis
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class PaneAxis extends Model {
static deserialize(state, { deserializers, views }) {
state.children = state.children.map(childState =>
deserializers.deserialize(childState)
);
Consider simplifying this complex logical expression. Open
if (node == null || node.parent == null) {
return 0;
} else {
let increment = 0;