Showing 527 of 527 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
module.exports.decode = function (value, salt) {
let decipher = crypto.createDecipher(algorithm, salt);
return decipher.update(value, 'hex', 'utf8') + decipher.final('utf8');
};
- 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 63.
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 removeIdentity
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
removeIdentity: (req, res) => {
req.admin.getIdentities('email')
.then((identities) => {
let confCount = 0,
confirmed = false;
Function list
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
dust.helpers.list = function (chunk, context, bodies, params) {
SCli.debug('lackey-cms/modules/cms/server/lib/dust/block');
return chunk.map((injectedChunk) => {
Function tweet
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
dust.helpers.tweet = function (chunk, context, bodies, params) {
let
data = context,
account = params.account + '',
Function exports
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (server) {
server.crud = function (path, name, middleware, endpoints) {
var
param = name + '_id',
singlePath = path + '/:' + param,
Function exports
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = (data) => {
let path, wrapped, templateObj;
return require('./index')
Function _preSave
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
_preSave() {
let self = this,
promise = super._preSave();
Function exports
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = (data) => {
return require('./index')
.then((media) => {
Media = media;
return Media.mapSource(data);
Function exports
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = (config, middlewares) => {
SCli.debug('lackey-cms/server/express', 'Setting up express');
// Initialize express app
Similar blocks of code found in 2 locations. Consider refactoring. Open
} else {
if (!fieldB) {
return -1;
}
if (!fieldA) {
- 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 62.
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 (direction === 'desc') {
if (!fieldA) {
return -1;
}
if (!fieldB) {
- 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 62.
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 drawSections
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawSections() {
let
context,
self = this;
Function drawTaxonomy
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawTaxonomy() {
if (!this.options.media) return;
Function bindMetaEvents
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
bindMetaEvents(responses) {
let settings = responses[0],
context = responses[2];
let self = this;
lackey
Function _postSave
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
_postSave(cached) {
let
self = this,
parent = this.constructor;
Function moduleInterface
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.moduleInterface = function (modulePath, moduleName) {
let api = {
/**
* Loads module model
Function _connectPostgres
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
_connectPostgres(connectionName, config, drop) {
let self = this;
return new Promise((resolve, reject) => {
let client = knex({
client: 'pg',
Identical blocks of code found in 2 locations. Consider refactoring. Open
lackey.bind('[data-lky-hook=table-paging]', 'click', (event, hook) => {
event.preventDefault();
var thisPage = hook.dataset.page;
self.query(thisPage);
}, nodes[0]);
- 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 61.
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
Identical blocks of code found in 2 locations. Consider refactoring. Open
lackey.bind('[data-lky-hook=table-paging]', 'click', (event, hook) => {
event.preventDefault();
var thisPage = hook.dataset.page;
self.query(thisPage);
}, nodes[0]);
- 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 61.
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
Identical blocks of code found in 2 locations. Consider refactoring. Open
items: value.items.map((item) => {
if (typeof item === 'string') {
return {
label: item,
value: item
- 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 61.
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