catarse/catarse.js

View on GitHub

Showing 570 of 1,380 total issues

Function view has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    view({attrs, state} : m.Vnode<UserInfoEditAttrs, UserInfoEditState>) {
        const user = attrs.user
        const save = attrs.save
        const isSaving = attrs.isSaving
        const hasErrorOn = attrs.hasErrorOn
Severity: Major
Found in legacy/src/root/projects/publish-by-steps/user-info-edit.tsx - About 2 hrs to fix

    Function oninit has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        oninit: function(vnode) {
    
            const {
                ViewContentEvent,
                SubscribeEvent
    Severity: Major
    Found in legacy/src/root/projects-subscription-thank-you.js - About 2 hrs to fix

      Function view has 57 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          view: function() {
              return m('div', [
                  m('.modal-dialog-header', [
                      m('.fontsize-large.u-text-center',
                          'Status da entrega')
      Severity: Major
      Found in legacy/src/c/project-contribution-delivery-legend-modal.js - About 2 hrs to fix

        Function view has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
        Open

            view: function({state, attrs}) {
                const user = state.userDetails();
        
                return m('div', [
                    m(userHeader, {
        Severity: Minor
        Found in legacy/src/root/users-edit.js - About 2 hrs to fix

        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 17 (exceeds 5 allowed). Consider refactoring.
        Open

            view({state}) {
                const project = _.first(state.projectDetails());
                const reward = _.first(state.reward());
                return [
                    project ? 
        Severity: Minor
        Found in legacy/src/root/survey-create.js - About 2 hrs to fix

        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 17 (exceeds 5 allowed). Consider refactoring.
        Open

            oninit: function(vnode) {
                const goal = vnode.attrs.goal(),
                    project = vnode.attrs.project,
                    descriptionError = prop(false),
                    titleError = prop(false),
        Severity: Minor
        Found in legacy/src/c/project-goal-edit-card.js - About 2 hrs to fix

        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 17 (exceeds 5 allowed). Consider refactoring.
        Open

            view: function ({ state, attrs }) {
                const balance = attrs.balance;
                const fields = state.fields;
                const bankCode = state.bankCode;
                const user = attrs.user;
        Severity: Minor
        Found in legacy/src/c/user-balance-request-modal-content.js - About 2 hrs to fix

        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 17 (exceeds 5 allowed). Consider refactoring.
        Open

            oninit: function(vnode) {
                const builder = vnode.attrs.data,
                    complete = prop(false),
                    data = {},
                    error = prop(false),
        Severity: Minor
        Found in legacy/src/c/admin-radio-action.js - About 2 hrs to fix

        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 56 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            oninit: function(vnode) {
                const parsedErrors = vnode.attrs.parsedErrors;
                const statesLoader = catarse.loader(models.state.getPageOptions()),
                    defaultCountryID = addressVM.defaultCountryID,
                    defaultForeignCountryID = addressVM.defaultForeignCountryID,
        Severity: Major
        Found in legacy/src/c/address-form.js - About 2 hrs to fix

          Function oninit has 56 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              oninit: function(vnode) {
                  const templates = commonNotification.paginationVM(
                      models.notificationTemplates, 'label.asc'),
                      loaderTemp = prop(true),
                      loaderSubmit = prop(false),
          Severity: Major
          Found in legacy/src/root/admin-notifications.js - About 2 hrs to fix

            Function oninit has 56 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                oninit: function(vnode) {
                    const showSelectedMenu = h.toggleProp(false, true),
                        selectedAny = prop(false),
                        showSuccess = prop(false),
                        loading = prop(false),
            Severity: Major
            Found in legacy/src/c/project-contribution-report-content.js - About 2 hrs to fix

              Function sendSlipPayment has 56 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const sendSlipPayment = (fields, commonData) => {
                  fields.isLoading(true);
                  m.redraw();
              
                  const customer = fields.fields;
              Severity: Major
              Found in legacy/src/vms/common-payment-vm.js - About 2 hrs to fix

                Function locationOptions has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const locationOptions = (reward, destination) => {
                    const options = prop([]),
                        mapStates = _.map(states(), state => {
                            let fee;
                            const feeState = _.findWhere(fees(), {
                Severity: Major
                Found in legacy/src/vms/reward-vm.js - About 2 hrs to fix

                  Function reportRunnerStarting has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  jasmine.reporting.StyledHtmlReporter.prototype.reportRunnerStarting = function(runner) {
                    var showPassed, showSkipped;
                  
                    this.outerDiv = this.createDom('div', { className: 'jasmine_reporter' },
                        this.createDom('div', { className: 'banner' },
                  Severity: Major
                  Found in legacy/spec/lib/jasmine-species/jasmine-reporting.js - About 2 hrs to fix

                    Function oninit has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            oninit: function (vnode) {
                    
                                try {
                                    if (firstRun) {
                                        firstRun = false;
                    Severity: Major
                    Found in legacy/src/wrap.js - About 2 hrs to fix

                      Function oninit has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          oninit: function(vnode) {
                              const checkedList = prop([]),
                                  loading = prop(false),
                                  filterTerm = prop(''),
                                  filteredData = prop(vnode.attrs.dataEmails()),
                      Severity: Major
                      Found in legacy/src/c/invite-emails-from-import.js - About 2 hrs to fix

                        Function generateErrorInstance has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const generateErrorInstance = () => {
                            const fields = prop([]);
                            const submissionError = prop(false);
                            const submissionErrorMsg = prop('');
                            const fieldIdxValue = (fieldName, idx, initialValue) => _.reduce(fields(), (memo, field) => field[0] === fieldName ? field[idx] : memo, initialValue);
                        Severity: Major
                        Found in legacy/src/error.js - About 2 hrs to fix

                          Function RequestStub has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            function RequestStub(url, stubData, method) {
                              var normalizeQuery = function(query) {
                                return query ? query.split('&').sort().join('&') : undefined;
                              };
                          
                          
                          Severity: Major
                          Found in legacy/spec/lib/jasmine-ajax/mock-ajax.js - About 2 hrs to fix

                            Function oninit has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                oninit(vnode) {
                                    
                                    h.scrollTop();
                                    const currentUser = h.getUser() || {};
                                    const hasFBAuth = currentUser.has_fb_auth;
                            Severity: Major
                            Found in legacy/src/root/projects-explore.ts - About 2 hrs to fix

                              Function reloadSelectOptions has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                          reloadSelectOptions = projectState => {
                                              let opts = [
                                                  {
                                                      value: '',
                                                      option: 'Todos',
                              Severity: Major
                              Found in legacy/src/root/projects-contribution-report.js - About 2 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language