Showing 3,294 of 3,294 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
to: {
y: el.to.height / original.height,
x: el.to.width / original.width
}
- 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 48.
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 2 locations. Consider refactoring. Open
if(fileSize <= 2) {
subType = "Size_1_2MB";
} else if(fileSize <= 5) {
subType = "Size_2_5MB";
} else {
- 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 48.
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 2 locations. Consider refactoring. Open
it("should move point P2 on mousedown in curve", function () {
testCubicBezierClick({
item: "curve",
clickAt: translatePointFromBezierToCanvas([0.6, 1.2]),
expected: [".42", "0", ".6", "1.2"]
- 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 48.
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 _cmdUpdate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _cmdUpdate(packagePath, destinationDirectory, options, callback, pCallback) {
Function setSelection
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Editor.prototype.setSelection = function (start, end, center, centerOptions, origin) {
Function _createEditorForDocument
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _createEditorForDocument(doc, makeMasterEditor, container, range, editorOptions) {
Function Editor
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function Editor(document, makeMasterEditor, container, range, options) {
Function _getLineCommentPrefixSuffixEdit
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _getLineCommentPrefixSuffixEdit(editor, prefix, suffix, lineSel, command) {
Function _getLineCommentPrefixEdit
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _getLineCommentPrefixEdit(editor, prefixes, blockPrefix, blockSuffix, lineSel) {
Function _buildKeyDescriptor
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _buildKeyDescriptor(hasMacCtrl, hasCtrl, hasAlt, hasShift, key) {
Function _cmdDownloadFile
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _cmdDownloadFile(downloadId, url, proxy, callback, pCallback) {
Function getSessionHints
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function getSessionHints(query, cursor, type, token, $deferredHints) {
Function _find
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _find(src, match, skip, quotes, comments) {
Function LiveCSSDocument
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
var LiveCSSDocument = function LiveCSSDocument(protocol, urlResolver, doc, editor, roots) {
Function LiveDocument
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function LiveDocument(protocol, urlResolver, doc, editor, roots) {
Function _findEach
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _findEach(src, match, quotes, comments, callback) {
Function drawLine
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
drawLine: function (x1, y1, x2, y2, type) {
Function _dialogDatepicker
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
_dialogDatepicker: function(input, date, onSelect, settings, pos) {
Function FileLocation
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function FileLocation(fullPath, line, chFrom, chTo, id) {
Function toggleClass
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
toggleClass: function( classNames, force, speed, easing, callback ) {