expertiza/expertiza

View on GitHub
spec/controllers/quiz_questionnaires_controller_spec.rb

Summary

Maintainability
C
1 day
Test Coverage

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

describe QuizQuestionnairesController do
  let(:questionnaire) do
    build(id: 1, name: 'questionnaire', ta_id: 8, course_id: 1, private: false, min_question_score: 0, max_question_score: 5, type: 'ReviewQuestionnaire')
  end
  let(:questionnaire) { build(:questionnaire) }

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

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

  describe '#valid_quiz' do
    before(:each) do
      allow(Assignment).to receive_message_chain(:find, :num_quiz_questions).with('1').with(no_args).and_return(1)
    end

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

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

    describe '#create and #save' do
      context 'when quiz is valid' do
        before(:each) do
          # create_quiz_questionnaire
          allow_any_instance_of(QuizQuestionnairesController).to receive(:validate_quiz).and_return('valid')

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

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

      context 'when quiz is valid' do
        before(:each) do
          # create_quiz_questionnaire
          allow_any_instance_of(QuizQuestionnairesController).to receive(:validate_quiz).and_return('valid')
        end

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

File quiz_questionnaires_controller_spec.rb has 338 lines of code (exceeds 250 allowed). Consider refactoring.
Open

describe QuizQuestionnairesController do
  let(:questionnaire) do
    build(id: 1, name: 'questionnaire', ta_id: 8, course_id: 1, private: false, min_question_score: 0, max_question_score: 5, type: 'ReviewQuestionnaire')
  end
  let(:questionnaire) { build(:questionnaire) }
