Showing 3,294 of 3,294 total issues
Function normalizeKeyDescriptorString
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
function normalizeKeyDescriptorString(origDescriptor) {
var hasMacCtrl = false,
hasCtrl = false,
hasAlt = false,
hasShift = false,
Function diff
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
function diff( o, n ) {
var i,
ns = {},
os = {};
Function dispatch
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
dispatch: function( event ) {
// Make a writable jQuery.Event from the native event object
event = jQuery.event.fix( event || window.event );
Function load
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
QUnit.load = function() {
runLoggingCallbacks( "begin", QUnit, {} );
// Initialize the config, saving the execution queue
var banner, filter, i, label, len, main, ol, toolbar, userAgent, val,
Function getHints
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
AttrHints.prototype.getHints = function (implicitChar) {
var cursor = this.editor.getCursorPos(),
query = {queryStr: null},
tokenType,
offset,
Function insertHint
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
CssPropHints.prototype.insertHint = function (hint) {
var offset = this.info.offset,
cursor = this.editor.getCursorPos(),
start = {line: -1, ch: -1},
end = {line: -1, ch: -1},
Function getAllScopes
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getAllScopes(ast, scope, fullText) {
var curScope = scope;
var cnt = 0;
var scopes = [];
Function render
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function () {
var entry = this.props.entry,
nodeClass,
childNodes,
children = entry.get("children"),
Function setMatcher
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
if ( postFilter && !postFilter[ expando ] ) {
postFilter = setMatcher( postFilter );
}
if ( postFinder && !postFinder[ expando ] ) {
File main.js
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright (c) 2015 - 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 validateCallback
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function validateCallback(err, validationResult) {
validationResult.localPath = packagePath;
// This is a wrapper for the callback that will delete the temporary
// directory to which the package was unzipped.
Function insertHint
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
PrefsCodeHints.prototype.insertHint = function (completion) {
var ctxInfo = JSONUtils.getContextInfo(this.editor, this.editor.getCursorPos(), false, true),
pos = this.editor.getCursorPos(),
start = {line: -1, ch: -1},
end = {line: -1, ch: -1},
Function CSSPreprocessorDocumentModule
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
define(function CSSPreprocessorDocumentModule(require, exports, module) {
"use strict";
var _ = require("thirdparty/lodash"),
EventDispatcher = require("utils/EventDispatcher"),
Function init
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function( selector, context, rootjQuery ) {
var match, elem, ret, doc;
// Handle $(""), $(null), or $(undefined)
if ( !selector ) {
Function _receive
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
NodeConnection.prototype._receive = function (message) {
var responseDeferred = null;
var data = message.data;
var m;
Method writeDocument
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
def writeDocument
@out.write <<-eos
<!DOCTYPE html>
<html>
<head>
Similar blocks of code found in 4 locations. Consider refactoring. Open
it("should NOT list hints on incomplete tag, at end of tag name", function () {
testEditor.setCursorPos({ line: 9, ch: 5 }); // end of tag name
expectNoHints(HTMLCodeHints.attrHintProvider);
testEditor.setCursorPos({ line: 9, ch: 6 }); // within tag name
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 87.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
this.element.siblings( ":visible" ).each(function() {
var elem = $( this ),
position = elem.css( "position" );
if ( position === "absolute" || position === "fixed" ) {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 87.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
it("should NOT list hints within text content or whitespace", function () {
testEditor.setCursorPos({ line: 5, ch: 0 }); // whitespace
expectNoHints(HTMLCodeHints.attrHintProvider);
testEditor.setCursorPos({ line: 5, ch: 18 }); // plain text content
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 87.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
File FindUtils.js
has 275 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright (c) 2014 - 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"),