Dalphi/dalphi

View on GitHub

Showing 1,441 of 1,441 total issues

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

  it 'creates a annotator without a password' do
    expect(Annotator.count).to eq(0)

    post annotators_path,
         params: {
Severity: Minor
Found in spec/requests/annotators/create_spec.rb and 1 other location - About 50 mins to fix
spec/requests/projects/create_spec.rb on lines 9..23

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

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

      post api_v1_raw_data_path(auth_token: @auth_token),
           params: {
             raw_data: [
               {
                 'shape' => raw_datum_1.shape,
Severity: Minor
Found in spec/requests/api/v1/raw_data_spec.rb and 1 other location - About 50 mins to fix
spec/requests/api/v1/raw_data_spec.rb on lines 152..168

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

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

      post api_v1_raw_data_path(auth_token: @auth_token),
           params: {
             raw_data: [
               {
                 'shape' => raw_datum_1.shape,
Severity: Minor
Found in spec/requests/api/v1/raw_data_spec.rb and 1 other location - About 50 mins to fix
spec/requests/api/v1/raw_data_spec.rb on lines 105..121

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

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

    it 'can batch process a zip archive with valid files' do
      expect(RawDatum.all.count).to eq(0)
      file_path = Rails.root.join('spec/fixtures/zip/valid.zip')
      batch_result = RawDatum.zip_to_data @raw_datum.project,
                                          file_path
Severity: Minor
Found in spec/models/raw_datum_spec.rb and 1 other location - About 45 mins to fix
spec/models/raw_datum_spec.rb on lines 139..150

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

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

    it 'can batch process a zip archive with subdirectories' do
      expect(RawDatum.all.count).to eq(0)
      file_path = Rails.root.join('spec/fixtures/zip/subdirectory1.zip')
      batch_result = RawDatum.zip_to_data @raw_datum.project,
                                          file_path
Severity: Minor
Found in spec/models/raw_datum_spec.rb and 1 other location - About 45 mins to fix
spec/models/raw_datum_spec.rb on lines 97..108

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

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

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

        operation :patch do
          key :comsumes, ['application/json']
          key :description, I18n.t('api.statistic.update.description')
          key :operationId, 'statistic_update'
          key :produces, ['application/json']

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. [30/25]
Open

        operation :post do
          key :comsumes, ['application/json']
          key :description, I18n.t('api.annotation_document.create.description')
          key :operationId, 'annotation_document_create'
          key :produces, ['application/json']

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. [30/25]
Open

        operation :patch do
          key :comsumes, ['application/json']
          key :description, I18n.t('api.annotation_document.update.description')
          key :operationId, 'annotation_document_update'
          key :produces, ['application/json']

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. [30/25]
Open

        operation :patch do
          key :comsumes, ['application/json']
          key :description, I18n.t('api.raw_datum.update.description')
          key :operationId, 'raw_datum_update'
          key :produces, ['application/json']

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. [30/25]
Open

        operation :post do
          key :comsumes, ['application/json']
          key :description, I18n.t('api.statistic.create.description')
          key :operationId, 'statistic_create'
          key :produces, ['application/json']

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. [30/25]
Open

        operation :post do
          key :comsumes, ['application/json']
          key :description, I18n.t('api.raw_datum.create.description')
          key :operationId, 'raw_datum_create'
          key :produces, ['application/json']

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. [30/25]
Open

RSpec.configure do |config|
  config.use_transactional_fixtures = false

  config.before(:suite) do
    if config.use_transactional_fixtures?
Severity: Minor
Found in spec/feature_test_helper.rb by rubocop

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. [30/25]
Open

    describe 'should be unique within one project and' do
      it 'should not be assigned twice' do
        common_project = @annotation_document_with_different_admin.raw_datum.project
        test_string = 'The company Implisense GmbH in Berlin.'

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. [30/25]
Open

  it 'creates an annotation document' do
    raw_datum = FactoryGirl.create(:raw_datum)
    expect(AnnotationDocument.count).to eq(0)

    annotation_document = {

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. [30/25]
Open

  it 'updates a service with valid data' do
    expect(Service.count).to eq(1)

    stub_request(:get, @service.url)
      .to_return(

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

  it 'destroys all annotation documents from a project' do
    expect(AnnotationDocument.count).to eq(2)

    delete project_annotation_documents_path(@project),
           params: {
Severity: Minor
Found in spec/requests/projects/annotation_documents/destroy_all_spec.rb and 1 other location - About 45 mins to fix
spec/requests/projects/raw_data/destroy_all_spec.rb on lines 13..24

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

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

    it 'can batch process a zip archive with Mac encoded file names' do
      expect(RawDatum.all.count).to eq(0)
      file_path = Rails.root.join('spec/fixtures/zip/mac_encoding.zip')
      batch_result = RawDatum.zip_to_data @raw_datum.project,
                                          file_path
Severity: Minor
Found in spec/models/raw_datum_spec.rb and 1 other location - About 45 mins to fix
spec/models/raw_datum_spec.rb on lines 181..192

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

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

  it 'destroys all raw data association from a project' do
    expect(RawDatum.count).to eq(2)

    delete project_raw_data_path(@project),
           params: {
Severity: Minor
Found in spec/requests/projects/raw_data/destroy_all_spec.rb and 1 other location - About 45 mins to fix
spec/requests/projects/annotation_documents/destroy_all_spec.rb on lines 16..27

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

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

    it 'can batch process a zip archive with Linux encoded file names' do
      expect(RawDatum.all.count).to eq(0)
      file_path = Rails.root.join('spec/fixtures/zip/linux_encoding.zip')
      batch_result = RawDatum.zip_to_data @raw_datum.project,
                                          file_path
Severity: Minor
Found in spec/models/raw_datum_spec.rb and 1 other location - About 45 mins to fix
spec/models/raw_datum_spec.rb on lines 167..178

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

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

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

  swagger_schema :Statistic do
    key :required,
        [
          :key
        ]
Severity: Minor
Found in app/models/statistic.rb by rubocop

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.

Severity
Category
Status
Source
Language