mirror of
https://github.com/inspec/inspec
synced 2024-11-10 23:24:18 +00:00
lint
This commit is contained in:
parent
8953278204
commit
26c0cd0871
2 changed files with 3 additions and 7 deletions
|
@ -5,7 +5,7 @@
|
|||
# license: All rights reserved
|
||||
|
||||
module Inspec::Resources
|
||||
class File < Inspec.resource(1)
|
||||
class File < Inspec.resource(1) # rubocop:disable Metrics/ClassLength
|
||||
name 'file'
|
||||
desc 'Use the file InSpec audit resource to test all system file types, including files, directories, symbolic links, named pipes, sockets, character devices, block devices, and doors.'
|
||||
example "
|
||||
|
|
|
@ -32,12 +32,8 @@ class Mount < Inspec.resource(1)
|
|||
|
||||
def count
|
||||
mounted = file.mounted
|
||||
|
||||
if !mounted.nil? && !mounted.stdout.nil? && !mounted.stdout.lines.nil?
|
||||
return nil if mounted.nil? || mounted.stdout.nil?
|
||||
mounted.stdout.lines.count
|
||||
else
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
def method_missing(name)
|
||||
|
|
Loading…
Reference in a new issue