Showing 779 of 1,157 total issues
File grammar-registry.js
has 477 lines of code (exceeds 250 allowed). Consider refactoring. Open
const _ = require('underscore-plus');
const Grim = require('grim');
const CSON = require('season');
const FirstMate = require('first-mate');
const { Disposable, CompositeDisposable } = require('event-kit');
exports
has 51 functions (exceeds 20 allowed). Consider refactoring. Open
module.exports = class AtomApplication extends EventEmitter {
// Public: The entry point into the Atom application.
static open(options) {
StartupTime.addMarker('main-process:atom-application:open');
Config
has 50 functions (exceeds 20 allowed). Consider refactoring. Open
class Config {
static addSchemaEnforcer(typeName, enforcerFunction) {
if (schemaEnforcers[typeName] == null) {
schemaEnforcers[typeName] = [];
}
exports
has 49 functions (exceeds 20 allowed). Consider refactoring. Open
module.exports = class PaneContainer {
constructor(params) {
let applicationDelegate, deserializerManager, notificationManager;
({
config: this.config,
Function openLocations
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
async openLocations(locations) {
const needsProjectPaths =
this.project && this.project.getPaths().length === 0;
const foldersToAddToProject = new Set();
const fileLocationsToOpen = [];
- 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
exports
has 48 functions (exceeds 20 allowed). Consider refactoring. Open
module.exports = class AtomWindow extends EventEmitter {
constructor(atomApplication, fileRecoveryService, settings = {}) {
StartupTime.addMarker('main-process:atom-window:start');
super();
File guide-view.js
has 444 lines of code (exceeds 250 allowed). Consider refactoring. Open
/** @babel */
/** @jsx etch.dom **/
import etch from 'etch';
Function seek
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
seek(position) {
this.openScopeIds = [];
this.closeScopeIds = [];
this.tagIndex = 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 constructor
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(params = {}) {
if (this.constructor.clipboard == null) {
throw new Error(
'Must call TextEditor.setClipboard at least once before creating TextEditor instances'
);
Function getFoldableRangesAtIndentLevel
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
getFoldableRangesAtIndentLevel(goalLevel) {
let result = [];
let stack = [{ node: this.tree.rootNode, level: 0 }];
while (stack.length > 0) {
const { node, level } = stack.pop();
- 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 startEditorWindow
has 158 lines of code (exceeds 25 allowed). Consider refactoring. Open
async startEditorWindow() {
StartupTime.addMarker('window:environment:start-editor-window:start');
if (this.getLoadSettings().clearWindowState) {
await this.stateStore.clear();
File atom-window.js
has 429 lines of code (exceeds 250 allowed). Consider refactoring. Open
const {
BrowserWindow,
app,
dialog,
ipcMain,
Function render
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
render() {
const {
rootComponent,
showLineNumbers,
height,
- 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
File workspace-element.js
has 420 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
const { ipcRenderer } = require('electron');
const path = require('path');
const fs = require('fs-plus');
exports
has 44 functions (exceeds 20 allowed). Consider refactoring. Open
module.exports = class Project extends Model {
/*
Section: Construction and Destruction
*/
Function _populateInjections
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
_populateInjections(range, nodeRangeSet) {
const existingInjectionMarkers = this.languageMode.injectionsMarkerLayer
.findMarkers({ intersectsRange: range })
.filter(marker => marker.parentLanguageLayer === this);
- 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 open
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
async open(itemOrURI, options = {}) {
let uri, item;
if (typeof itemOrURI === 'string') {
uri = this.project.resolvePath(itemOrURI);
} else if (itemOrURI) {
Function init
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
Tooltip.prototype.init = function(element, options) {
this.enabled = true;
this.element = element;
this.options = this.getOptions(options);
this.disposables = new EventKit.CompositeDisposable();
- 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 constructor
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
constructor(params = {}) {
if (this.constructor.clipboard == null) {
throw new Error(
'Must call TextEditor.setClipboard at least once before creating TextEditor instances'
);
- 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 openPaths
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
async openPaths({
pathsToOpen,
foldersToOpen,
executedFrom,
pidToKillWhenClosed,
- 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"