Showing 6,062 of 6,062 total issues
Function init
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
init: function (el, values, options, width, height) {
- Create a ticketCreate a ticket
Function _drawShape
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
_drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {
- Create a ticketCreate a ticket
Function init
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
init: function (el, values, options, width, height) {
- Create a ticketCreate a ticket
Function init
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
init: function (el, values, options, width, height) {
- Create a ticketCreate a ticket
Function init
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
init: function (el, values, options, width, height) {
- Create a ticketCreate a ticket
Function init
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
init: function (el, values, options, width, height) {
- Create a ticketCreate a ticket
Function _drawShape
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
_drawShape: function (shapeid, path, lineColor, fillColor, lineWidth) {
- Create a ticketCreate a ticket
Function add
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
add: function (id, content, config, tags, append) {
- Create a ticketCreate a ticket
Function renderFileActions
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
renderFileActions: function (showUpload, showDelete, disabled, url, key) {
- Create a ticketCreate a ticket
Method allocate_ip
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def allocate_ip(bc_instance, network, range, name, suggestion = nil)
- Create a ticketCreate a ticket
Function actions
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
actions: function (showUpload, showDelete, disabled, url, key) {
- Create a ticketCreate a ticket
Method allocate_virtual_ip
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def allocate_virtual_ip(bc_instance, network, range, service, suggestion = nil)
- Create a ticketCreate a ticket
Method setup_interface
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def setup_interface(switch_config, a_node, conduit, switch_name, interface_id )
- Create a ticketCreate a ticket
Function set
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
set: function (id, content, config, tags, append) {
- Create a ticketCreate a ticket
Function previewFile
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
previewFile: function (i, file, theFile, previewId, data) {
- Create a ticketCreate a ticket
Method relevant_attributes_changed_if_roles?
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def relevant_attributes_changed_if_roles?(node, old_role, new_role, ignore_attr, only_for_roles)
- Create a ticketCreate a ticket
Method render_instance_selector
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def render_instance_selector(bc, name, label, field, proposal)
- Create a ticketCreate a ticket
Method migrate_object
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.migrate_object(bc_name, template, all_scripts, attributes, deployment)
- Create a ticketCreate a ticket
Method migrate_proposal
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.migrate_proposal(bc_name, validator, template, all_scripts, proposal)
- Create a ticketCreate a ticket
Similar blocks of code found in 3 locations. Consider refactoring. Open
$.fn.removeJsonAttribute = function(key, value, type) {
var attribute = new JsonAttribute(this);
return attribute.remove(key, value, type)
};
- Read upRead up
- Create a ticketCreate a ticket
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 47.
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