Showing 2,136 of 2,138 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
return (
<li key={gradeLevel.key} id={css[filterId]} className={className} onClick={clicked}>
{ gradeLevel.title }
</li>
);
- 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 58.
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
return (
<li key={subjectArea.key} id={css[filterId]} className={className} onClick={clicked}>
{ subjectArea.title }
</li>
);
- 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 58.
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(() => [PortalPermissionForm])
async allPortalPermissionForms(@Args() searchParams:PermissionSearch) {
return await fuzzyFetch<PortalPermissionForm>(PortalPermissionForm, 'portalPermissionForm', searchParams);
}
- 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 58.
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(() => [User])
async allUsers(@Args() searchParams:UserPaginationAndFilter) {
return await fuzzyFetch<User>(User, 'user', searchParams);
}
- 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 58.
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(() => [PortalStudent])
async allPortalStudents(@Args() searchParams:PortalStudentPaginationAndFilter) {
return await fuzzyFetch<PortalStudent>(PortalStudent, 'PortalStudent', searchParams);
}
- 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 58.
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 draw
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
draw: function() {
var me = this,
props = me.styleInfos.backgroundInfo.getProps(),
bg, images, i = 0, img, bgAreaSize, bgSize;
Function calculateRange
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
calculateRange: function(axis){
var o = axis.options,
min = o.min != null ? o.min : axis.datamin,
max = o.max != null ? o.max : axis.datamax,
margin;
Function calculateRange
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
calculateRange: function(axis){
var o = axis.options,
min = o.min != null ? o.min : axis.datamin,
max = o.max != null ? o.max : axis.datamax,
margin;
Function results_option_build
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
AbstractChosen.prototype.results_option_build = function(options) {
var content, data, data_content, shown_results, _i, _len, _ref;
content = '';
shown_results = 0;
_ref = this.results_data;
Function scroll
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
scroll: function() {
var current = new Date();
var delta = current - this.lastScrolled;
this.lastScrolled = current;
if(this.options.scroll == window) {
Function add_option
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
if (option.nodeName.toUpperCase() === "OPTION") {
if (option.text !== "") {
if (group_position != null) {
this.parsed[group_position].children += 1;
Method index
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def index
authorize Interactive
search_params = {
:material_types => [Search::InteractiveMaterial],
Method index
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def index
authorize User
user_type_conditions = []
Method remove_favorite
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def remove_favorite
if !current_user || current_user.anonymous?
render json: {:message => "Cannot remove favorite for non-logged in user."}, :status => 400
return
Method accordion_for
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def accordion_for(model, title, dom_prefix='', options={})
show_hide_text = options[:show_hide_text]
capture_haml do
haml_tag :div, :id => dom_id_for(model, dom_prefix), :class => 'accordion_container' do
haml_tag :div, :class => 'accordion_name' do
Method show
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def show
type = params[:material_type]
id = params[:id]
include_related = params.has_key?(:include_related) ?
Function main
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function main() {
// Connect to TypeOrm DB
await createConnection()
const schema = await buildSchema({
nullableByDefault: true,
Method up
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def up
create_table :admin_cohorts do |t|
t.integer :project_id
t.string :name
end
Function getGroupedDiv
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getGroupedDiv = function (groupMap: any, heading: any) {
if (Object.keys(groupMap).length > 0) {
//
// For each statement display:
//
Function renderLink
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderLink (linkDef: any) {
const { popOut, iconName, label, url, onClick } = linkDef;
const { location } = this.state;
const target = popOut ? "_blank" : "_self";
const icon = popOut && iconName !== "icon-help" ? "icon-arrow-circle-right" : iconName;