gitshowcase/gitshowcase

View on GitHub

Showing 883 of 883 total issues

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

ActiveRecord::Schema.define(version: 20170502201750) do

  # These are extensions that must be enabled in order to support this database
  enable_extension "plpgsql"
  enable_extension "pg_trgm"
Severity: Minor
Found in db/schema.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.

Class has too many lines. [152/100]
Open

class SnapshotService < ApplicationService
  # Constraints
  TYPE_TOTAL = :total
  TYPE_DAILY = :daily

Severity: Minor
Found in app/services/snapshot_service.rb by rubocop

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [105/100]
Open

class User::CompletenessService < ApplicationService
  # Constraints
  FIELDS = {
      name: :name,
      bio: :bio,

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

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

Rails.application.routes.draw do
  # Error pages
  match '/404', to: 'pages#not_found', via: :all, as: :not_found
  match '/500', to: 'pages#internal_server_error', via: :all, as: :internal_server_error

Severity: Minor
Found in config/routes.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. [96/25]
Open

RSpec.describe GithubUserService, type: :service do
  subject(:service) { GithubUserService.new(user) }

  let(:user) { FactoryGirl.create(:user) }
  let(:auth_data) {

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

  constraints domain: ENV['APP_DOMAIN'] || 'localhost' do
    # Pages
    get '/license', to: 'pages#license'
    get '/privacy_policy', to: 'pages#privacy_policy'
    get '/sitemap-users.xml', to: 'pages#sitemap_users'
Severity: Minor
Found in config/routes.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.

Assignment Branch Condition size for index is too high. [49.42/15]
Open

  def index
    @levels = levels = User::CompletenessService::LEVELS.keys
    @search_fields = SEARCH_FIELDS

    query = User.order('id DESC')

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Assignment Branch Condition size for github is too high. [43.17/15]
Open

  def github
    auth = request.env['omniauth.auth']

    @user = User.where(github_uid: auth.uid).first_or_initialize
    github_user_service = GithubUserService.new(@user)

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

Class SnapshotService has 34 methods (exceeds 20 allowed). Consider refactoring.
Open

class SnapshotService < ApplicationService
  # Constraints
  TYPE_TOTAL = :total
  TYPE_DAILY = :daily

Severity: Minor
Found in app/services/snapshot_service.rb - About 4 hrs to fix

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

    RSpec.describe GithubProjectService, type: :service do
      describe '#sync' do
        subject(:service) { GithubProjectService.new(project) }
    
        context 'without repository' do

    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.

    Method has too many lines. [31/10]
    Open

      def change
        create_table :snapshots do |t|
          t.date :date, null: false
    
          # Total values

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

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

    RSpec.describe UrlHelper, type: :helper do
      describe '.is_url' do
        it 'is true for http' do
          expect(UrlHelper.is_url('http://www.url.com')).to be(true)
        end
    Severity: Minor
    Found in spec/helpers/url_helper_spec.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.

    Assignment Branch Condition size for import is too high. [35.71/15]
    Open

      def import
        countries = Hash[Country.select(:id, :abbreviation).map { |country| [country.abbreviation, country.id] }]
        timezones = Hash[Timezone.select(:id, :slug).map { |timezone| [timezone.slug, timezone.id] }]
    
        states_result = State.select(:id, :abbreviation, 'countries.abbreviation as country_abbreviation').joins(:country).map do |state|
    Severity: Minor
    Found in app/services/import/city_service.rb by rubocop

    This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

    Method has too many lines. [29/10]
    Open

      def github
        auth = request.env['omniauth.auth']
    
        @user = User.where(github_uid: auth.uid).first_or_initialize
        github_user_service = GithubUserService.new(@user)

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

    Method has too many lines. [28/10]
    Open

      def index
        @levels = levels = User::CompletenessService::LEVELS.keys
        @search_fields = SEARCH_FIELDS
    
        query = User.order('id DESC')

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

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

    RSpec.describe DomainService, type: :service do
      before do
        allow(DomainService).to receive(:client_domain).and_return(double.as_null_object)
        allow(DomainService).to receive(:heroku_app).and_return('123')
      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. [65/25]
    Open

      describe '#sync' do
        context 'without github' do
          after :each do
            exception = "User ##{user.id} does not have github properties"
            expect { service.sync }.to raise_exception(exception)

    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.

    Method has too many lines. [26/10]
    Open

      def change
        add_column :users, :name, :string
        add_column :users, :username, :string
        add_column :users, :avatar, :string
        add_column :users, :cover, :string

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

    Assignment Branch Condition size for change is too high. [30/15]
    Open

      def change
        create_table :snapshots do |t|
          t.date :date, null: false
    
          # Total values

    This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

    Method has too many lines. [23/10]
    Open

      def import
        countries = Hash[Country.select(:id, :abbreviation).map { |country| [country.abbreviation, country.id] }]
        timezones = Hash[Timezone.select(:id, :slug).map { |timezone| [timezone.slug, timezone.id] }]
    
        states_result = State.select(:id, :abbreviation, 'countries.abbreviation as country_abbreviation').joins(:country).map do |state|
    Severity: Minor
    Found in app/services/import/city_service.rb by rubocop

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

    Severity
    Category
    Status
    Source
    Language