Showing 1,485 of 3,294 total issues
File main.js
has 258 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright (c) 2019 - present Adobe. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Function _getLineCommentPrefixEdit
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _getLineCommentPrefixEdit(editor, prefixes, blockPrefix, blockSuffix, lineSel) {
var doc = editor.document,
sel = lineSel.selectionForEdit,
trackedSels = lineSel.selectionsToTrack,
lineExp = _createLineExpressions(prefixes, blockPrefix, blockSuffix),
Function _setupEventHandlers
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
ExtensionManagerView.prototype._setupEventHandlers = function () {
var self = this;
// Listen for model data and filter changes.
this.model
Function getScopeData
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getScopeData(fileInfo, offset) {
// Create a new tern Server
// Existing tern server resolves all the required modules which might take time
// We only need to analyze single file for getting the scope
ternOptions.plugins = {};
Function _textReplace
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
DOMEditHandler.prototype._textReplace = function (targetElement, edit) {
function prevIgnoringHighlights(node) {
do {
node = node.previousSibling;
} while (node && node.className === HIGHLIGHT_CLASSNAME);
Function removeData
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
removeData: function( elem, name, pvt /* Internal Use Only */ ) {
if ( !jQuery.acceptData( elem ) ) {
return;
}
Function write
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
File.prototype.write = function (data, options, callback) {
if (typeof options === "function") {
callback = options;
options = {};
} else {
File bootstrap-tooltip.js
has 256 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* ===========================================================
* bootstrap-tooltip.js v2.3.1
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
Function handleTernGetFile
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function handleTernGetFile(request) {
function replyWith(name, txt) {
_postMessageByPass({
type: MessageIds.TERN_GET_FILE_MSG,
Function _installEditorListeners
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Editor.prototype._installEditorListeners = function () {
var self = this;
// Redispatch these CodeMirror key events as Editor events
function _onKeyEvent(instance, event) {
File foldgutter.js
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
// Based on http://codemirror.net/addon/fold/foldgutter.js
// Modified by Patrick Oladimeji for Brackets
Function _generateMonthYearHeader
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
secondary, monthNames, monthNamesShort) {
var changeMonth = this._get(inst, 'changeMonth');
var changeYear = this._get(inst, 'changeYear');
var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
Function render
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
var selectionBackground = fileSelectionBox({
ref: "selectionBackground",
selectionViewInfo: this.props.selectionViewInfo,
className: "filetree-selection",
File Async.js
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright (c) 2012 - present Adobe Systems Incorporated. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Function data
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
data: function( key, value ) {
var i, name, data,
elem = this[ 0 ],
attrs = elem && elem.attributes;
Function send
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
send: function( headers, complete ) {
var i,
xhr = options.xhr(),
id = ++xhrId;
Function _requestTernServer
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function _requestTernServer(commandConfig) {
var file, text, offset,
request = commandConfig,
type = request.type;
if (config.debug) {
- 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 watchPath
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function watchPath(path, ignored, _watcherMap) {
var ignoreMatcher = buildMatcher(ignored);
var closing = false;
- 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 getSearchMatches
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function getSearchMatches(contents, queryExpr) {
if (!contents) {
return;
}
// Quick exit if not found or if we hit the limit
- 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 updateFoldInfo
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateFoldInfo(cm, from, to) {
var minFoldSize = prefs.getSetting("minFoldSize") || 2;
var opts = cm.state.foldGutter.options;
var fade = prefs.getSetting("hideUntilMouseover");
var $gutter = $(cm.getGutterElement());