nesquena/gitdocs

View on GitHub

Showing 676 of 676 total issues

Re-enable Layout/AlignParameters cop with # rubocop:enable after disabling it.
Open

# rubocop:disable AlignParameters
Severity: Minor
Found in config.ru by rubocop

Use %i or %I for an array of symbols.
Open

      Gitdocs::Share.stubs(:all).returns([:share1, :share2])
Severity: Minor
Found in test/unit/search_test.rb by rubocop

This cop can check for array literals made up of symbols that are not using the %i() syntax.

Alternatively, it checks for symbol arrays using the %i() syntax on projects which do not want to use that syntax.

Configuration option: MinSize If set, arrays with fewer elements than this value will not trigger the cop. For example, a MinSize of3` will not enforce a style on an array of 2 or fewer elements.

Example: EnforcedStyle: percent (default)

# good
%i[foo bar baz]

# bad
[:foo, :bar, :baz]

Example: EnforcedStyle: brackets

# good
[:foo, :bar, :baz]

# bad
%i[foo bar baz]

Unnecessary utf-8 encoding comment.
Open

# -*- encoding : utf-8 -*-
Severity: Minor
Found in test/unit/settings_app_test.rb by rubocop

Add an empty line after magic comments.
Open

require File.expand_path('../test_helper', __FILE__)
Severity: Minor
Found in test/unit/git_notifier_test.rb by rubocop

Checks for a newline after the final magic comment.

Example:

# good
# frozen_string_literal: true

# Some documentation for Person
class Person
  # Some code
end

# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
  # Some code
end

Unnecessary utf-8 encoding comment.
Open

# -*- encoding : utf-8 -*-
Severity: Minor
Found in test/unit/manager_test.rb by rubocop

Unnecessary utf-8 encoding comment.
Open

# -*- encoding : utf-8 -*-
Severity: Minor
Found in test/unit/git_notifier_test.rb by rubocop

Unnecessary utf-8 encoding comment.
Open

# -*- encoding : utf-8 -*-
Severity: Minor
Found in test/unit/gitdocs_test.rb by rubocop

Unnecessary utf-8 encoding comment.
Open

# -*- encoding : utf-8 -*-
Severity: Minor
Found in test/unit/notifier_test.rb by rubocop

Add an empty line after magic comments.
Open

$LOAD_PATH.push File.expand_path('../lib', __FILE__)
Severity: Minor
Found in gitdocs.gemspec by rubocop

Checks for a newline after the final magic comment.

Example:

# good
# frozen_string_literal: true

# Some documentation for Person
class Person
  # Some code
end

# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
  # Some code
end

%w-literals should be delimited by [ and ].
Open

        %w(/my/path /my/path/2 /my/path/3a /my/path/4 /my/path/5)
Severity: Minor
Found in test/unit/share_test.rb by rubocop

This cop enforces the consistent usage of %-literal delimiters.

Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.

Example:

# Style/PercentLiteralDelimiters:
#   PreferredDelimiters:
#     default: '[]'
#     '%i':    '()'

# good
%w[alpha beta] + %i(gamma delta)

# bad
%W(alpha #{beta})

# bad
%I(alpha beta)

Unnecessary utf-8 encoding comment.
Open

# -*- encoding : utf-8 -*-
Severity: Minor
Found in test/unit/search_test.rb by rubocop

Unnecessary utf-8 encoding comment.
Open

# -*- encoding : utf-8 -*-
Severity: Minor
Found in test/unit/test_helper.rb by rubocop

required_ruby_version (1.9, declared in gitdocs.gemspec) and TargetRubyVersion (2.1, declared in .rubocop.yml) should be equal.
Open

  s.required_ruby_version = '>= 1.9'
Severity: Minor
Found in gitdocs.gemspec by rubocop

Checks that required_ruby_version of gemspec and TargetRubyVersion of .rubocop.yml are equal. Thereby, RuboCop to perform static analysis working on the version required by gemspec.

Example:

# When `TargetRubyVersion` of .rubocop.yml is `2.3`.

# bad
Gem::Specification.new do |spec|
  spec.required_ruby_version = '>= 2.2.0'
end

# bad
Gem::Specification.new do |spec|
  spec.required_ruby_version = '>= 2.4.0'
end

# good
Gem::Specification.new do |spec|
  spec.required_ruby_version = '>= 2.3.0'
end

# good
Gem::Specification.new do |spec|
  spec.required_ruby_version = '>= 2.3'
end

# good
Gem::Specification.new do |spec|
  spec.required_ruby_version = ['>= 2.3.0', '< 2.5.0']
end

Unnecessary utf-8 encoding comment.
Open

# -*- encoding : utf-8 -*-

Unnecessary utf-8 encoding comment.
Open

# -*- encoding : utf-8 -*-
Severity: Minor
Found in test/integration/web/browse_test.rb by rubocop

Use meaningful heredoc delimiters.
Open

      EOS
Severity: Minor
Found in test/integration/test_helper.rb by rubocop

This cop checks that your heredocs are using meaningful delimiters. By default it disallows END and EO*, and can be configured through blacklisting additional delimiters.

Example:

# good
<<-SQL
  SELECT * FROM foo
SQL

# bad
<<-END
  SELECT * FROM foo
END

# bad
<<-EOS
  SELECT * FROM foo
EOS

Favor a normal unless-statement over a modifier clause in a multiline statement.
Open

        return(
          'Auto-commit from gitdocs'
        ) unless File.exist?(@commit_message_path)
Severity: Minor
Found in lib/gitdocs/repository/committer.rb by rubocop

Checks for uses of if/unless modifiers with multiple-lines bodies.

Example:

# bad
{
  result: 'this should not happen'
} unless cond

# good
{ result: 'ok' } if cond

Rule doesn't have all its properties in alphabetical order.
Open

form.upload p, form.add p {
Severity: Minor
Found in lib/gitdocs/public/css/app.css by csslint

Element (td.size) is overqualified, just use .size without element name.
Open

table td.size { width: 15%; }
Severity: Minor
Found in lib/gitdocs/public/css/app.css by csslint

Rule doesn't have all its properties in alphabetical order.
Open

.container-fluid{position:relative;min-width:940px;padding-left:20px;padding-right:20px;zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";zoom:1;}
Severity
Category
Status
Source
Language