Skip to content

Commit 9d8948f

Browse files
committed
Fix rubocop: Layout/EmptyLineAfterGuardClause
Addressing: C: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause. return nil if html_p.null? ^^^^^^^^^^^^^^^^^^^^^^^^^^
1 parent f605cd7 commit 9d8948f

File tree

6 files changed

+7
-0
lines changed

6 files changed

+7
-0
lines changed

lib/openscap/ds/arf.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def html
4848
html_p = OpenSCAP.ds_rds_session_get_html_report @session
4949
OpenSCAP.raise! if OpenSCAP.error?
5050
return nil if html_p.null?
51+
5152
html = html_p.read_string
5253
OpenSCAP::LibC.free html_p
5354
html

lib/openscap/xccdf/fix.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class Fix
66
def initialize(raw)
77
raise OpenSCAP::OpenSCAPError, "Cannot initialize #{self.class.name} with '#{raw}'" \
88
unless raw.is_a?(FFI::Pointer)
9+
910
@raw = raw
1011
end
1112

lib/openscap/xccdf/ident.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class Ident
66
def initialize(raw)
77
raise OpenSCAP::OpenSCAPError, "Cannot initialize #{self.class.name} with '#{raw}'" \
88
unless raw.is_a?(FFI::Pointer)
9+
910
@raw = raw
1011
end
1112

lib/openscap/xccdf/item.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class Item
1212
def self.build(t)
1313
raise OpenSCAP::OpenSCAPError, "Cannot initialize #{self.class.name} with #{t}" \
1414
unless t.is_a?(FFI::Pointer)
15+
1516
# This is Abstract base class that enables you to build its child
1617
case OpenSCAP.xccdf_item_get_type t
1718
when :group
@@ -27,6 +28,7 @@ def initialize(t)
2728
if self.class == OpenSCAP::Xccdf::Item
2829
raise OpenSCAP::OpenSCAPError, "Cannot initialize #{self.class.name} abstract base class."
2930
end
31+
3032
@raw = t
3133
end
3234

lib/openscap/xccdf/reference.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class Reference
66
def initialize(raw)
77
raise OpenSCAP::OpenSCAPError, "Cannot initialize #{self.class.name} with '#{raw}'" \
88
unless raw.is_a?(FFI::Pointer)
9+
910
@raw = raw
1011
end
1112

lib/openscap/xccdf/session.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module Xccdf
55
class Session
66
def initialize(input_filename)
77
raise OpenSCAPError, 'No filename specified!' unless input_filename
8+
89
@input_filename = input_filename
910
@s = OpenSCAP.xccdf_session_new(input_filename)
1011
OpenSCAP.raise! if @s.null?

0 commit comments

Comments
 (0)