Showing 3,294 of 3,294 total issues
Function _showImageTip
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
ImageView.prototype._showImageTip = function (e) {
// Don't show image tip if this._scale is close to zero.
// since we won't have enough room to show tip anyway.
if (Math.floor(this._scale) === 0) {
return;
Function addMenu
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addMenu(name, id, position, relativeID) {
name = _.escape(name);
var $menubar = $("#titlebar .nav"),
menu;
Function _open
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _open(doc) {
if (doc && _liveDocument && doc === _liveDocument.doc) {
if (_server) {
// Launch the URL in the browser. If it's the first one to connect back to us,
// our status will transition to ACTIVE once it does so.
Function plot
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
plot: function (settings) {
var xy = this.bezier.coordinates,
ctx = this.canvas.getContext("2d"),
setting;
Function initiateUpdateProcess
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initiateUpdateProcess(formattedInstallerPath, formattedLogFilePath, installStatusFilePath) {
// Get additional update parameters on Mac : installDir, appName, and updateDir
function getAdditionalParams() {
var retval = {};
Function _tabKeydown
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
_tabKeydown: function( event ) {
var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
selectedIndex = this.tabs.index( focusedTab ),
goingForward = true;
Function _handleDirectoryChange
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
FileSystem.prototype._handleDirectoryChange = function (directory, callback) {
var oldContents = directory._contents;
directory._clearCachedData();
directory.getContents(function (err, contents) {
Function stop
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
stop: function( type, clearQueue, gotoEnd ) {
if ( typeof type !== "string" ) {
gotoEnd = clearQueue;
clearQueue = type;
type = undefined;
Function _loadDefaultPrefs
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _loadDefaultPrefs(prefsPath, deferredPromise) {
var defaultPrefsPath = defaultPreferencesFullPath,
file = FileSystem.getFileForPath(defaultPrefsPath);
Function fileClosed
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function fileClosed(file) {
if (!file) {
return;
}
var language = LanguageManager.getLanguageForPath(file._path),
Function stringMatch
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function stringMatch(str, query, options, special) {
var result;
options = options || {};
Function skipWhileFactory
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function skipWhileFactory(iterable, predicate, context, useKeys) {
var skipSequence = makeSequence(iterable);
skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
if (reverse) {
return this.cacheResult().__iterate(fn, reverse);
Similar blocks of code found in 5 locations. Consider refactoring. Open
it("should NOT hint in case there is a space between < and tag name", function () {
// After space in < rect
testDocument.replaceRange(" ", {line: 4, ch: 5});
testEditor.setCursorPos({line: 4, ch: 11});
expectNoHints(SVGCodeHints.hintProvider);
- 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 71.
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
Function _messageHandler
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
BracketsToNodeInterface.prototype._messageHandler = function (evt, params) {
var methodName = params.method,
self = this;
function _getErrorString(err) {
Similar blocks of code found in 5 locations. Consider refactoring. Open
it("should NOT hint in an invalid tag", function () {
// After fill=" in < rect
testDocument.replaceRange(" ", {line: 4, ch: 5});
testEditor.setCursorPos({line: 4, ch: 42});
expectNoHints(SVGCodeHints.hintProvider);
- 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 71.
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
Function exports
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (grunt) {
var common = require("./lib/common")(grunt),
child_process = require("child_process"),
q = require("q"),
qexec = q.denodeify(child_process.exec),
Similar blocks of code found in 5 locations. Consider refactoring. Open
it("should NOT hint after first character in an invalid tag", function () {
// After < r in first < rect
testDocument.replaceRange(" ", {line: 4, ch: 5});
testEditor.setCursorPos({line: 4, ch: 7});
expectNoHints(SVGCodeHints.hintProvider);
- 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 71.
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 5 locations. Consider refactoring. Open
it("should NOT hint if we have whitespace between attribute and =", function () {
// Before = in <rect width =
testDocument.replaceRange(" ", {line: 4, ch: 15});
testEditor.setCursorPos({line: 4, ch: 16});
expectNoHints(SVGCodeHints.hintProvider);
- 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 71.
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
Function updateResultSet
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateResultSet(editor) {
var cm = editor._codeMirror,
state = getSearchState(cm);
function indicateHasMatches(numResults) {
Similar blocks of code found in 5 locations. Consider refactoring. Open
it("should NOT hint in the middle of invalid tag", function () {
// After < rec in < rect
testDocument.replaceRange(" ", {line: 4, ch: 5});
testEditor.setCursorPos({line: 4, ch: 9});
expectNoHints(SVGCodeHints.hintProvider);
- 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 71.
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