Severity: Minor
Found in spec/controllers/quiz_questionnaires_controller_spec.rb - About 4 hrs to fix

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

          describe '#update' do
            context 'when @questionnaire is nil' do
              it 'redirects to submitted_content#view page' do
                allow(Questionnaire).to receive(:find).with('1').and_return(nil)
                request_params = { id: 1, pid: 1 }

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

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

            context 'when @questionnaire is not nil' do
              it 'updates all quiz questions and redirects to submitted_content#view page' do
                request_params = { id: 1,
                           pid: 1,
                           save: true,

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

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

              it 'updates all quiz questions and redirects to submitted_content#view page' do
                request_params = { id: 1,
                           pid: 1,
                           save: true,
                           questionnaire: { name: 'test questionnaire',

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

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

          describe '#new' do
            context 'when an assignment requires quiz' do
              before(:each) do
                @request_params = { aid: 1,
                            model: 'QuizQuestionnaire',

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

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

            context 'when an assignment requires quiz' do
              before(:each) do
                @request_params = { aid: 1,
                            model: 'QuizQuestionnaire',
                            pid: 1,

    This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

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

            context 'when questionnaire type is QuizQuestionnaire and max_question_score value is negative' do
              it 'creates error: The maximum question score must be a positive integer.' do
                request_params = { aid: 1,
                           pid: 1,
                           questionnaire: { name: 'Test questionnaire',
    Severity: Major
    Found in spec/controllers/quiz_questionnaires_controller_spec.rb and 1 other location - About 3 hrs to fix
    spec/controllers/quiz_questionnaires_controller_spec.rb on lines 97..118

    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 110.

    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

            context 'when questionnaire type is QuizQuestionnaire and min_question_score value is negative' do
              it 'creates error: The minimum question score must be a positive integer.' do
                request_params = { aid: 1,
                           pid: 1,
                           questionnaire: { name: 'Test questionnaire',
    Severity: Major
    Found in spec/controllers/quiz_questionnaires_controller_spec.rb and 1 other location - About 3 hrs to fix
    spec/controllers/quiz_questionnaires_controller_spec.rb on lines 72..93

    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 110.

    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

                                                    '3' => { MultipleChoiceCheckbox:
                                                              { '1' => { iscorrect: '0', txt: 'a31' },
                                                                '2' => { iscorrect: '1', txt: 'a32' },
                                                                '3' => { iscorrect: '0', txt: 'a33' },
                                                                '4' => { iscorrect: '1', txt: 'a34' } } },
    Severity: Minor
    Found in spec/controllers/quiz_questionnaires_controller_spec.rb and 1 other location - About 20 mins to fix
    spec/controllers/quiz_questionnaires_controller_spec.rb on lines 354..357

    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 27.

    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

                                                 '3' => { MultipleChoiceCheckbox: { '1' => { iscorrect: '0', txt: 'a31' },
                                                                                    '2' => { iscorrect: '1', txt: 'a32' },
                                                                                    '3' => { iscorrect: '1', txt: 'a33' },
                                                                                    '4' => { iscorrect: '0', txt: 'a34' } } },
    Severity: Minor
    Found in spec/controllers/quiz_questionnaires_controller_spec.rb and 1 other location - About 20 mins to fix
    spec/controllers/quiz_questionnaires_controller_spec.rb on lines 274..278

    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 27.

    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

    Align the elements of a hash literal if they span more than one line.
    Open

                           questionnaire: { name: 'Test questionnaire',
                                            type: 'QuizQuestionnaire',
                                            min_question_score: 2,
                                            max_question_score: 1 } }

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                           pid: 1,

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                           pid: 1,

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                            private: 0 }

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                           question_weights: { '1' => { txt: '1' },
                                               '2' => { txt: '1' },
                                               '3' => { txt: '1' },
                                               '4' => { txt: '1' } } }

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                           questionnaire: { name: 'Test questionnaire',
                                            type: 'QuizQuestionnaire',
                                            min_question_score: -2,
                                            max_question_score: -1 } }

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                           pid: 1,

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                           questionnaire: { name: 'Test questionnaire',
                                            type: 'QuizQuestionnaire',
                                            min_question_score: 0,
                                            max_question_score: 5 } }

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                           questionnaire: { name: 'test questionnaire',
                                            instructor_id: 6,
                                            private: 0,
                                            min_question_score: 0,
                                            max_question_score: 5,

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                            model: 'QuizQuestionnaire',

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                           model: 'QuizQuestionnaire',

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                           pid: 1,

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                           private: 0 }

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                           questionnaire: { name: 'test questionnaire',
                                            type: 'QuizQuestionnaire' } }

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                           pid: 1,

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                           quiz_question_choices: { '1' => { MultipleChoiceRadio:
                                                              { :correctindex => 1,
                                                                '1' => { txt: 'a11' },
                                                                '2' => { txt: 'a12' },
                                                                '3' => { txt: 'a13' },

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                            pid: 1,

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                           pid: 1,

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                           save: true,

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Align the elements of a hash literal if they span more than one line.
    Open

                           question: { '1' => { txt: 'Q1' },
                                       '2' => { txt: 'Q2' },
                                       '3' => { txt: 'Q3' },
                                       '4' => { txt: 'Q4' } },

    Check that the keys, separators, and values of a multi-line hash literal are aligned according to configuration. The configuration options are:

    - key (left align keys)
    - separator (align hash rockets and colons, right align keys)
    - table (left align keys, hash rockets, and values)

    The treatment of hashes passed as the last argument to a method call can also be configured. The options are:

    - always_inspect
    - always_ignore
    - ignore_implicit (without curly braces)
    - ignore_explicit (with curly braces)

    Example:

    # EnforcedHashRocketStyle: key (default)
    # EnforcedColonStyle: key (default)
    
    # good
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    
    # bad
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    Example:

    # EnforcedHashRocketStyle: separator
    # EnforcedColonStyle: separator
    
    #good
    {
      foo: bar,
       ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
      :ba => baz
    }
    {
      :foo => bar,
      :ba  => baz
    }

    Example:

    # EnforcedHashRocketStyle: table
    # EnforcedColonStyle: table
    
    #good
    {
      foo: bar,
      ba:  baz
    }
    {
      :foo => bar,
      :ba  => baz
    }
    
    #bad
    {
      foo: bar,
      ba: baz
    }
    {
      :foo => bar,
       :ba => baz
    }

    There are no issues that match your filters.

    Category
    Status