geminabox/geminabox

View on GitHub

Showing 71 of 104 total issues

Bare URL used
Confirmed

- https://github.com/geminabox/geminabox/releases/tag/v1.4.1
Severity: Info
Found in CHANGELOG.md by markdownlint

MD034 - Bare URL used

Tags: links, url

Aliases: no-bare-urls

This rule is triggered whenever a URL is given that isn't surrounded by angle brackets:

For more information, see http://www.example.com/.

To fix this, add angle brackets around the URL:

For more information, see <http:></http:>.

Rationale: Without angle brackets, the URL isn't converted into a link in many markdown parsers.

Note: if you do want a bare URL without it being converted into a link, enclose it in a code block, otherwise in some markdown parsers it will be converted:

`http://www.example.com`

Use || instead of or.
Open

    latest_gem_for(gemname, Dir.glob(glob_matcher)) or raise Gem::CommandLineError, NO_GEM_PROVIDED_ERROR_MESSAGE
Severity: Minor
Found in lib/geminabox_client.rb by rubocop

This cop checks for uses of and and or, and suggests using && and || instead. It can be configured to check only in conditions, or in all contexts.

Example: EnforcedStyle: always (default)

# bad
foo.save and return

# bad
if foo and bar
end

# good
foo.save && return

# good
if foo && bar
end

Example: EnforcedStyle: conditionals

# bad
if foo and bar
end

# good
foo.save && return

# good
foo.save and return

# good
if foo && bar
end

Bare URL used
Confirmed

- https://github.com/geminabox/geminabox/releases/tag/v1.2.0
Severity: Info
Found in CHANGELOG.md by markdownlint

MD034 - Bare URL used

Tags: links, url

Aliases: no-bare-urls

This rule is triggered whenever a URL is given that isn't surrounded by angle brackets:

For more information, see http://www.example.com/.

To fix this, add angle brackets around the URL:

For more information, see <http:></http:>.

Rationale: Without angle brackets, the URL isn't converted into a link in many markdown parsers.

Note: if you do want a bare URL without it being converted into a link, enclose it in a code block, otherwise in some markdown parsers it will be converted:

`http://www.example.com`

Redundant curly braces around a hash parameter.
Open

    response = http_client.post(url_for(:upload), { 'file' => File.open(gemfile, "rb"), 'overwrite' => !!options[:overwrite] }, { 'Accept' => 'text/plain' })
Severity: Minor
Found in lib/geminabox_client.rb by rubocop

This cop checks for braces around the last parameter in a method call if the last parameter is a hash. It supports braces, no_braces and context_dependent styles.

Example: EnforcedStyle: braces

# The `braces` style enforces braces around all method
# parameters that are hashes.

# bad
some_method(x, y, a: 1, b: 2)

# good
some_method(x, y, {a: 1, b: 2})

Example: EnforcedStyle: no_braces (default)

# The `no_braces` style checks that the last parameter doesn't
# have braces around it.

# bad
some_method(x, y, {a: 1, b: 2})

# good
some_method(x, y, a: 1, b: 2)

Example: EnforcedStyle: context_dependent

# The `context_dependent` style checks that the last parameter
# doesn't have braces around it, but requires braces if the
# second to last parameter is also a hash literal.

# bad
some_method(x, y, {a: 1, b: 2})
some_method(x, y, {a: 1, b: 2}, a: 1, b: 2)

# good
some_method(x, y, a: 1, b: 2)
some_method(x, y, {a: 1, b: 2}, {a: 1, b: 2})

Unordered list indentation
Confirmed

   - `git clone https://github.com/geminabox/geminabox.git` or
Severity: Info
Found in CONTRIBUTING.md by markdownlint

MD007 - Unordered list indentation

Tags: bullet, ul, indentation

Aliases: ul-indent

Parameters: indent (number; default 2)

This rule is triggered when list items are not indented by the configured number of spaces (default: 2).

Example:

* List item
   * Nested list item indented by 3 spaces

Corrected Example:

* List item
  * Nested list item indented by 2 spaces

Rationale (2 space indent): indenting by 2 spaces allows the content of a nested list to be in line with the start of the content of the parent list when a single space is used after the list marker.

Rationale (4 space indent): Same indent as code blocks, simpler for editors to implement. See http://www.cirosantilli.com/markdown-styleguide/#indented-lists for more information.

In addition, this is a compatibility issue with multi-markdown parsers, which require a 4 space indents. See http://support.markedapp.com/discussions/problems/21-sub-lists-not-indenting for a description of the problem.

Do not suppress exceptions.
Open

      rescue
Severity: Minor
Found in lib/geminabox/server.rb by rubocop

This cop checks for rescue blocks with no body.

Example:

# bad

def some_method
  do_something
rescue
  # do nothing
end

Example:

# bad

begin
  do_something
rescue
  # do nothing
end

Example:

# good

def some_method
  do_something
rescue
  handle_exception
end

Example:

# good

begin
  do_something
rescue
  handle_exception
end

Avoid the use of double negation (!!).
Open

      !!(platform =~ /ruby/i)
Severity: Minor
Found in lib/geminabox/gem_version.rb by rubocop

