Showing 12 of 87 total issues
Function exports
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
// // needed since ember 1.10.0
// // cf. https://github.com/rwjblue/components-in-subdirs/commit/78e7ed2d072f42d9cf0fd3d9fc2376f106ab762e
// vendorFiles: {
File translations.js
has 261 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export default {
// common
cancel: 'Annuler',
chooseImage: 'Choisir image',
close: 'Fermer',
File translations.js
has 259 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export default {
// common
cancel: 'Cancel',
chooseImage: 'Choose image',
close: 'Close',
Function initEditor
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
initEditor: function() {
var settings = {
theme_url: '/tinymce/themes/modern/theme.min.js',
skin_url: '/tinymce/skins/lightgray',
external_plugins: {
Function setUnknownProperty
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
setUnknownProperty: function(key, value){
var prop;
var ckey;
if(key.indexOf("textField") === 0) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _initDatepicker
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_initDatepicker: Ember.on('didInsertElement', function() {
var target;
var self = this;
if (this.get('noIcon')) {
var targetClassNames = '.'+ this.get('textFieldClassNames').join('.');
Function initialize
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
initialize: function (container) {
// custom session class
container.register('session:kowa', AuthSession);
// SimpleAuth
Function default
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function(){
// settings.contact
this.transition(
this.fromRoute('settings.contact.index'),
this.toRoute('settings.contact.page'),
Function setUnknownProperty
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setUnknownProperty: function(key, value){
var prop;
var ckey;
if(key.indexOf("textField") === 0) {
Function uploadImage
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
uploadImage: function(file, index) {
var job = new UploadJob({
url: this.get('uploadUrl'),
file: file
});
Avoid too many return
statements within this function. Open
Open
return statusResult;
Function orderBy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
orderBy: function (item1, item2) {
var updated1 = item1.get('updatedAt'),
updated2 = item2.get('updatedAt');
if (item1.get('isNew') || !updated1) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"