From 26829df4a056d42168c9c180568caa598b39729f Mon Sep 17 00:00:00 2001 From: Evan Read Date: Tue, 17 Nov 2020 15:34:03 +1000 Subject: Fix two Rubocop errors --- lib/checks/anchors.rb | 2 +- lib/gitlab/docs/nanoc.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/checks/anchors.rb b/lib/checks/anchors.rb index 21904e35..91238bfc 100644 --- a/lib/checks/anchors.rb +++ b/lib/checks/anchors.rb @@ -23,5 +23,5 @@ Nanoc::Check.define(:internal_anchors) do end end end - add_issue "#{issues.count} offenses found!" if issues.count > 0 + add_issue "#{issues.count} offenses found!" if issues.count.positive? end diff --git a/lib/gitlab/docs/nanoc.rb b/lib/gitlab/docs/nanoc.rb index 70b4c397..dbda9d40 100644 --- a/lib/gitlab/docs/nanoc.rb +++ b/lib/gitlab/docs/nanoc.rb @@ -2,7 +2,7 @@ module Gitlab module Docs module Nanoc def self.config - @config ||= YAML.load(File.read('nanoc.yaml')) + @config ||= YAML.safe_load(File.read('nanoc.yaml')) end def self.output_dir -- cgit v1.2.3