Skip to content

Commit

Permalink
Add documentation to the cop
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
fatkodima committed Sep 26, 2023
1 parent dca9af4 commit b2d3943
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/rubocop/cop/style/disable_syntax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
module RuboCop
module Cop
module Style
# Forbid some unfavorite ruby syntax, such as `unless`, safe navigation etc.
#
# You can set syntax you want to disable via `DisableSyntax`.
# Available are: 'unless', 'ternary', 'safe_navigation', 'endless_methods',
# 'arguments_forwarding', 'numbered_parameters', 'pattern_matching',
# 'shorthand_hash_syntax', 'and_or_not', 'until', and 'percent_literals'.
#
# @example DisableSyntax: ['unless']
# # bad
# do_something unless condition
#
# # good
# do_something if !condition
#
class DisableSyntax < Base
extend AutoCorrector

Expand Down

0 comments on commit b2d3943

Please sign in to comment.