Skip to content

Commit

Permalink
Add Safety section to documentation
Browse files Browse the repository at this point in the history
Follow up to rubocop/rubocop#10094.
  • Loading branch information
koic committed Oct 4, 2021
1 parent 6ddf6f7 commit d7fd07c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/modules/ROOT/pages/cops_minitest.adoc
Expand Up @@ -458,7 +458,9 @@ assert(actual, 'message')
This cop tries to detect when a user accidentally used
`assert` when they meant to use `assert_equal`.

It is marked as unsafe because it is not possible to determine
=== Safety

This cop is unsafe because it is not possible to determine
whether the second argument of `assert` is a message or not.

=== Examples
Expand Down
5 changes: 3 additions & 2 deletions lib/rubocop/cop/minitest/assert_with_expected_argument.rb
Expand Up @@ -6,8 +6,9 @@ module Minitest
# This cop tries to detect when a user accidentally used
# `assert` when they meant to use `assert_equal`.
#
# It is marked as unsafe because it is not possible to determine
# whether the second argument of `assert` is a message or not.
# @safety
# This cop is unsafe because it is not possible to determine
# whether the second argument of `assert` is a message or not.
#
# @example
# # bad
Expand Down

0 comments on commit d7fd07c

Please sign in to comment.