Showing 2,136 of 2,138 total issues
Function drawGrid
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawGrid: function(){
var v, o = this.options,
ctx = this.ctx;
if(o.grid.verticalLines || o.grid.horizontalLines){
this.el.fire('flotr:beforegrid', [this.axes.x, this.axes.y, o, this]);
Function findDataRanges
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
findDataRanges: function(){
var s = this.series,
a = this.axes;
a.x.datamin = a.x.datamax =
Function findDataRanges
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
findDataRanges: function(){
var s = this.series,
a = this.axes;
a.x.datamin = a.x.datamax =
Function drawGrid
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawGrid: function(){
var v, o = this.options,
ctx = this.ctx;
if(o.grid.verticalLines || o.grid.horizontalLines){
this.el.fire('flotr:beforegrid', [this.axes.x, this.axes.y, o, this]);
Method initialize
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(opts={})
#
# If this is not a subclass, use the default models.
#
Method generic_oauth
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
def generic_oauth
omniauth = request.env["omniauth.auth"]
origin = request.env["omniauth.origin"]
Method up
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.up
create_table :bj_config, :primary_key => "bj_config_id", :force => true do |t|
t.text :hostname
t.text :key
t.text :value
Method down
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.down
create_table :bj_config, :primary_key => "bj_config_id", :force => true do |t|
t.text :hostname
t.text :key
t.text :value
Method add_default_user
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.add_default_user(user_info)
default_password = APP_CONFIG[:password_for_default_users]
user = nil
user_by_email = nil
Method arg_block
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
def arg_block(learners)
authoring_sites = learners.select { |l| l.runnable_type == "ExternalActivity" }.map do |learner|
uri = URI(learner.runnable.url)
"#{uri.scheme}://#{uri.host}:#{uri.port}"
end
Method create_default_study_materials
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.create_default_study_materials
default_external_activities = []
@default_external_activities = default_external_activities
# External Activity
Function handleButton
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleButton (e: any) {
const { statement, material, afterChange, skipModal } = this.props;
let apiUrl: any = null;
let add = false;
Function renderInput
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderInput (name: any, titleOverride?: any) {
if (!this.state.filterables[name]) { return; }
const hits = this.state.filterables[name];
Similar blocks of code found in 2 locations. Consider refactoring. Open
if( outsets && outsets[0] ) {
p.outset = distributeSides( outsets, function( tok ) {
return tok.isLength() ? PIE.getLength( tok.tokenValue ) : tok.tokenValue;
} );
}
- 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 69.
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( widths && widths[0] ) {
p.widths = distributeSides( widths, function( tok ) {
return tok.isLengthOrPercent() ? PIE.getLength( tok.tokenValue ) : tok.tokenValue;
} );
}
- 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 69.
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
FormSerializer.serializeJSON = function serializeJSON() {
if (this.length > 1) {
return new Error("jquery-serialize-object can only serialize one form at a time");
}
return new FormSerializer($).
- 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 69.
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
FormSerializer.serializeObject = function serializeObject() {
if (this.length > 1) {
return new Error("jquery-serialize-object can only serialize one form at a time");
}
return new FormSerializer($).
- 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 69.
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
const handleCreateFormSave = async (newFormData: IPermissionFormFormData) => {
const newForm = await createNewPermissionForm(newFormData);
if (newForm) {
setCurrentSelectedProject(newForm.project_id as CurrentSelectedProject);
setShowCreateNewFormModal(false);
- 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 69.
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
@Authorized()
@Query(() => listMeta)
async _allUsersMeta(@Args() searchParams:UserPaginationAndFilter){
const count = await fuzzyCount<User>(User, 'user', searchParams);
return {count}
- 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 69.
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
@Authorized()
@Query(() => listMeta)
async _allAdminProjectsMeta(@Args() searchParams:ProjectSearch){
const count = await fuzzyCount<AdminProject>(AdminProject, 'adminProject', searchParams);
return {count}
- 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 69.
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