Showing 39 of 39 total issues
Line is too long. [81/80] Open
# 4. plus base extra charges for internaltional shipping and insurrance charge?
- Exclude checks
Optional arguments should appear at the end of the argument list. Open
def domestic(size = 120, to_state)
- Read upRead up
- Exclude checks
This cop checks for optional arguments to methods that do not come at the end of the argument list
Example:
# bad
def foo(a = 1, b, c)
end
# good
def baz(a, b, c = 1)
end
def foobar(a = 1, b = 2, c = 3)
end
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
source "https://rubygems.org"
- Exclude checks
Line length Open
Bug reports and pull requests are welcome on GitHub at https://github.com/aromajoin/jp-shipping-rate. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
- Read upRead up
- Exclude checks
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.
Use the new Ruby 1.9 hash syntax. Open
task :default => :spec
- Read upRead up
- Exclude checks
This cop checks hash literal syntax.
It can enforce either the use of the class hash rocket syntax or the use of the newer Ruby 1.9 syntax (when applicable).
A separate offense is registered for each problematic pair.
The supported styles are:
- ruby19 - forces use of the 1.9 syntax (e.g.
{a: 1}
) when hashes have all symbols for keys - hash_rockets - forces use of hash rockets for all hashes
- nomixedkeys - simply checks for hashes with mixed syntaxes
- ruby19nomixed_keys - forces use of ruby 1.9 syntax and forbids mixed syntax hashes
Example:
"EnforcedStyle => 'ruby19'"
# good
{a: 2, b: 1}
{:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol
{d: 1, 'e' => 2} # technically not forbidden
# bad
{:a => 2}
{b: 1, :c => 2}
Example:
"EnforcedStyle => 'hash_rockets'"
# good
{:a => 1, :b => 2}
# bad
{a: 1, b: 2}
{c: 1, 'd' => 5}
Example:
"EnforcedStyle => 'no_mixed_keys'"
# good
{:a => 1, :b => 2}
{c: 1, d: 2}
# bad
{:a => 1, b: 2}
{c: 1, 'd' => 2}
Example:
"EnforcedStyle => 'ruby19_no_mixed_keys'"
# good
{a: 1, b: 2}
{:c => 3, 'd' => 4}
# bad
{:a => 1, :b => 2}
{c: 2, 'd' => 3} # should just use hash rockets
Use %q
only for strings that contain both single quotes and double quotes. Open
spec.description = %q{it provides EMS shipping rate calculation for Japan}
- Exclude checks
Bare URL used Open
Bug reports and pull requests are welcome on GitHub at https://github.com/aromajoin/jp-shipping-rate. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
- Read upRead up
- Exclude checks
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`
%q
-literals should be delimited by (
and )
. Open
spec.summary = %q{A Ruby gem for Japan shipping rate calculation.}
- Read upRead up
- Exclude checks
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)
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
require "bundler/setup"
- Exclude checks
Don't leave trailing whitespace Open
- Exclude checks
Don't leave trailing whitespace Open
- Exclude checks
Don't leave trailing whitespace Open
- Exclude checks
Don't leave trailing whitespace Open
- Exclude checks
Don't leave trailing whitespace Open
- Exclude checks
Don't leave trailing whitespace Open
- Exclude checks
Don't leave trailing whitespace Open
- Exclude checks
Don't leave trailing whitespace Open
- Exclude checks
Don't leave trailing whitespace Open
- Exclude checks
Don't leave trailing whitespace Open
- Exclude checks