danger-chikuwatter 0.0.1 → 0.0.3
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/README.md +3 -3
- data/lib/chikuwatter/gem_version.rb +1 -1
- data/lib/chikuwatter/plugin.rb +4 -2
- data/spec/chikuwatter_spec.rb +3 -3
- data/spec/fixtures/analyze.log +7 -0
- metadata +3 -3
- data/spec/fixtures/result.log +0 -5
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: e7a602ef5810a9cfe876817c4c1b746266d715fd1af8a0928952488c91171426
         | 
| 4 | 
            +
              data.tar.gz: 3aadfb9008e6a0703436a87dccf63737bfc4a45b99e737a7c66a32a6bb61fc23
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 6a752695bba8e31fb3f379550cd2a85da512916155e66b469eb7177ac800c62e3fd6c55000d81d9bf25312142174e3638928d73ae4e6d358e31bddaf140af0e5
         | 
| 7 | 
            +
              data.tar.gz: c640f16976cdee35887a14680c8ce1c33ccb464b327accd0ba4e0e3f1f3f48ad190453a4e14b88fc266a6716ec2f04db935020ef9d0463187f6fcbaa2e5570fc
         | 
    
        data/README.md
    CHANGED
    
    | @@ -15,19 +15,19 @@ gem danger-chikuwa | |
| 15 15 | 
             
            Run flutter analyze and save the result to a file.
         | 
| 16 16 |  | 
| 17 17 | 
             
            ```
         | 
| 18 | 
            -
            $ flutter analyze  | 
| 18 | 
            +
            $ flutter analyze 2>&1 | tee result.log
         | 
| 19 19 | 
             
            ```
         | 
| 20 20 |  | 
| 21 21 | 
             
            Add the following to your Dangerfile.
         | 
| 22 22 |  | 
| 23 23 | 
             
            ```
         | 
| 24 | 
            -
             | 
| 24 | 
            +
            chikuwatter.report "analyze.log"
         | 
| 25 25 | 
             
            ```
         | 
| 26 26 |  | 
| 27 27 | 
             
            If `inline_mode` is true, the plugin will report the errors, warnings and **info** as inline comments.
         | 
| 28 28 |  | 
| 29 29 | 
             
            ```
         | 
| 30 | 
            -
             | 
| 30 | 
            +
            chikuwatter.inline_mode = true
         | 
| 31 31 | 
             
            ```
         | 
| 32 32 |  | 
| 33 33 | 
             
            ## Development
         | 
    
        data/lib/chikuwatter/plugin.rb
    CHANGED
    
    | @@ -81,9 +81,11 @@ module Danger | |
| 81 81 | 
             
                    type = Type.from_string(type_str)
         | 
| 82 82 | 
             
                    file, line_num = logs[2].strip!.split(":")
         | 
| 83 83 |  | 
| 84 | 
            -
                    message = "#{type_str} •  | 
| 84 | 
            +
                    message = "#{type_str} • `#{logs[3].strip!}`\n#{logs[1].strip!}"
         | 
| 85 85 |  | 
| 86 | 
            -
                    report_data.push( | 
| 86 | 
            +
                    report_data.push(
         | 
| 87 | 
            +
                      ReportData.new(message, type, file, line_num.to_i)
         | 
| 88 | 
            +
                    )
         | 
| 87 89 | 
             
                  end
         | 
| 88 90 |  | 
| 89 91 | 
             
                  return report_data
         | 
    
        data/spec/chikuwatter_spec.rb
    CHANGED
    
    | @@ -31,11 +31,11 @@ module Danger | |
| 31 31 | 
             
                  end
         | 
| 32 32 |  | 
| 33 33 | 
             
                  it "Report" do
         | 
| 34 | 
            -
                    file_path = "#{File.dirname(__FILE__)}/fixtures/ | 
| 34 | 
            +
                    file_path = "#{File.dirname(__FILE__)}/fixtures/analyze.log"
         | 
| 35 35 | 
             
                    @my_plugin.inline_mode = true
         | 
| 36 36 | 
             
                    @my_plugin.report file_path
         | 
| 37 | 
            -
                    expect(@dangerfile.status_report[:warnings]).to eq(["warning •  | 
| 38 | 
            -
                    expect(@dangerfile.status_report[:errors]).to eq(["error •  | 
| 37 | 
            +
                    expect(@dangerfile.status_report[:warnings]).to eq(["warning • `invalid_null_aware_operator`\nThe receiver can't be null, so the null-aware operator '?.' is unnecessary", "info • `deprecated_member_use`\n'headline1' is deprecated and shouldn't be used. Use displayLarge instead. This feature was deprecated after v3.1.0-0.0.pre"])
         | 
| 38 | 
            +
                    expect(@dangerfile.status_report[:errors]).to eq(["error • `argument_type_not_assignable`\nThe argument type 'String?' can't be assigned to the parameter type 'String'"])
         | 
| 39 39 | 
             
                  end
         | 
| 40 40 | 
             
                end
         | 
| 41 41 | 
             
              end
         | 
| @@ -0,0 +1,7 @@ | |
| 1 | 
            +
            Analyzing test...                                               
         | 
| 2 | 
            +
             | 
| 3 | 
            +
              error • The argument type 'String?' can't be assigned to the parameter type 'String' • lib/main.dart:76:21 • argument_type_not_assignable
         | 
| 4 | 
            +
            warning • The receiver can't be null, so the null-aware operator '?.' is unnecessary • lib/main.dart:76:27 • invalid_null_aware_operator
         | 
| 5 | 
            +
               info • 'headline1' is deprecated and shouldn't be used. Use displayLarge instead. This feature was deprecated after v3.1.0-0.0.pre • lib/main.dart:103:50 • deprecated_member_use
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            3 issues found. (ran in 0.7s)
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: danger-chikuwatter
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - watanavex
         | 
| @@ -172,7 +172,7 @@ files: | |
| 172 172 | 
             
            - lib/danger_chikuwatter.rb
         | 
| 173 173 | 
             
            - lib/danger_plugin.rb
         | 
| 174 174 | 
             
            - spec/chikuwatter_spec.rb
         | 
| 175 | 
            -
            - spec/fixtures/ | 
| 175 | 
            +
            - spec/fixtures/analyze.log
         | 
| 176 176 | 
             
            - spec/spec_helper.rb
         | 
| 177 177 | 
             
            homepage: https://github.com/watanavex/danger-chikuwatter
         | 
| 178 178 | 
             
            licenses:
         | 
| @@ -199,5 +199,5 @@ specification_version: 4 | |
| 199 199 | 
             
            summary: A longer description of danger-chikuwatter.
         | 
| 200 200 | 
             
            test_files:
         | 
| 201 201 | 
             
            - spec/chikuwatter_spec.rb
         | 
| 202 | 
            -
            - spec/fixtures/ | 
| 202 | 
            +
            - spec/fixtures/analyze.log
         | 
| 203 203 | 
             
            - spec/spec_helper.rb
         |