Showing 1,485 of 3,294 total issues
Function handleSwitchLanguage
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function handleSwitchLanguage() {
var stringsPath = FileUtils.getNativeBracketsDirectoryPath() + "/nls";
FileSystem.getDirectoryForPath(stringsPath).getContents(function (err, entries) {
if (!err) {
Function loadExtensionModule
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function loadExtensionModule(name, config, entryPoint) {
var extensionConfig = {
context: name,
baseUrl: config.baseUrl,
paths: globalPaths,
Function drop
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drop() {
preDropCleanup();
if (sourceView.paneId === currentView.paneId && startingIndex === $el.index()) {
// if the item was dragged but not moved then don't open or close
if (!dragged) {
Function findExternalChanges
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function findExternalChanges(docs) {
toReload = [];
toClose = [];
editConflicts = [];
Function _getTagAttributeValue
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _getTagAttributeValue(editor, pos) {
var ctx, tagName, attrName, exclusionList = [], offset, textBefore, textAfter;
ctx = TokenUtils.getInitialContext(editor._codeMirror, pos);
offset = TokenUtils.offsetInToken(ctx);
Function update
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
if (keyHash === undefined) {
keyHash = hash(key);
}
Function getParameterHints
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ParameterHintsProvider.prototype.getParameterHints = function () {
if (!this.client) {
return null;
}
Function _createServer
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
function _createServer(path, port, createCompleteCallback) {
var server,
app,
address,
pathKey = getPathKey(path);
- 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 CSSPreprocessorDocumentModule
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
define(function CSSPreprocessorDocumentModule(require, exports, module) {
"use strict";
var _ = require("thirdparty/lodash"),
EventDispatcher = require("utils/EventDispatcher"),
- 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 _handleSoftTabNavigation
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Editor.prototype._handleSoftTabNavigation = function (direction, functionName) {
var instance = this._codeMirror,
overallJump = null;
if (!instance.getOption("indentWithTabs") && PreferencesManager.get(SOFT_TABS)) {
Function init
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function init(domainManager) {
if (!domainManager.hasDomain("TernNodeDomain")) {
domainManager.registerDomain("TernNodeDomain", {major: 0, minor: 1});
}
Function ConsoleAgent
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
define(function ConsoleAgent(require, exports, module) {
"use strict";
var Inspector = require("LiveDevelopment/Inspector/Inspector");
Function NetworkAgent
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
define(function NetworkAgent(require, exports, module) {
"use strict";
var Inspector = require("LiveDevelopment/Inspector/Inspector");
Function it
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function it(type, value) {
var i, t;
if (type === '(color)' || type === '(range)') {
t = {type: type};
} else if (type === '(punctuator)' ||
Function _wrapSelectedStatements
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _wrapSelectedStatements (wrapperName, err) {
var editor = EditorManager.getActiveEditor();
if (!editor) {
return;
}
Function _getPrefType
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _getPrefType(prefItem) {
var finalPrefType = "undefined";
if (prefItem) {
Function watchPath
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function watchPath(path, ignored, _watcherMap) {
try {
var watcher = chokidar.watch(path, {
persistent: true,
ignoreInitial: true,
Function setDirectoryOpen
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ProjectModel.prototype.setDirectoryOpen = function (path, open) {
var projectRelative = this.makeProjectRelativeIfPossible(path),
needsLoading = !this._viewModel.isPathLoaded(projectRelative),
d = new $.Deferred(),
self = this;
Function flattenFactory
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function flattenFactory(iterable, depth, useKeys) {
var flatSequence = makeSequence(iterable);
flatSequence.__iterateUncached = function(fn, reverse) {
var iterations = 0;
var stopped = false;
Function _handleOtherRuntime
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _handleOtherRuntime(serverOptions) {
function _getArguments(sOptions) {
var args = [];
if (sOptions.options && sOptions.options.execArgv) {