Showing 43 of 1,450 total issues
Function _init
has 262 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _init() {
'use strict';
/* Layout
* ======
* Fixes the layout height in case min-height fails.
File livremarketplace.js
has 542 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/******************************************************************************
* livremarketplace.js
*
* Copyright 2016 Marcos Salomão
*
Function _init
has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring. Open
Open
function _init() {
'use strict';
/* Layout
* ======
* Fixes the layout height in case min-height fails.
- 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
File vendor.min.js
has 455 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// http://stackoverflow.com/questions/19329530/onresize-for-div-elements
(function(){
var attachEvent = document.attachEvent;
Function loadPage
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadPage : function() {
$('table.table-purchases').fadeOut();
// Aplicar i18n
Function loadPage
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadPage : function() {
// Aplicar i18n
$('span.tab_list').text(messages.sale.tab.list);
$('span.tab_save').text(messages.sale.tab.save);
Function loadTable
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadTable : function(_data) {
// Construir tabela
$('table.table-purchases').bootstrapTable({
uniqueId : 'id',
File purchase.js
has 346 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/******************************************************************************
* purchase.js
*
* Copyright 2016 Marcos Salomão
*
Function getMenus
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getMenus : function() {
return [
{
header : messages.menu.header.management
},
Function bindTable
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
bindTable : function(_data) {
// Construir tabela
$('table.table-sales').bootstrapTable({
uniqueId: 'id',
Function maps
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.maps = function(options) {
var element = $(this);
// Verificar se o elemento já não está carregado
Function loadPage
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadPage : function() {
// Aplicar i18n
$('span.tab_list').text(messages.supplier.tab.list);
$('span.tab_save').text(messages.supplier.tab.save);
Function loadPage
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadPage : function() {
// Aplicar i18n
$('span.tab_list').text(messages.customer.tab.list);
$('span.tab_save').text(messages.customer.tab.save);
File sale.js
has 259 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/******************************************************************************
* sale.js
*
* Copyright 2016 Marcos Salomão
*
Function $elect
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.$elect = function(selectOptions) {
// Init validation
if (!selectOptions || !selectOptions.search || !selectOptions.formatData) {
console.warning('$elect initialized inappropriately');
Function initLayout
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.AdminLTE.initLayout = function() {
//Fix for IE page transitions
$("body").removeClass("hold-transition");
Function bindTable
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
bindTable : function(_data) {
// Construir tabela
$('table.table-products').bootstrapTable({
uniqueId : 'id',
Function frete
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def frete(self, cod, GOCEP, HERECEP, peso, formato,
Function openMenu
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
openMenu : function(menu) {
$('section.content').hide();
// Definir o icon
Function loadPage
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadPage : function() {
// Carregar a lista de produtos
$.product.view.loadTable();