Showing 1,243 of 1,244 total issues
Line is too long. [115/80] Open
elsif !dasm.get_label_at(di.instruction.args.last).nil? && dasm.get_label_at(di.instruction.args.last) =~ /^loc_/
- Exclude checks
Line is too long. [120/80] Open
if !argStr.nil? && (argStr.length > 4) && (argStr.gsub(/[\x00]/n, '') !~ /([\x7f-\xff]|[\x01-\x08]|[\x0b-\x1f])/n)
- Exclude checks
Line is too long. [104/80] Open
comment += 'u"' + argStr.gsub(/[\x00]/n, '').gsub(/[\x0d]/n, '\\r').gsub(/[\x0a]/n, '\\n') + '"'
- Exclude checks
Avoid rescuing without specifying an error class. Open
rescue
- Read upRead up
- Exclude checks
This cop checks for rescuing StandardError
. There are two supported
styles implicit
and explicit
. This cop will not register an offense
if any error other than StandardError
is specified.
Example: EnforcedStyle: implicit
# `implicit` will enforce using `rescue` instead of
# `rescue StandardError`.
# bad
begin
foo
rescue StandardError
bar
end
# good
begin
foo
rescue
bar
end
# good
begin
foo
rescue OtherError
bar
end
# good
begin
foo
rescue StandardError, SecurityError
bar
end
Example: EnforcedStyle: explicit (default)
# `explicit` will enforce using `rescue StandardError`
# instead of `rescue`.
# bad
begin
foo
rescue
bar
end
# good
begin
foo
rescue StandardError
bar
end
# good
begin
foo
rescue OtherError
bar
end
# good
begin
foo
rescue StandardError, SecurityError
bar
end
Line is too long. [147/80] Open
tempargs << 'a"' + dasm.decode_strz(tempdi.instruction.args.last).gsub(/[\x00]/n, '').gsub(/[\x0d]/n, '\\r').gsub(/[\x0a]/n, '\\n') + '"'
- Exclude checks
Line is too long. [148/80] Open
tempargs << 'u"' + dasm.decode_wstrz(tempdi.instruction.args.last).gsub(/[\x00]/n, '').gsub(/[\x0d]/n, '\\r').gsub(/[\x0a]/n, '\\n') + '"'
- Exclude checks
Line is too long. [141/80] Open
puts "loc_#{dasm.normalize(tempdi.instruction.args.last).to_s(16)}h_at_0x#{dasm.normalize(tempdi.instruction.args.last).to_s(16)}_"
- Exclude checks
Line is too long. [148/80] Open
tempargs << "loc_#{dasm.normalize(tempdi.instruction.args.last).to_s(16)}h_at_0x#{dasm.normalize(tempdi.instruction.args.last).to_s(16)}_"
- Exclude checks
Line is too long. [131/80] Open
elsif dasm.backtrace(tempdi.instruction.args.last.symbolic(tempdi), tempdi.address, origin: tempdi.address, type: :x) != []
- Exclude checks
Line is too long. [367/80] Open
datas = datas.gsub(call_stub, "<a xlink:href=\"#{call_stub.split('_at_0x')[1].split('_')[0]}\" stroke-width=\"0.7\" stroke=\"blue\" fill=\"blue\">#{call_stub.split('_at_0x')[0].gsub('_','_<!-- -->')}</a><a xlink:href=\"javascript:displayRenameBox(0x#{call_stub.split('_at_0x')[1].split('_')[0]});\" stroke-width=\"0.6\" stroke=\"#80c000\" fill=\"#80c000\">[R]</a>")
- Exclude checks
Line is too long. [146/80] Open
elsif (dasm.normalize(tempdi.instruction.args.last).is_a? Integer) && (isStartFunction(dasm.normalize(tempdi.instruction.args.last)) == 1)
- Exclude checks
Line is too long. [367/80] Open
datas = datas.gsub(call_stub, "<a xlink:href=\"#{call_stub.split('_at_0x')[1].split('_')[0]}\" stroke-width=\"0.7\" stroke=\"blue\" fill=\"blue\">#{call_stub.split('_at_0x')[0].gsub('_','_<!-- -->')}</a><a xlink:href=\"javascript:displayRenameBox(0x#{call_stub.split('_at_0x')[1].split('_')[0]});\" stroke-width=\"0.6\" stroke=\"#80c000\" fill=\"#80c000\">[R]</a>")
- Exclude checks
Line is too long. [82/80] Open
tempargs << '0x' + dasm.normalize(tempdi.instruction.args.last).to_s(16)
- Exclude checks
Line is too long. [126/80] Open
ret = di.to_s.gsub('\\', '\\\\\\').gsub('"', '\\"').gsub(di.instruction.args.first.to_s, di.instruction.args.first.to_s)
- Exclude checks
Line is too long. [103/80] Open
fd.puts ' "0x' + curblock.to_s(16) + '" [color="lightgray", label="' + cblock + '\\l"];'
- Exclude checks
Use snake_case for method names. Open
def parseInstr(di)
- Read upRead up
- Exclude checks
This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.
Example: EnforcedStyle: snake_case (default)
# bad
def fooBar; end
# good
def foo_bar; end
Example: EnforcedStyle: camelCase
# bad
def foo_bar; end
# good
def fooBar; end
Avoid rescuing without specifying an error class. Open
rescue
- Read upRead up
- Exclude checks
This cop checks for rescuing StandardError
. There are two supported
styles implicit
and explicit
. This cop will not register an offense
if any error other than StandardError
is specified.
Example: EnforcedStyle: implicit
# `implicit` will enforce using `rescue` instead of
# `rescue StandardError`.
# bad
begin
foo
rescue StandardError
bar
end
# good
begin
foo
rescue
bar
end
# good
begin
foo
rescue OtherError
bar
end
# good
begin
foo
rescue StandardError, SecurityError
bar
end
Example: EnforcedStyle: explicit (default)
# `explicit` will enforce using `rescue StandardError`
# instead of `rescue`.
# bad
begin
foo
rescue
bar
end
# good
begin
foo
rescue StandardError
bar
end
# good
begin
foo
rescue OtherError
bar
end
# good
begin
foo
rescue StandardError, SecurityError
bar
end
Line is too long. [145/80] Open
tempargs << dasm.backtrace(tempdi.instruction.args.last.symbolic(tempdi), tempdi.address, origin: tempdi.address, type: :x).reduce.to_s
- Exclude checks
Line is too long. [167/80] Open
comment += " #{dasm.get_label_at(dasm.normalize(di.instruction.args.last))}" unless comment.include?(dasm.get_label_at(dasm.normalize(di.instruction.args.last)))
- Exclude checks
Avoid more than 3 levels of block nesting. Open
comment += ' -> ' + dasm.di_at(tramp.instruction.args.last.symbolic.target.bind.reduce).to_s unless dasm.di_at(tramp.instruction.args.last.symbolic.target).nil?
- Read upRead up
- Exclude checks
This cop checks for excessive nesting of conditional and looping constructs.
You can configure if blocks are considered using the CountBlocks
option. When set to false
(the default) blocks are not counted
towards the nesting level. Set to true
to count blocks as well.
The maximum level of nesting allowed is configurable.