This cop checks for uses of double negation (!!) to convert something to a boolean value. As this is both cryptic and usually redundant, it should be avoided.

Example:

# bad
!!something

# good
!something.nil?

Please, note that when something is a boolean value !!something and !something.nil? are not the same thing. As you're unlikely to write code that can accept values of any type this is rarely a problem in practice.

module definition in method body
Open

  module GemListMerge
Severity: Minor
Found in lib/geminabox/gem_list_merge.rb by rubymotion

Line length
Open

Start your gem server with 'rackup' to run WEBrick or hook up the config.ru as you normally would ([passenger](https://www.phusionpassenger.com/), [thin](http://code.macournoyer.com/thin/), [unicorn](https://bogomips.org/unicorn/), whatever floats your boat).
Severity: Info
Found in README.md by markdownlint

MD013 - Line length

Tags: line_length

Aliases: line-length Parameters: linelength, codeblocks, tables (number; default 80, boolean; default true)

This rule is triggered when there are lines that are longer than the configured line length (default: 80 characters). To fix this, split the line up into multiple lines.

This rule has an exception where there is no whitespace beyond the configured line length. This allows you to still include items such as long URLs without being forced to break them in the middle.

You also have the option to exclude this rule for code blocks and tables. To do this, set the code_blocks and/or tables parameters to false.

Code blocks are included in this rule by default since it is often a requirement for document readability, and tentatively compatible with code rules. Still, some languages do not lend themselves to short lines.

Code block style
Confirmed

    gem yank my-awesome-gem -v 1.0 --host HOST
Severity: Info
Found in README.md by markdownlint

Line length
Confirmed

- Check if a bug you run into is already fixed in [the latest release](https://github.com/geminabox/geminabox/releases) or [the gem available at RubyGems.org](https://rubygems.org/gems/geminabox).
Severity: Info
Found in CONTRIBUTING.md by markdownlint

MD013 - Line length

Tags: line_length

Aliases: line-length Parameters: linelength, codeblocks, tables (number; default 80, boolean; default true)

This rule is triggered when there are lines that are longer than the configured line length (default: 80 characters). To fix this, split the line up into multiple lines.

This rule has an exception where there is no whitespace beyond the configured line length. This allows you to still include items such as long URLs without being forced to break them in the middle.

You also have the option to exclude this rule for code blocks and tables. To do this, set the code_blocks and/or tables parameters to false.

Code blocks are included in this rule by default since it is often a requirement for document readability, and tentatively compatible with code rules. Still, some languages do not lend themselves to short lines.

Code block style
Confirmed

    gem install geminabox
Severity: Info
Found in README.md by markdownlint

Code block style
Confirmed

    RUBYGEMS_PROXY=true rackup
Severity: Info
Found in README.md by markdownlint

Pass array contents as separate arguments.
Open

    data:                           File.join(File.dirname(__FILE__), *%w[.. data]),
Severity: Minor
Found in lib/geminabox.rb by rubocop

This cop checks for unneeded usages of splat expansion

Example:

# bad

a = *[1, 2, 3]
a = *'a'
a = *1

begin
  foo
rescue *[StandardError, ApplicationError]
  bar
end

case foo
when *[1, 2, 3]
  bar
else
  baz
end

Example:

# good

c = [1, 2, 3]
a = *c
a, b = *c
a, *b = *c
a = *1..10
a = ['a']

begin
  foo
rescue StandardError, ApplicationError
  bar
end

case foo
when *[1, 2, 3]
  bar
else
  baz
end

Do not prefix writer method names with set_.
Open

    def set_auth(*args)
Severity: Minor
Found in lib/geminabox/http_adapter.rb by rubocop

This cop makes sure that accessor methods are named properly.

Example:

# bad
def set_attribute(value)
end

# good
def attribute=(value)
end

# bad
def get_attribute
end

# good
def attribute
end

Code block style
Confirmed

    Geminabox.rubygems_proxy = true
Severity: Info
Found in README.md by markdownlint

Code block style
Confirmed

    gem install geminabox
Severity: Info
Found in README.md by markdownlint

Code block style
Confirmed

    Usage: gem inabox GEM [options]
Severity: Info
Found in README.md by markdownlint

Final newline missing.
Open

end
Severity: Minor
Found in lib/geminabox/http_adapter.rb by rubocop

Line length
Open

    # Rack::Protection requires a session middleware, choose your favorite one such as Rack::Session::Memcache.
Severity: Info
Found in README.md by markdownlint

MD013 - Line length

Tags: line_length

Aliases: line-length Parameters: linelength, codeblocks, tables (number; default 80, boolean; default true)

This rule is triggered when there are lines that are longer than the configured line length (default: 80 characters). To fix this, split the line up into multiple lines.

This rule has an exception where there is no whitespace beyond the configured line length. This allows you to still include items such as long URLs without being forced to break them in the middle.

You also have the option to exclude this rule for code blocks and tables. To do this, set the code_blocks and/or tables parameters to false.

Code blocks are included in this rule by default since it is often a requirement for document readability, and tentatively compatible with code rules. Still, some languages do not lend themselves to short lines.

Severity
Category
Status
Source
Language