rf-stylez 0.2.20 → 0.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rf/stylez.rb +1 -0
- data/lib/rf/stylez/version.rb +1 -1
- data/lib/rubocop/cop/lint/no_untyped_raise.rb +25 -0
- metadata +2 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: e338d091bd347d613853b44a4b25492669a7cbe5625253ad3ed1e9c341b9f7fe
         | 
| 4 | 
            +
              data.tar.gz: 614773200d4e883a941ed1416bc6bfe13ba3d1961964da8d998ced9c9fd5da2d
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: ffecececbf89e8e1baaaca9cf3b12366987ca7c25ab07c6b3a029979d9edda614ddf0b1fa1f9e8a56dcd5b1007f7f0744f5b25275f47e1eb0c88386ccdb18a56
         | 
| 7 | 
            +
              data.tar.gz: 54e46552f0eeb5d9a228cfe60dd353b6eb564d2bb1d660010124f99c5956bb3ea1ddcc9d7b4280af3e08a5ce858741a6ab9ee25c905c782a3e881d14aa6856c3
         | 
    
        data/lib/rf/stylez.rb
    CHANGED
    
    
    
        data/lib/rf/stylez/version.rb
    CHANGED
    
    
| @@ -0,0 +1,25 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module RuboCop
         | 
| 4 | 
            +
              module Cop
         | 
| 5 | 
            +
                module Lint
         | 
| 6 | 
            +
                  # @example
         | 
| 7 | 
            +
                  #   # bad
         | 
| 8 | 
            +
                  #   raise 'foo'
         | 
| 9 | 
            +
                  #
         | 
| 10 | 
            +
                  #   # good
         | 
| 11 | 
            +
                  #   raise ArgumentError, 'foo'
         | 
| 12 | 
            +
                  #
         | 
| 13 | 
            +
                  class NoUntypedRaise < Cop
         | 
| 14 | 
            +
                    MSG = 'Do not raise untyped exceptions, specify the error type so it can be rescued specifically.'
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                    def_node_matcher :is_untyped_raise?, '(send nil? {:raise :fail} (str ...) ...)'
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                    def on_send(node)
         | 
| 19 | 
            +
                      return unless is_untyped_raise?(node)
         | 
| 20 | 
            +
                      add_offense(node)
         | 
| 21 | 
            +
                    end
         | 
| 22 | 
            +
                  end
         | 
| 23 | 
            +
                end
         | 
| 24 | 
            +
              end
         | 
| 25 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: rf-stylez
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.2. | 
| 4 | 
            +
              version: 0.2.21
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Emanuel Evans
         | 
| @@ -119,6 +119,7 @@ files: | |
| 119 119 | 
             
            - lib/rubocop/cop/lint/no_grape_api.rb
         | 
| 120 120 | 
             
            - lib/rubocop/cop/lint/no_http_party.rb
         | 
| 121 121 | 
             
            - lib/rubocop/cop/lint/no_json.rb
         | 
| 122 | 
            +
            - lib/rubocop/cop/lint/no_untyped_raise.rb
         | 
| 122 123 | 
             
            - lib/rubocop/cop/lint/obscure.rb
         | 
| 123 124 | 
             
            - lib/rubocop/cop/lint/use_positive_int32_validator.rb
         | 
| 124 125 | 
             
            - rf-stylez.gemspec
         |