Showing 570 of 1,380 total issues
Function onSubmit
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
onSubmit = () => {
loading(true);
m.redraw();
vm.uploadImage(vnode.attrs.projectId).then(() => {
vm.updateProject(vnode.attrs.projectId).then(() => {
Function validate
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
validate = () => {
vnode.attrs.error(false);
vnode.attrs.errors('Erro ao salvar informações. Confira os dados informados.');
descriptionError(false);
minimumValueError(false);
Function animateProgress
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
animateProgress = localVnode => {
let animation,
progress = 0,
pledged = 0,
contributors = 0;
Function sendReport
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
sendReport = (validateFunction) => {
if (!validateFunction()) {
return false;
}
submitDisabled(true);
Function lookup
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
I18n.lookup = function(scope, options) {
options = this.prepareOptions(options);
var locales = this.locales.get(options.locale).slice()
, requestedLocale = locales[0]
Function loadRewards
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function loadRewards() {
await rewardVM.fetchRewards(attrs.project_id)
rewards([]);
Function view
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const project = state.projectDetail();
const projectFiscalData = state.projectFiscalData();
const loading = state.l() || state.l2();
const hasData = !loading && projectFiscalData && (!_.isEmpty(projectFiscalData.debit_notes) || !_.isEmpty(projectFiscalData.informs));
- 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 view
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
view({ state, attrs }) {
const GATrackingID = state.GATrackingID;
const FBPixelTrackingID = state.FBPixelTrackingID;
const save = state.save;
- 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 oninit
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
oninit: function (vnode) {
const filterVM = projectsSubscriptionReportVM,
catarseVM = projectsContributionReportVM,
dropdownNumber = prop(0),
error = prop(false),
- 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 oninit
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
const {
ViewContentEvent,
PurchaseEvent
} = projectVM;
- 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 view
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const project = state.project;
if (_.isEmpty(project())) {
return h.loader();
}
- 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 view
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const list = attrs.vm.list,
error = attrs.vm.error,
label = attrs.label || '',
itemComponent = attrs.itemComponent || adminItem;
- 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 oninit
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
oninit: function (vnode) {
const
firstValue = prop(0),
secondValue = prop(0),
clearFieldValues = () => { firstValue(0), secondValue(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 view
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const data = attrs.data,
btnValue = (state.l()) ? 'por favor, aguarde...' : data.callToAction;
return m('.w-col.w-col-2', [
- 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 view
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
let user = attrs.user,
fields = state.fields,
bankAccount = state.bankAccount();
- 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 view
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const project = attrs.project;
const projectOwnerName = project.user ? (project.user.public_name || project.user.name) : (project.owner_public_name || project.owner_name);
const projectLocalizationObject = {
- 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 trialsToGetPaymentInfo
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
const trialsToGetPaymentInfo = (p, catalog_payment_id, retries) => {
if (retries > 0) {
paymentInfo(catalog_payment_id).then((infoR) => {
if (_.isNull(infoR.gateway_payment_method) || _.isUndefined(infoR.gateway_payment_method)) {
if (!_.isNull(infoR.gateway_errors)) {
- 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 view
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const data = attrs.data,
item = attrs.item(),
btnValue = (state.setLoader() || state.getLoader()) ? 'por favor, aguarde...' : data.callToAction;
- 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 view
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
view: function({ state, attrs }) {
if (h.userSignedIn() && h.getUserID() != attrs.follow_id) {
let disableClass = attrs.disabledClass || '.w-button.btn.btn-medium.btn-terciary.u-margintop-20',
enabledClass = attrs.enabledClass || '.w-button.btn.btn-medium.u-margintop-20';
if (state.loading()) {
- 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 view
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const buttonLabel = state.isSubscriptionEdit() && !attrs.isReactivation() ? window.I18n.t('subscription_edit', I18nScope()) : window.I18n.t('pay_slip', I18nScope());
return m('.w-row',
m('.w-col.w-col-12',
- 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"