utils: Add a comment to module Kernel to appease RuboCop

- This `Homebrew/utils.rb` file contains one `@api public` method so it's now
  included in `Style/Documentation`.
- This method not having a comment was causing the style specs to fail because
  this file isn't usually failing RuboCop.
- And the test description was confusing so I improved it.
This commit is contained in:
Issy Long 2023-02-26 14:50:34 +00:00
parent 32e7268596
commit 316df75da9
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
# typed: false
# frozen_string_literal: true
# Contains shorthand Homebrew utility methods like `ohai`, `opoo`, `odisabled`.
module Kernel
extend T::Sig

View File

@ -40,7 +40,7 @@ describe Homebrew::Style do
describe ".check_style_and_print" do
let(:dir) { mktmpdir }
it "returns false for conforming file with only audit-level violations" do
it "returns true (success) for conforming file with only audit-level violations" do
# This file is known to use non-rocket hashes and other things that trigger audit,
# but not regular, cop violations
target_file = HOMEBREW_LIBRARY_PATH/"utils.rb"