codeRIT/hackathon_manager

View on GitHub

Showing 147 of 151 total issues

File questionnaire.rb has 437 lines of code (exceeds 250 allowed). Consider refactoring.
Open

class Questionnaire < ApplicationRecord
audited
 
include ActiveModel::Dirty
include DeletableAttachment
Severity: Minor
Found in app/models/questionnaire.rb - About 6 hrs to fix

    Function validate has 157 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    $.fn.validate = function(option) {
    var previous_invalid_inputs = [];
     
    var validateInput = function() {
    var success = true,
    Severity: Major
    Found in app/assets/javascripts/validate.js - About 6 hrs to fix

      Function render has 152 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      render() {
      const { config: siteConfig, language = '' } = this.props;
      const { baseUrl } = siteConfig;
       
      const Block = props => (
      Severity: Major
      Found in website/pages/en/index.js - About 6 hrs to fix

        Function setupDataTables has 133 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var setupDataTables = function () {
        $('.datatable.checkins').DataTable({
        order: [1, 'asc'],
        columns: [
        { orderable: true, data: 'first_name', visible: false },
        Severity: Major
        Found in app/assets/javascripts/manage/lib/setupDataTables.js - About 5 hrs to fix

          Function transform has a Cognitive Complexity of 28 (exceeds 7 allowed). Consider refactoring.
          Open

          transform: (commit, context) => {
          let discard = true;
          const issues = [];
           
          commit.notes.forEach(note => {
          Severity: Minor
          Found in release.config.js - About 3 hrs to fix

          Method check_in has a Cognitive Complexity of 27 (exceeds 7 allowed). Consider refactoring.
          Open

          def check_in
          respond_to do |format|
          format.json do
          if params[:check_in] == "true"
          check_in_attendee
          Severity: Minor
          Found in app/controllers/manage/questionnaires_controller.rb - About 3 hrs to fix

          Function validateInput has 81 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var validateInput = function() {
          var success = true,
          types = $(this)
          .data('validate')
          .split(/[ ,]+/),
          Severity: Major
          Found in app/assets/javascripts/validate.js - About 3 hrs to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            const showcase = siteConfig.users.map(user => (
            <a href={user.infoLink} key={user.infoLink}>
            <img src={user.image} alt={user.caption} title={user.caption} />
            </a>
            ));
            Severity: Major
            Found in website/pages/en/index.js and 1 other location - About 3 hrs to fix
            website/pages/en/users.js on lines 22..26

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            const showcase = siteConfig.users.map(user => (
            <a href={user.infoLink} key={user.infoLink}>
            <img src={user.image} alt={user.caption} title={user.caption} />
            </a>
            ));
            Severity: Major
            Found in website/pages/en/users.js and 1 other location - About 3 hrs to fix
            website/pages/en/index.js on lines 220..224

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            columns: [
            { orderable: true, data: 'id', visible: false },
            { orderable: true, data: 'first_name' },
            { orderable: true, data: 'last_name' },
            { orderable: true, data: 'email' },
            Severity: Major
            Found in app/assets/javascripts/manage/lib/setupDataTables.js and 1 other location - About 3 hrs to fix
            app/assets/javascripts/manage/lib/setupDataTables.js on lines 142..150

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            columns: [
            { orderable: true, data: 'id', visible: false },
            { orderable: true, data: 'first_name' },
            { orderable: true, data: 'last_name' },
            { orderable: true, data: 'email' },
            Severity: Major
            Found in app/assets/javascripts/manage/lib/setupDataTables.js and 1 other location - About 3 hrs to fix
            app/assets/javascripts/manage/lib/setupDataTables.js on lines 116..124

            Function transform has 69 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            transform: (commit, context) => {
            let discard = true;
            const issues = [];
             
            commit.notes.forEach(note => {
            Severity: Major
            Found in release.config.js - About 2 hrs to fix

              Function wizard has 62 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              $.fn.wizard = function() {
              var form = this;
               
              var goToStage = function($newStage) {
              $(form)
              Severity: Major
              Found in app/assets/javascripts/wizard.js - About 2 hrs to fix

                Method generate__sponsor_dump has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                def generate__sponsor_dump(data_export, attendee_type)
                print data_export.file.name
                 
                case attendee_type
                when "rsvp_confirmed"
                Severity: Major
                Found in app/jobs/generate_data_export_job.rb - About 2 hrs to fix

                  Block has too many lines. [50/25]
                  Open

                  Dir.mktmpdir("data-export") do |dir|
                  folder_path = File.join(dir, data_export.file_basename)
                  Dir.mkdir(folder_path)
                  zipfile_name = "#{data_export.file_basename}.zip"
                  zipfile_path = File.join(dir, zipfile_name)

                  Function initMap has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  $.fn.initMap = function() {
                  if (!this || this.length == 0) {
                  return;
                  }
                   
                   
                  Severity: Major
                  Found in app/assets/javascripts/manage/map.js - About 2 hrs to fix

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

                    render() {
                    const { siteConfig, language = '' } = this.props;
                    const { baseUrl, docsUrl } = siteConfig;
                    const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`;
                    const langPart = `${language ? `${language}/` : ''}`;
                    Severity: Major
                    Found in website/pages/en/index.js - About 2 hrs to fix

                      Function bulkRowEdit has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      $.fn.bulkRowEdit = function() {
                      var applyAction = function() {
                      $('[type=submit][data-bulk-row-edit]').prop('disabled', true);
                       
                      var ids = [];
                      Severity: Minor
                      Found in app/assets/javascripts/manage/lib/jquery.bulkRowedit.js - About 2 hrs to fix

                        Perceived complexity for check_in is too high. [12/10]
                        Open

                        def check_in
                        respond_to do |format|
                        format.json do
                        if params[:check_in] == "true"
                        check_in_attendee

                        Cyclomatic complexity for activity_chart_data is too high. [11/10]
                        Open

                        def activity_chart_data(types, group_type, range, where_filter = nil)
                        chart_data = []
                        types.each do |type|
                        case type
                        when "Applications"
                        Severity
                        Category
                        Status
                        Source
                        Language