rubocop-on-rbs 0.5.0 → 0.6.0
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/CHANGELOG.md +6 -0
- data/lib/rubocop/rbs/cop_base.rb +7 -3
- data/lib/rubocop/rbs/processed_rbs_source.rb +4 -0
- data/lib/rubocop/rbs/version.rb +1 -1
- metadata +5 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 05fc386350ef8ab36fc84937e1c3d5f2abdd95e816c8fc4a3ce80f41791475aa
         | 
| 4 | 
            +
              data.tar.gz: 5b38f37836d5858ff196abd454bbfa14432ffdca49f8e89cfc88e61490da6d61
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 4845db99745dab9b0c833fc4bf67e848aab97ed5cbe9e23279d2cf6ff867d100357dac144a261e1af279b415aa49848603a631caac38ea9f4b3a7a2732097001
         | 
| 7 | 
            +
              data.tar.gz: e316da95415babf17a4e9d8d59008e6cf9a47ccfef2ed745b90652be9baa76b96c88ace1d0693fa58ea6229dd46282d030413fdbc0c2f649d0db373730903c8d
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -1,5 +1,11 @@ | |
| 1 1 | 
             
            ## [Unreleased]
         | 
| 2 2 |  | 
| 3 | 
            +
            ## [0.5.0] - 2024-06-17
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            * Fix destructive change by @ksss in https://github.com/ksss/rubocop-on-rbs/pull/17
         | 
| 6 | 
            +
            * Introduce cache by @ksss in https://github.com/ksss/rubocop-on-rbs/pull/18
         | 
| 7 | 
            +
            * Fix bug for EmptyArgument by @ksss in https://github.com/ksss/rubocop-on-rbs/pull/19
         | 
| 8 | 
            +
             | 
| 3 9 | 
             
            ## [0.4.0] - 2024-06-14
         | 
| 4 10 |  | 
| 5 11 | 
             
            * Split RuboCop task by @ksss in https://github.com/ksss/rubocop-on-rbs/pull/6
         | 
    
        data/lib/rubocop/rbs/cop_base.rb
    CHANGED
    
    | @@ -51,9 +51,6 @@ module RuboCop | |
| 51 51 | 
             
                    if processed_rbs_source.error
         | 
| 52 52 | 
             
                      on_rbs_parsing_error()
         | 
| 53 53 | 
             
                    else
         | 
| 54 | 
            -
                      # HACK: Autocorrector needs to clear diagnostics
         | 
| 55 | 
            -
                      processed_source.diagnostics.clear
         | 
| 56 | 
            -
             | 
| 57 54 | 
             
                      on_rbs_new_investigation()
         | 
| 58 55 |  | 
| 59 56 | 
             
                      processed_rbs_source.decls.each do |decl|
         | 
| @@ -113,6 +110,13 @@ module RuboCop | |
| 113 110 | 
             
                  def tokenize(source)
         | 
| 114 111 | 
             
                    ::RBS::Parser.lex(source).value.reject { |t| t.type == :tTRIVIA }
         | 
| 115 112 | 
             
                  end
         | 
| 113 | 
            +
             | 
| 114 | 
            +
                  private
         | 
| 115 | 
            +
             | 
| 116 | 
            +
                  # HACK: Required to autocorrect
         | 
| 117 | 
            +
                  def current_corrector
         | 
| 118 | 
            +
                    @current_corrector ||= RuboCop::Cop::Corrector.new(@processed_source) if @processed_rbs_source.valid_syntax?
         | 
| 119 | 
            +
                  end
         | 
| 116 120 | 
             
                end
         | 
| 117 121 | 
             
              end
         | 
| 118 122 | 
             
            end
         | 
    
        data/lib/rubocop/rbs/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: rubocop-on-rbs
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.6.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - ksss
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2024-06- | 
| 11 | 
            +
            date: 2024-06-18 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rbs
         | 
| @@ -101,6 +101,9 @@ homepage: https://github.com/ksss/rubocop-on-rbs | |
| 101 101 | 
             
            licenses:
         | 
| 102 102 | 
             
            - MIT
         | 
| 103 103 | 
             
            metadata:
         | 
| 104 | 
            +
              homepage_uri: https://github.com/ksss/rubocop-on-rbs
         | 
| 105 | 
            +
              source_code_uri: https://github.com/ksss/rubocop-on-rbs
         | 
| 106 | 
            +
              changelog_uri: https://github.com/ksss/rubocop-on-rbs
         | 
| 104 107 | 
             
              rubygems_mfa_required: 'true'
         | 
| 105 108 | 
             
            post_install_message:
         | 
| 106 109 | 
             
            rdoc_options: []
         |