Showing 1,029 of 1,029 total issues
File jquery.tablesorter.widgets.js
has 2201 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*** This file is dynamically generated ***
█████▄ ▄████▄ █████▄ ▄████▄ ██████ ███████▄ ▄████▄ █████▄ ██ ██████ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀▀██
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
Similar blocks of code found in 3 locations. Consider refactoring. Open
models.Commit.create({
branch: 'release',
pullRequest: false,
latest: false,
commit: 'n839vt90289138uv01861834u509345',
- 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 291.
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 3 locations. Consider refactoring. Open
models.Commit.create({
branch: 'feature',
pullRequest: true,
latest: true,
commit: '943gqireavg3qireab3i4quhreh32r4',
- 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 291.
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 3 locations. Consider refactoring. Open
models.Commit.create({
branch: 'develop',
pullRequest: false,
latest: true,
commit: '79283i4rgh983h4owaadfalh8394894',
- 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 291.
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 seed
has 188 lines of code (exceeds 25 allowed). Consider refactoring. Open
var seed = function () {
models.Repo.create({
repo: 1234567,
repoName: 'test/one',
defaultBranch: 'release',
Function findRows
has 179 lines of code (exceeds 25 allowed). Consider refactoring. Open
findRows: function( table, filters, combinedFilters ) {
if ( table.config.lastCombinedFilter === combinedFilters ||
!table.config.widgetOptions.filter_initialized ) {
return;
}
Function init
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function( table, c, wo ) {
// filter language options
ts.language = $.extend( true, {}, {
to : 'to',
or : 'or',
Function format
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
format: function(table, c, wo) {
// filter widget doesn't initialize on an empty table. Fixes #449
if ( c.$table.hasClass('hasStickyHeaders') || ($.inArray('filter', c.widgets) >= 0 && !c.$table.hasClass('hasFilters')) ) {
return;
}
Function processRow
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
processRow: function( c, data, vars ) {
var columnIndex, hasSelect, result, val, filterMatched,
fxn, ffxn, txt,
regex = ts.filter.regex,
wo = c.widgetOptions,
Function format
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
format: function(table, c, wo) {
var i, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
themesAll = ts.themes,
$table = c.$table.add( $( c.namespace + '_extra_table' ) ),
$headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
Consider simplifying this complex logical expression. Open
if ( searchFiltered ) {
// cycle through all filters; include last ( columnIndex + 1 = match any column ). Fixes #669
for ( indx = 0; indx < columnIndex + 1; indx++ ) {
val = filters[indx] || '';
// break out of loop if we've already determined not to search filtered rows
Function getFilters
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
ts.getFilters = function( table, getRaw, setFilters, skipFirst ) {
var i, $filters, $column, cols,
filters = false,
c = table ? $( table )[0].config : '',
wo = c ? c.widgetOptions : '';
Function buildRow
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildRow: function( table, c, wo ) {
var col, column, $header, buildSelect, disabled, name, ffxn, tmp,
// c.columns defined in computeThIndexes()
cellFilter = wo.filter_cellFilter,
columns = c.columns,
Function getOptionSource
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
getOptionSource: function( table, column, onlyAvail ) {
table = $( table )[0];
var cts, txt, indx, len,
c = table.config,
wo = c.widgetOptions,
Function bindings
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
bindings : function( c, wo ) {
var namespace = c.namespace + 'tsresize';
wo.$resizable_container.children().bind( 'mousedown', function( event ) {
// save header cell and mouse position
var column,
Function buildSelect
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildSelect: function( table, column, arry, updating, onlyAvail ) {
table = $( table )[0];
column = parseInt( column, 10 );
if ( !table.config.cache || $.isEmptyObject( table.config.cache ) ) {
return;
Function init
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
init : function( c, wo ) {
if ( c.$table.hasClass( 'hasResizable' ) ) { return; }
c.$table.addClass( 'hasResizable' );
var noResize, $header, column, storedSizes, tmp,
Function exports
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(sequelize, DataTypes) {
var Commit = sequelize.define('Commit', {
branch: {
type: DataTypes.STRING
},
Consider simplifying this complex logical expression. Open
if (!$table.hasClass('tablesorter-' + theme) || c.theme !== c.appliedTheme || !wo.uitheme_applied) {
wo.uitheme_applied = true;
oldtheme = themesAll[c.appliedTheme] || {};
hasOldTheme = !$.isEmptyObject(oldtheme);
oldremove = hasOldTheme ? [ oldtheme.sortNone, oldtheme.sortDesc, oldtheme.sortAsc, oldtheme.active ].join( ' ' ) : '';
Function make
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.make = function (req, res){
models.Repo.findOne({
where: {
repoName: req.params.account+'/'+req.params.repo,
},