Showing 779 of 1,157 total issues
Function render
has 320 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div className="welcome is-guide">
<div className="welcome-container">
<section className="welcome-panel">
Function open
has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring. Open
async open(itemOrURI, options = {}) {
let uri, item;
if (typeof itemOrURI === 'string') {
uri = this.project.resolvePath(itemOrURI);
} else if (itemOrURI) {
- 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 config-schema.js
has 658 lines of code (exceeds 250 allowed). Consider refactoring. Open
// This is loaded by atom-environment.coffee. See
// https://atom.io/docs/api/latest/Config for more information about config
// schemas.
const configSchema = {
core: {
exports
has 77 functions (exceeds 20 allowed). Consider refactoring. Open
module.exports = class Package {
/*
Section: Construction
*/
Function populateTextDecorationsToRender
has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring. Open
populateTextDecorationsToRender() {
// Sort all boundaries in ascending order of position
this.textDecorationBoundaries.sort((a, b) =>
a.position.compare(b.position)
);
- 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 69 functions (exceeds 20 allowed). Consider refactoring. Open
module.exports = class ApplicationDelegate {
constructor() {
this.pendingSettingsUpdateCount = 0;
this._ipcMessageEmitter = null;
}
Function toggleLineCommentsForBufferRows
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
toggleLineCommentsForBufferRows(start, end, options = {}) {
const languageMode = this.buffer.getLanguageMode();
let { commentStartString, commentEndString } =
(languageMode.commentStringsForPosition &&
languageMode.commentStringsForPosition(new Point(start, 0))) ||
- 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 68 functions (exceeds 20 allowed). Consider refactoring. Open
module.exports = class PackageManager {
constructor(params) {
({
config: this.config,
styleManager: this.styleManager,
File dock.js
has 579 lines of code (exceeds 250 allowed). Consider refactoring. Open
const etch = require('etch');
const _ = require('underscore-plus');
const { CompositeDisposable, Emitter } = require('event-kit');
const PaneContainer = require('./pane-container');
const TextEditor = require('./text-editor');
File tooltip.js
has 564 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
const EventKit = require('event-kit');
const tooltipComponentsByElement = new WeakMap();
const listen = require('./delegated-listener');
File project.js
has 561 lines of code (exceeds 250 allowed). Consider refactoring. Open
const path = require('path');
const _ = require('underscore-plus');
const fs = require('fs-plus');
const { Emitter, Disposable, CompositeDisposable } = require('event-kit');
exports
has 64 functions (exceeds 20 allowed). Consider refactoring. Open
module.exports = class Cursor extends Model {
// Instantiated by a {TextEditor}
constructor(params) {
super(params);
this.editor = params.editor;
File deprecation-cop-view.js
has 527 lines of code (exceeds 250 allowed). Consider refactoring. Open
/** @babel */
/** @jsx etch.dom */
import _ from 'underscore-plus';
import { CompositeDisposable } from 'atom';
Function getFoldableRangeForNode
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
getFoldableRangeForNode(node, grammar, existenceOnly) {
const { children } = node;
const childCount = children.length;
for (var i = 0, { length } = grammar.folds; i < length; i++) {
- 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
TextEditorElement
has 57 functions (exceeds 20 allowed). Consider refactoring. Open
class TextEditorElement extends HTMLElement {
initialize(component) {
this.component = component;
return this;
}
exports
has 57 functions (exceeds 20 allowed). Consider refactoring. Open
module.exports = class Dock {
constructor(params) {
this.handleResizeHandleDragStart = this.handleResizeHandleDragStart.bind(
this
);
TextMateLanguageMode
has 57 functions (exceeds 20 allowed). Consider refactoring. Open
class TextMateLanguageMode {
constructor(params) {
this.emitter = new Emitter();
this.disposables = new CompositeDisposable();
this.tokenIterator = new TokenIterator(this);
File path-watcher.js
has 505 lines of code (exceeds 250 allowed). Consider refactoring. Open
const fs = require('fs');
const path = require('path');
const { Emitter, Disposable, CompositeDisposable } = require('event-kit');
const nsfw = require('@atom/nsfw');
Function parseCommandLine
has 200 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function parseCommandLine(processArgs) {
// macOS Gatekeeper adds a flag ("-psn_0_[six or seven digits here]") when it intercepts Atom launches.
// (This happens for fresh downloads, new installs, or first launches after upgrading).
// We don't need this flag, and yargs interprets it as many short flags. So, we filter it out.
const filteredArgs = processArgs.filter(arg => !arg.startsWith('-psn_'));
File cursor.js
has 497 lines of code (exceeds 250 allowed). Consider refactoring. Open
const { Point, Range } = require('text-buffer');
const { Emitter } = require('event-kit');
const _ = require('underscore-plus');
const Model = require('./model');