MidnightRiders/MemberPortal

View on GitHub

Showing 4,113 of 4,113 total issues

Line is too long. [235/140] (https://rubystyle.guide#max-line-length)
Open

      user_params.permit(:last_name, :first_name, :last_name, :address, :city, :state, :postal_code, :phone, :email, :member_since, :username, :password, :password_confirmation, :current_password, memberships: %i(year type privileges))

Checks the length of lines in the source code. The maximum length is configurable. The tab size is configured in the IndentationWidth of the Layout/IndentationStyle cop. It also ignores a shebang line by default.

This cop has some autocorrection capabilities. It can programmatically shorten certain long lines by inserting line breaks into expressions that can be safely split across lines. These include arrays, hashes, and method calls with argument lists.

If autocorrection is enabled, the following Layout cops are recommended to further format the broken lines. (Many of these are enabled by default.)

  • ArgumentAlignment
  • ArrayAlignment
  • BlockAlignment
  • BlockDelimiters
  • BlockEndNewline
  • ClosingParenthesisIndentation
  • FirstArgumentIndentation
  • FirstArrayElementIndentation
  • FirstHashElementIndentation
  • FirstParameterIndentation
  • HashAlignment
  • IndentationWidth
  • MultilineArrayLineBreaks
  • MultilineBlockLayout
  • MultilineHashBraceLayout
  • MultilineHashKeyLineBreaks
  • MultilineMethodArgumentLineBreaks
  • MultilineMethodParameterLineBreaks
  • ParameterAlignment

Together, these cops will pretty print hashes, arrays, method calls, etc. For example, let's say the max columns is 25:

Example:

# bad
{foo: "0000000000", bar: "0000000000", baz: "0000000000"}

# good
{foo: "0000000000",
bar: "0000000000", baz: "0000000000"}

# good (with recommended cops enabled)
{
  foo: "0000000000",
  bar: "0000000000",
  baz: "0000000000",
}

Line is too long. [235/140] (https://rubystyle.guide#max-line-length)
Open

      (mot_m_firsts.select { |x| x.match.season == params[:season] }.length * 3) + (mot_m_seconds.select { |x| x.match.season == params[:season] }.length * 2) + (mot_m_thirds.select { |x| x.match.season == params[:season] }.length * 1)
Severity: Minor
Found in app/models/player.rb by rubocop

Checks the length of lines in the source code. The maximum length is configurable. The tab size is configured in the IndentationWidth of the Layout/IndentationStyle cop. It also ignores a shebang line by default.

This cop has some autocorrection capabilities. It can programmatically shorten certain long lines by inserting line breaks into expressions that can be safely split across lines. These include arrays, hashes, and method calls with argument lists.

If autocorrection is enabled, the following Layout cops are recommended to further format the broken lines. (Many of these are enabled by default.)

  • ArgumentAlignment
  • ArrayAlignment
  • BlockAlignment
  • BlockDelimiters
  • BlockEndNewline
  • ClosingParenthesisIndentation
  • FirstArgumentIndentation
  • FirstArrayElementIndentation
  • FirstHashElementIndentation
  • FirstParameterIndentation
  • HashAlignment
  • IndentationWidth
  • MultilineArrayLineBreaks
  • MultilineBlockLayout
  • MultilineHashBraceLayout
  • MultilineHashKeyLineBreaks
  • MultilineMethodArgumentLineBreaks
  • MultilineMethodParameterLineBreaks
  • ParameterAlignment

Together, these cops will pretty print hashes, arrays, method calls, etc. For example, let's say the max columns is 25:

Example:

# bad
{foo: "0000000000", bar: "0000000000", baz: "0000000000"}

# good
{foo: "0000000000",
bar: "0000000000", baz: "0000000000"}

# good (with recommended cops enabled)
{
  foo: "0000000000",
  bar: "0000000000",
  baz: "0000000000",
}

Line is too long. [231/140] (https://rubystyle.guide#max-line-length)
Open

      sanitize_sql_array(['(SELECT COUNT(pick_ems.id) FROM pick_ems LEFT JOIN matches ON matches.id = pick_ems.match_id WHERE pick_ems.user_id = users.id AND pick_ems.correct AND matches.season = %s) AS correct_pick_ems', season]),
Severity: Minor
Found in app/models/user.rb by rubocop

Checks the length of lines in the source code. The maximum length is configurable. The tab size is configured in the IndentationWidth of the Layout/IndentationStyle cop. It also ignores a shebang line by default.

This cop has some autocorrection capabilities. It can programmatically shorten certain long lines by inserting line breaks into expressions that can be safely split across lines. These include arrays, hashes, and method calls with argument lists.

If autocorrection is enabled, the following Layout cops are recommended to further format the broken lines. (Many of these are enabled by default.)

  • ArgumentAlignment
  • ArrayAlignment
  • BlockAlignment
  • BlockDelimiters
  • BlockEndNewline
  • ClosingParenthesisIndentation
  • FirstArgumentIndentation
  • FirstArrayElementIndentation
  • FirstHashElementIndentation
  • FirstParameterIndentation
  • HashAlignment
  • IndentationWidth
  • MultilineArrayLineBreaks
  • MultilineBlockLayout
  • MultilineHashBraceLayout
  • MultilineHashKeyLineBreaks
  • MultilineMethodArgumentLineBreaks
  • MultilineMethodParameterLineBreaks
  • ParameterAlignment

Together, these cops will pretty print hashes, arrays, method calls, etc. For example, let's say the max columns is 25:

Example:

# bad
{foo: "0000000000", bar: "0000000000", baz: "0000000000"}

# good
{foo: "0000000000",
bar: "0000000000", baz: "0000000000"}

# good (with recommended cops enabled)
{
  foo: "0000000000",
  bar: "0000000000",
  baz: "0000000000",
}

Line is too long. [231/140] (https://rubystyle.guide#max-line-length)
Open

      sanitize_sql_array(['(SELECT COUNT(pick_ems.id) FROM pick_ems LEFT JOIN matches ON matches.id = pick_ems.match_id WHERE pick_ems.user_id = users.id AND pick_ems.correct AND matches.season = %s) AS correct_pick_ems', season]),
Severity: Minor
Found in app/models/user.rb by rubocop

Checks the length of lines in the source code. The maximum length is configurable. The tab size is configured in the IndentationWidth of the Layout/IndentationStyle cop. It also ignores a shebang line by default.

This cop has some autocorrection capabilities. It can programmatically shorten certain long lines by inserting line breaks into expressions that can be safely split across lines. These include arrays, hashes, and method calls with argument lists.

If autocorrection is enabled, the following Layout cops are recommended to further format the broken lines. (Many of these are enabled by default.)

  • ArgumentAlignment
  • ArrayAlignment
  • BlockAlignment
  • BlockDelimiters
  • BlockEndNewline
  • ClosingParenthesisIndentation
  • FirstArgumentIndentation
  • FirstArrayElementIndentation
  • FirstHashElementIndentation
  • FirstParameterIndentation
  • HashAlignment
  • IndentationWidth
  • MultilineArrayLineBreaks
  • MultilineBlockLayout
  • MultilineHashBraceLayout
  • MultilineHashKeyLineBreaks
  • MultilineMethodArgumentLineBreaks
  • MultilineMethodParameterLineBreaks
  • ParameterAlignment

Together, these cops will pretty print hashes, arrays, method calls, etc. For example, let's say the max columns is 25:

Example:

# bad
{foo: "0000000000", bar: "0000000000", baz: "0000000000"}

# good
{foo: "0000000000",
bar: "0000000000", baz: "0000000000"}

# good (with recommended cops enabled)
{
  foo: "0000000000",
  bar: "0000000000",
  baz: "0000000000",
}

Method has too many lines. [61/10] (https://rubystyle.guide#short-methods)
Open

  def initialize(user)
    alias_action :create, :read, :update, :destroy, to: :crud

    if user
      can :home, [User]
Severity: Minor
Found in app/models/ability.rb by rubocop

Checks if the length of a method exceeds some maximum value. Comment lines can optionally be allowed. The maximum allowed length is configurable.

You can set literals you want to fold with CountAsOne. Available are: 'array', 'hash', and 'heredoc'. Each literal will be counted as one line regardless of its actual size.

NOTE: The ExcludedMethods and IgnoredMethods configuration is deprecated and only kept for backwards compatibility. Please use AllowedMethods and AllowedPatterns instead. By default, there are no methods to allowed.

Example: CountAsOne: ['array', 'heredoc']

def m
  array = [       # +1
    1,
    2
  ]

  hash = {        # +3
    key: 'value'
  }

  <<~HEREDOC      # +1
    Heredoc
    content.
  HEREDOC
end               # 5 points

File foundation.js has 466 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Foundation Responsive Library
 * http://foundation.zurb.com
 * Copyright 2015, ZURB
 * Free to use under the MIT license.
Severity: Minor
Found in app/javascript/vendor/foundation/foundation.js - About 7 hrs to fix

    File foundation.clearing.js has 462 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    ;(function ($, window, document, undefined) {
      'use strict';
    
      Foundation.libs.clearing = {
        name : 'clearing',
    Severity: Minor
    Found in app/javascript/vendor/foundation/foundation.clearing.js - About 7 hrs to fix

      File foundation.topbar.js has 454 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      (function ($, window, document, undefined) {
        'use strict';
      
        Foundation.libs.topbar = {
          name: 'topbar',
      Severity: Minor
      Found in app/javascript/vendor/foundation/foundation.topbar.js - About 6 hrs to fix

        Line is too long. [217/140] (https://rubystyle.guide#max-line-length)
        Open

              if (@relative_user = User.find_by(email: @relative.invited_email)).present? && @relative.update(user_id: @relative_user.id, info: @relative.info.with_indifferent_access.except(:pending_approval, :invited_email))

        Checks the length of lines in the source code. The maximum length is configurable. The tab size is configured in the IndentationWidth of the Layout/IndentationStyle cop. It also ignores a shebang line by default.

        This cop has some autocorrection capabilities. It can programmatically shorten certain long lines by inserting line breaks into expressions that can be safely split across lines. These include arrays, hashes, and method calls with argument lists.

        If autocorrection is enabled, the following Layout cops are recommended to further format the broken lines. (Many of these are enabled by default.)

        • ArgumentAlignment
        • ArrayAlignment
        • BlockAlignment
        • BlockDelimiters
        • BlockEndNewline
        • ClosingParenthesisIndentation
        • FirstArgumentIndentation
        • FirstArrayElementIndentation
        • FirstHashElementIndentation
        • FirstParameterIndentation
        • HashAlignment
        • IndentationWidth
        • MultilineArrayLineBreaks
        • MultilineBlockLayout
        • MultilineHashBraceLayout
        • MultilineHashKeyLineBreaks
        • MultilineMethodArgumentLineBreaks
        • MultilineMethodParameterLineBreaks
        • ParameterAlignment

        Together, these cops will pretty print hashes, arrays, method calls, etc. For example, let's say the max columns is 25:

        Example:

        # bad
        {foo: "0000000000", bar: "0000000000", baz: "0000000000"}
        
        # good
        {foo: "0000000000",
        bar: "0000000000", baz: "0000000000"}
        
        # good (with recommended cops enabled)
        {
          foo: "0000000000",
          bar: "0000000000",
          baz: "0000000000",
        }

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

                      if (!self.rtl) {
                        section.css({ left: -(100 * topbar.data('index')) + '%' });
                        section
                          .find('>.name')
                          .css({ left: 100 * topbar.data('index') + '%' });
        Severity: Major
        Found in app/javascript/vendor/foundation/foundation.topbar.js and 1 other location - About 6 hrs to fix
        app/javascript/vendor/foundation/foundation.topbar.js on lines 334..344

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                  if (!self.rtl) {
                    section.css({ left: -(100 * topbar.data('index')) + '%' });
                    section
                      .find('>.name')
                      .css({ left: 100 * topbar.data('index') + '%' });
        Severity: Major
        Found in app/javascript/vendor/foundation/foundation.topbar.js and 1 other location - About 6 hrs to fix
        app/javascript/vendor/foundation/foundation.topbar.js on lines 272..282

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Line is too long. [216/140] (https://rubystyle.guide#max-line-length)
        Open

              user_params.permit(:last_name, :first_name, :last_name, :address, :city, :state, :postal_code, :phone, :email, :member_since, :username, :password, :password_confirmation, memberships: %i(year type privileges))

        Checks the length of lines in the source code. The maximum length is configurable. The tab size is configured in the IndentationWidth of the Layout/IndentationStyle cop. It also ignores a shebang line by default.

        This cop has some autocorrection capabilities. It can programmatically shorten certain long lines by inserting line breaks into expressions that can be safely split across lines. These include arrays, hashes, and method calls with argument lists.

        If autocorrection is enabled, the following Layout cops are recommended to further format the broken lines. (Many of these are enabled by default.)

        • ArgumentAlignment
        • ArrayAlignment
        • BlockAlignment
        • BlockDelimiters
        • BlockEndNewline
        • ClosingParenthesisIndentation
        • FirstArgumentIndentation
        • FirstArrayElementIndentation
        • FirstHashElementIndentation
        • FirstParameterIndentation
        • HashAlignment
        • IndentationWidth
        • MultilineArrayLineBreaks
        • MultilineBlockLayout
        • MultilineHashBraceLayout
        • MultilineHashKeyLineBreaks
        • MultilineMethodArgumentLineBreaks
        • MultilineMethodParameterLineBreaks
        • ParameterAlignment

        Together, these cops will pretty print hashes, arrays, method calls, etc. For example, let's say the max columns is 25:

        Example:

        # bad
        {foo: "0000000000", bar: "0000000000", baz: "0000000000"}
        
        # good
        {foo: "0000000000",
        bar: "0000000000", baz: "0000000000"}
        
        # good (with recommended cops enabled)
        {
          foo: "0000000000",
          bar: "0000000000",
          baz: "0000000000",
        }

        Line is too long. [215/140] (https://rubystyle.guide#max-line-length)
        Open

            h.content_tag :div, class: "pick-em-buttons secondary-border border-all #{model.home_team.abbrv.downcase} #{'closed' unless model.kickoff.future?}", title: model.kickoff.future? ? 'Pick ’Em' : 'Voting Closed' do
        Severity: Minor
        Found in app/decorators/match_decorator.rb by rubocop

        Checks the length of lines in the source code. The maximum length is configurable. The tab size is configured in the IndentationWidth of the Layout/IndentationStyle cop. It also ignores a shebang line by default.

        This cop has some autocorrection capabilities. It can programmatically shorten certain long lines by inserting line breaks into expressions that can be safely split across lines. These include arrays, hashes, and method calls with argument lists.

        If autocorrection is enabled, the following Layout cops are recommended to further format the broken lines. (Many of these are enabled by default.)

        • ArgumentAlignment
        • ArrayAlignment
        • BlockAlignment
        • BlockDelimiters
        • BlockEndNewline
        • ClosingParenthesisIndentation
        • FirstArgumentIndentation
        • FirstArrayElementIndentation
        • FirstHashElementIndentation
        • FirstParameterIndentation
        • HashAlignment
        • IndentationWidth
        • MultilineArrayLineBreaks
        • MultilineBlockLayout
        • MultilineHashBraceLayout
        • MultilineHashKeyLineBreaks
        • MultilineMethodArgumentLineBreaks
        • MultilineMethodParameterLineBreaks
        • ParameterAlignment

        Together, these cops will pretty print hashes, arrays, method calls, etc. For example, let's say the max columns is 25:

        Example:

        # bad
        {foo: "0000000000", bar: "0000000000", baz: "0000000000"}
        
        # good
        {foo: "0000000000",
        bar: "0000000000", baz: "0000000000"}
        
        # good (with recommended cops enabled)
        {
          foo: "0000000000",
          bar: "0000000000",
          baz: "0000000000",
        }

        Function events has 164 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            events: function (bar) {
              var self = this,
                S = this.S;
        
              S(this.scope)
        Severity: Major
        Found in app/javascript/vendor/foundation/foundation.topbar.js - About 6 hrs to fix

          File foundation.orbit.js has 410 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          ;(function ($, window, document, undefined) {
            'use strict';
          
            var noop = function () {};
          
          
          Severity: Minor
          Found in app/javascript/vendor/foundation/foundation.orbit.js - About 5 hrs to fix

            Function events has 145 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                events : function () {
                  var self = this,
                      S = self.S,
                      move_class = '',
                      right_postfix = '',
            Severity: Major
            Found in app/javascript/vendor/foundation/foundation.offcanvas.js - About 5 hrs to fix

              File foundation.reveal.js has 398 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              ;(function ($, window, document, undefined) {
                'use strict';
              
                var openModals = [];
              
              
              Severity: Minor
              Found in app/javascript/vendor/foundation/foundation.reveal.js - About 5 hrs to fix

                Line is too long. [198/140] (https://rubystyle.guide#max-line-length)
                Open

                    warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
                Severity: Minor
                Found in bin/bundle by rubocop

                Checks the length of lines in the source code. The maximum length is configurable. The tab size is configured in the IndentationWidth of the Layout/IndentationStyle cop. It also ignores a shebang line by default.

                This cop has some autocorrection capabilities. It can programmatically shorten certain long lines by inserting line breaks into expressions that can be safely split across lines. These include arrays, hashes, and method calls with argument lists.

                If autocorrection is enabled, the following Layout cops are recommended to further format the broken lines. (Many of these are enabled by default.)

                • ArgumentAlignment
                • ArrayAlignment
                • BlockAlignment
                • BlockDelimiters
                • BlockEndNewline
                • ClosingParenthesisIndentation
                • FirstArgumentIndentation
                • FirstArrayElementIndentation
                • FirstHashElementIndentation
                • FirstParameterIndentation
                • HashAlignment
                • IndentationWidth
                • MultilineArrayLineBreaks
                • MultilineBlockLayout
                • MultilineHashBraceLayout
                • MultilineHashKeyLineBreaks
                • MultilineMethodArgumentLineBreaks
                • MultilineMethodParameterLineBreaks
                • ParameterAlignment

                Together, these cops will pretty print hashes, arrays, method calls, etc. For example, let's say the max columns is 25:

                Example:

                # bad
                {foo: "0000000000", bar: "0000000000", baz: "0000000000"}
                
                # good
                {foo: "0000000000",
                bar: "0000000000", baz: "0000000000"}
                
                # good (with recommended cops enabled)
                {
                  foo: "0000000000",
                  bar: "0000000000",
                  baz: "0000000000",
                }

                File foundation.dropdown.js has 363 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                ;(function ($, window, document, undefined) {
                  'use strict';
                
                  Foundation.libs.dropdown = {
                    name : 'dropdown',
                Severity: Minor
                Found in app/javascript/vendor/foundation/foundation.dropdown.js - About 4 hrs to fix

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

                                if ($.data(self.cache.active[0], 'settings').vertical) {
                                  var scroll_offset = 0;
                                  if (!e.pageY) {
                                    scroll_offset = window.scrollY;
                                  }
                  Severity: Major
                  Found in app/javascript/vendor/foundation/foundation.slider.js and 1 other location - About 4 hrs to fix
                  app/javascript/vendor/foundation/foundation.slider.js on lines 43..51

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 129.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Severity
                  Category
                  Status
                  Source
                  Language