danger-ktlint 0.0.2 → 0.0.6
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/.github/workflows/test.yml +19 -0
- data/CHANGELOG.md +28 -0
- data/README.md +33 -3
- data/danger-ktlint.gemspec +2 -13
- data/lib/ktlint/gem_version.rb +1 -1
- data/lib/ktlint/plugin.rb +125 -23
- data/spec/fixtures/ktlint_result.txt +6 -0
- data/spec/ktlint_spec.rb +58 -2
- data/spec/spec_helper.rb +17 -6
- metadata +14 -42
- data/.circleci/config.yml +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99b078a476493453fd609f033e65c6cd20d695617fc8a8a3e6a9c8b0b7745f3f
|
4
|
+
data.tar.gz: bf60ceecd5cf172c879f80183933b55274a5f1261f00fa241ae56fa95e9f44ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 255316fb1e4627d772601a0fc40ab3d8faf67e35696f4433477ed431a3de010a203e5f9201902c9c98f046450546d2829a457d980ce9d887a65db6dd4dc6b7ef
|
7
|
+
data.tar.gz: 325c2fb3d73b05a9a4e8256c94accab75a8bdec4978d46d8b8ef1db6adea6947b776dcb1316be2271d6079f8f12347dcb02b13e4a600a546d4e6f67ce3dd98f3
|
@@ -0,0 +1,19 @@
|
|
1
|
+
name: test
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
name: Run spec
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@v2
|
12
|
+
- uses: ruby/setup-ruby@v1
|
13
|
+
with:
|
14
|
+
ruby-version: 3.0.1
|
15
|
+
bundler-cache: true
|
16
|
+
- name: Run spec
|
17
|
+
run: |
|
18
|
+
bundle exec rspec spec
|
19
|
+
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
## Unreleased
|
2
|
+
|
3
|
+
## 0.0.6
|
4
|
+
|
5
|
+
- Support GitLab and BitBucket server even if `inline_mode: false` is specified.
|
6
|
+
|
7
|
+
## 0.0.5
|
8
|
+
|
9
|
+
### Fixed
|
10
|
+
|
11
|
+
- Fixed to not check ktlint binary even when skip_task is specified.
|
12
|
+
|
13
|
+
## 0.0.4
|
14
|
+
|
15
|
+
### Added
|
16
|
+
- ktlint task can be skipped by specifing `ktlint.skip_lint = true` and `ktlint.report_file = '...'`
|
17
|
+
|
18
|
+
## 0.0.3
|
19
|
+
### Added
|
20
|
+
- `limit` parameter to set the maximum number of comments of ktlint results.
|
21
|
+
|
22
|
+
## 0.0.2
|
23
|
+
### Added
|
24
|
+
- Inline comment feature (`inline_mode: true` with ktlint.lint)
|
25
|
+
|
26
|
+
## 0.0.1
|
27
|
+
### Added
|
28
|
+
- Run ktlint by ktlint.lint
|
data/README.md
CHANGED
@@ -5,16 +5,18 @@ Lint kotlin files only changed files in a pull request using ktlint command lint
|
|
5
5
|
## Installation
|
6
6
|
|
7
7
|
```ruby
|
8
|
-
|
8
|
+
gem install danger-ktlint
|
9
9
|
```
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
13
|
You need to install `ktlint` command and set as executable first, see: https://ktlint.github.io/#getting-started.
|
14
14
|
|
15
|
+
If you want to skip ktlint task, for example to only comment on the results of ktlint, no need to install ktlint. See https://github.com/mataku/danger-ktlint#skip-ktlint-task.
|
16
|
+
|
15
17
|
```bash
|
16
18
|
# Example
|
17
|
-
|
19
|
+
curl --output /usr/local/bin/ktlint -sL https://github.com/pinterest/ktlint/releases/download/$KTLINT_VERSION/ktlint && chmod a+x /usr/local/bin/ktlint
|
18
20
|
```
|
19
21
|
|
20
22
|
Add this to Dangerfile.
|
@@ -23,12 +25,40 @@ Add this to Dangerfile.
|
|
23
25
|
ktlint.lint
|
24
26
|
|
25
27
|
# If you want inline comments, specify `ktlint.lint` with `inline_mode: true`
|
26
|
-
ktlint.lint(inline_mode: true)
|
28
|
+
# ktlint.lint(inline_mode: true)
|
27
29
|
```
|
28
30
|
|
31
|
+
### Options
|
32
|
+
#### Set maximum number of comments of ktlint results
|
33
|
+
|
34
|
+
Default is `nil`, all comments are sent.
|
35
|
+
|
36
|
+
```shell
|
37
|
+
ktlint.limit = 3
|
38
|
+
ktlint.lint
|
39
|
+
```
|
40
|
+
|
41
|
+
#### Skip ktlint task
|
42
|
+
|
43
|
+
Default is false.
|
44
|
+
|
45
|
+
```shell
|
46
|
+
ktlint.skip_lint = true
|
47
|
+
# If skip_lint is specified, report_file must also be specified.
|
48
|
+
ktlint.report_file = 'result.json'
|
49
|
+
ktlint.lint
|
50
|
+
```
|
51
|
+
|
52
|
+
## CHANGELOG
|
53
|
+
|
54
|
+
See [CHANGELOG.md](https://github.com/mataku/danger-ktlint/blob/master/CHANGELOG.md).
|
55
|
+
|
29
56
|
## TODO
|
30
57
|
|
31
58
|
- filtering: false (default: filtering: true behavior)
|
59
|
+
- Allow plain or html report_file (Currently only JSON is supported.)
|
60
|
+
- Install ktlint and use it if ktlint binary does not exist
|
61
|
+
- Support for services other than GitHub
|
32
62
|
|
33
63
|
## Development
|
34
64
|
|
data/danger-ktlint.gemspec
CHANGED
@@ -21,29 +21,18 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_runtime_dependency 'danger-plugin-api', '~> 1.0'
|
22
22
|
|
23
23
|
# General ruby development
|
24
|
-
spec.add_development_dependency 'bundler', '~>
|
25
|
-
spec.add_development_dependency 'rake'
|
24
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
25
|
+
spec.add_development_dependency 'rake'
|
26
26
|
|
27
27
|
# Testing support
|
28
28
|
spec.add_development_dependency 'rspec', '~> 3.4'
|
29
29
|
|
30
30
|
# Linting code and docs
|
31
31
|
spec.add_development_dependency "rubocop"
|
32
|
-
spec.add_development_dependency "yard"
|
33
32
|
|
34
33
|
# Makes testing easy via `bundle exec guard`
|
35
34
|
spec.add_development_dependency 'guard', '~> 2.14'
|
36
35
|
spec.add_development_dependency 'guard-rspec', '~> 4.7'
|
37
36
|
|
38
|
-
# If you want to work on older builds of ruby
|
39
|
-
spec.add_development_dependency 'listen', '3.0.7'
|
40
|
-
|
41
|
-
# This gives you the chance to run a REPL inside your tests
|
42
|
-
# via:
|
43
|
-
#
|
44
|
-
# require 'pry'
|
45
|
-
# binding.pry
|
46
|
-
#
|
47
|
-
# This will stop test execution and let you inspect the results
|
48
37
|
spec.add_development_dependency 'pry'
|
49
38
|
end
|
data/lib/ktlint/gem_version.rb
CHANGED
data/lib/ktlint/plugin.rb
CHANGED
@@ -1,31 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'json'
|
2
4
|
|
3
5
|
module Danger
|
4
6
|
class DangerKtlint < Plugin
|
7
|
+
class UnexpectedLimitTypeError < StandardError; end
|
8
|
+
|
9
|
+
class UnsupportedServiceError < StandardError
|
10
|
+
def initialize(message = 'Unsupported service! Currently supported services are GitHub, GitLab and BitBucket server.')
|
11
|
+
super(message)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
AVAILABLE_SERVICES = [:github, :gitlab, :bitbucket_server]
|
16
|
+
|
5
17
|
# TODO: Lint all files if `filtering: false`
|
6
18
|
attr_accessor :filtering
|
7
19
|
|
20
|
+
attr_accessor :skip_lint, :report_file
|
21
|
+
|
22
|
+
def limit
|
23
|
+
@limit ||= nil
|
24
|
+
end
|
25
|
+
|
26
|
+
def limit=(limit)
|
27
|
+
if limit != nil && limit.integer?
|
28
|
+
@limit = limit
|
29
|
+
else
|
30
|
+
raise UnexpectedLimitTypeError
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
8
34
|
# Run ktlint task using command line interface
|
9
35
|
# Will fail if `ktlint` is not installed
|
10
36
|
# Skip lint task if files changed are empty
|
11
37
|
# @return [void]
|
12
38
|
# def lint(inline_mode: false)
|
13
39
|
def lint(inline_mode: false)
|
14
|
-
unless
|
15
|
-
|
16
|
-
return
|
40
|
+
unless supported_service?
|
41
|
+
raise UnsupportedServiceError.new
|
17
42
|
end
|
18
43
|
|
19
44
|
targets = target_files(git.added_files + git.modified_files)
|
20
|
-
return if targets.empty?
|
21
45
|
|
22
|
-
results =
|
23
|
-
|
46
|
+
results = ktlint_results(targets)
|
47
|
+
if results.nil? || results.empty?
|
48
|
+
return
|
49
|
+
end
|
24
50
|
|
25
51
|
if inline_mode
|
26
|
-
send_inline_comments(results)
|
52
|
+
send_inline_comments(results, targets)
|
27
53
|
else
|
28
|
-
send_markdown_comment(results)
|
54
|
+
send_markdown_comment(results, targets)
|
29
55
|
end
|
30
56
|
end
|
31
57
|
|
@@ -45,23 +71,44 @@ module Danger
|
|
45
71
|
# ]
|
46
72
|
# }
|
47
73
|
# ]
|
48
|
-
def send_markdown_comment(results)
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
74
|
+
def send_markdown_comment(results, targets)
|
75
|
+
catch(:loop_break) do
|
76
|
+
count = 0
|
77
|
+
results.each do |result|
|
78
|
+
result['errors'].each do |error|
|
79
|
+
file_path = relative_file_path(result['file'])
|
80
|
+
next unless targets.include?(file_path)
|
81
|
+
|
82
|
+
message = "#{file_html_link(file_path, error['line'])}: #{error['message']}"
|
83
|
+
fail(message)
|
84
|
+
unless limit.nil?
|
85
|
+
count += 1
|
86
|
+
if count >= limit
|
87
|
+
throw(:loop_break)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
56
93
|
end
|
57
94
|
|
58
|
-
def send_inline_comments(results)
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
95
|
+
def send_inline_comments(results, targets)
|
96
|
+
catch(:loop_break) do
|
97
|
+
count = 0
|
98
|
+
results.each do |result|
|
99
|
+
result['errors'].each do |error|
|
100
|
+
file_path = relative_file_path(result['file'])
|
101
|
+
next unless targets.include?(file_path)
|
102
|
+
message = error['message']
|
103
|
+
line = error['line']
|
104
|
+
fail(message, file: result['file'], line: line)
|
105
|
+
unless limit.nil?
|
106
|
+
count += 1
|
107
|
+
if count >= limit
|
108
|
+
throw(:loop_break)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
65
112
|
end
|
66
113
|
end
|
67
114
|
end
|
@@ -72,10 +119,65 @@ module Danger
|
|
72
119
|
end
|
73
120
|
end
|
74
121
|
|
122
|
+
# Make it a relative path so it can compare it to git.added_files
|
123
|
+
def relative_file_path(file_path)
|
124
|
+
file_path.gsub(/#{pwd}\//, '')
|
125
|
+
end
|
126
|
+
|
75
127
|
private
|
76
128
|
|
129
|
+
def file_html_link(file_path, line_number)
|
130
|
+
file = if danger.scm_provider == :github
|
131
|
+
"#{file_path}#L#{line_number}"
|
132
|
+
else
|
133
|
+
file_path
|
134
|
+
end
|
135
|
+
scm_provider_klass.html_link(file)
|
136
|
+
end
|
137
|
+
|
138
|
+
# `eval` may be dangerous, but it does not accept any input because it accepts only defined as danger.scm_provider
|
139
|
+
def scm_provider_klass
|
140
|
+
@scm_provider_klass ||= eval(danger.scm_provider.to_s)
|
141
|
+
end
|
142
|
+
|
143
|
+
def pwd
|
144
|
+
@pwd ||= `pwd`.chomp
|
145
|
+
end
|
146
|
+
|
77
147
|
def ktlint_exists?
|
78
148
|
system 'which ktlint > /dev/null 2>&1'
|
79
149
|
end
|
150
|
+
|
151
|
+
def ktlint_results(targets)
|
152
|
+
if skip_lint
|
153
|
+
# TODO: Allow XML
|
154
|
+
if report_file.nil? || report_file.empty?
|
155
|
+
fail("If skip_lint is specified, You must specify ktlint report json file with `ktlint.report_file=...` in your Dangerfile.")
|
156
|
+
return
|
157
|
+
end
|
158
|
+
|
159
|
+
unless File.exists?(report_file)
|
160
|
+
fail("Couldn't find ktlint result json file.\nYou must specify it with `ktlint.report_file=...` in your Dangerfile.")
|
161
|
+
return
|
162
|
+
end
|
163
|
+
|
164
|
+
File.open(report_file) do |f|
|
165
|
+
JSON.load(f)
|
166
|
+
end
|
167
|
+
else
|
168
|
+
unless ktlint_exists?
|
169
|
+
fail("Couldn't find ktlint command. Install first.")
|
170
|
+
return
|
171
|
+
end
|
172
|
+
|
173
|
+
return if targets.empty?
|
174
|
+
|
175
|
+
JSON.parse(`ktlint #{targets.join(' ')} --reporter=json --relative`)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
def supported_service?
|
180
|
+
AVAILABLE_SERVICES.include?(danger.scm_provider.to_sym)
|
181
|
+
end
|
80
182
|
end
|
81
183
|
end
|
@@ -7,6 +7,12 @@
|
|
7
7
|
"column": 1,
|
8
8
|
"message": "Unexpected blank line(s) before \"}\"",
|
9
9
|
"rule": "no-blank-line-before-rbrace"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"line": 47,
|
13
|
+
"column": 1,
|
14
|
+
"message": "Unexpected blank line(s) before \"}\"",
|
15
|
+
"rule": "no-blank-line-before-rbrace"
|
10
16
|
}
|
11
17
|
]
|
12
18
|
}
|
data/spec/ktlint_spec.rb
CHANGED
@@ -9,6 +9,11 @@ module Danger
|
|
9
9
|
expect(Danger::DangerKtlint.new(nil)).to be_a Danger::Plugin
|
10
10
|
end
|
11
11
|
|
12
|
+
before do
|
13
|
+
allow_any_instance_of(Kernel).to receive(:`).with('pwd').and_return('/home/mataku')
|
14
|
+
allow_any_instance_of(Kernel).to receive(:`).with('which less').and_return(0)
|
15
|
+
end
|
16
|
+
|
12
17
|
describe '#lint' do
|
13
18
|
before do
|
14
19
|
allow_any_instance_of(Danger::DangerfileGitPlugin).to receive(:added_files).and_return(['app/src/main/java/com/mataku/Model.kt'])
|
@@ -31,11 +36,12 @@ module Danger
|
|
31
36
|
allow_any_instance_of(Kernel).to receive(:system).with('which ktlint > /dev/null 2>&1').and_return(true)
|
32
37
|
allow_any_instance_of(Kernel).to receive(:`).with('ktlint app/src/main/java/com/mataku/Model.kt --reporter=json --relative').and_return(dummy_ktlint_result)
|
33
38
|
allow_any_instance_of(Danger::DangerfileGitHubPlugin).to receive(:html_link).with('app/src/main/java/com/mataku/Model.kt#L46').and_return("<a href='https://github.com/mataku/android/blob/561827e46167077b5e53515b4b7349b8ae04610b/Model.kt'>Model.kt</a>")
|
39
|
+
allow_any_instance_of(Danger::DangerfileGitHubPlugin).to receive(:html_link).with('app/src/main/java/com/mataku/Model.kt#L47').and_return("<a href='https://github.com/mataku/android/blob/561827e46167077b5e53515b4b7349b8ae04610b/Model.kt'>Model.kt</a>")
|
34
40
|
end
|
35
41
|
|
36
42
|
it 'Sends markdown comment' do
|
37
43
|
plugin.lint
|
38
|
-
expect(dangerfile.status_report[:errors].size).to eq(
|
44
|
+
expect(dangerfile.status_report[:errors].size).to eq(2)
|
39
45
|
end
|
40
46
|
end
|
41
47
|
|
@@ -47,7 +53,57 @@ module Danger
|
|
47
53
|
|
48
54
|
it 'Sends inline comment' do
|
49
55
|
plugin.lint(inline_mode: true)
|
50
|
-
expect(dangerfile.status_report[:errors].size).to eq(
|
56
|
+
expect(dangerfile.status_report[:errors].size).to eq(2)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
context 'GitLab' do
|
61
|
+
let(:dangerfile) { testing_dangerfile_for_gitlab }
|
62
|
+
|
63
|
+
before do
|
64
|
+
allow_any_instance_of(Kernel).to receive(:system).with('which ktlint > /dev/null 2>&1').and_return(true)
|
65
|
+
allow_any_instance_of(Kernel).to receive(:`).with('ktlint app/src/main/java/com/mataku/Model.kt --reporter=json --relative').and_return(dummy_ktlint_result)
|
66
|
+
allow_any_instance_of(Danger::DangerfileGitLabPlugin).to receive(:html_link).with('app/src/main/java/com/mataku/Model.kt').and_return("<a href='https://gitlab.com/mataku/android/blob/561827e46167077b5e53515b4b7349b8ae04610b/Model.kt'>Model.kt</a>")
|
67
|
+
allow_any_instance_of(Danger::DangerfileGitLabPlugin).to receive(:html_link).with('app/src/main/java/com/mataku/Model.kt').and_return("<a href='https://gitlab.com/mataku/android/blob/561827e46167077b5e53515b4b7349b8ae04610b/Model.kt'>Model.kt</a>")
|
68
|
+
end
|
69
|
+
|
70
|
+
it do
|
71
|
+
plugin.lint
|
72
|
+
expect(dangerfile.status_report[:errors].size).to eq(2)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe '#limit' do
|
78
|
+
context 'expected limit value is set' do
|
79
|
+
it 'raises UnexpectedLimitTypeError' do
|
80
|
+
expect { plugin.limit = nil }.to raise_error(DangerKtlint::UnexpectedLimitTypeError)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
context 'integer value is set to limit' do
|
85
|
+
it 'raises no errors' do
|
86
|
+
expect { plugin.limit = 1 }.not_to raise_error
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
describe '#send_markdown_comment' do
|
92
|
+
let(:limit) { 1 }
|
93
|
+
|
94
|
+
before do
|
95
|
+
allow_any_instance_of(Danger::DangerfileGitPlugin).to receive(:added_files).and_return(['app/src/main/java/com/mataku/Model.kt'])
|
96
|
+
allow_any_instance_of(Danger::DangerfileGitPlugin).to receive(:modified_files).and_return([])
|
97
|
+
|
98
|
+
allow_any_instance_of(Kernel).to receive(:system).with('which ktlint > /dev/null 2>&1').and_return(true)
|
99
|
+
allow_any_instance_of(Kernel).to receive(:`).with('ktlint app/src/main/java/com/mataku/Model.kt --reporter=json --relative').and_return(dummy_ktlint_result)
|
100
|
+
plugin.limit = limit
|
101
|
+
end
|
102
|
+
|
103
|
+
context 'limit is set' do
|
104
|
+
it 'equals number of ktlint results to limit' do
|
105
|
+
plugin.lint(inline_mode: true)
|
106
|
+
expect(dangerfile.status_report[:errors].size).to eq(limit)
|
51
107
|
end
|
52
108
|
end
|
53
109
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -46,24 +46,35 @@ def testing_ui
|
|
46
46
|
end
|
47
47
|
# rubocop:enable Lint/NestedMethodDefinition
|
48
48
|
|
49
|
-
# Example environment (ENV) that would come from
|
50
|
-
# running a PR on TravisCI
|
51
49
|
def testing_env
|
52
50
|
{
|
53
|
-
"
|
54
|
-
"
|
55
|
-
"
|
56
|
-
"TRAVIS_COMMIT_RANGE" => "759adcbd0d8f...13c4dc8bb61d",
|
51
|
+
"BITRISE_PULL_REQUEST" => "4",
|
52
|
+
"BITRISE_IO" => "true",
|
53
|
+
"GIT_REPOSITORY_URL" => "git@github.com:artsy/eigen",
|
57
54
|
"DANGER_GITHUB_API_TOKEN" => "123sbdq54erfsd3422gdfio"
|
58
55
|
}
|
59
56
|
end
|
60
57
|
|
58
|
+
def testing_env_for_gitlab
|
59
|
+
{
|
60
|
+
"BITRISE_PULL_REQUEST" => "4",
|
61
|
+
"BITRISE_IO" => "true",
|
62
|
+
"GIT_REPOSITORY_URL" => "git@gitlab.com:artsy/eigen",
|
63
|
+
"DANGER_GITLAB_API_TOKEN" => "123sbdq54erfsd3422gdfio"
|
64
|
+
}
|
65
|
+
end
|
66
|
+
|
61
67
|
# A stubbed out Dangerfile for use in tests
|
62
68
|
def testing_dangerfile
|
63
69
|
env = Danger::EnvironmentManager.new(testing_env)
|
64
70
|
Danger::Dangerfile.new(env, testing_ui)
|
65
71
|
end
|
66
72
|
|
73
|
+
def testing_dangerfile_for_gitlab
|
74
|
+
env = Danger::EnvironmentManager.new(testing_env_for_gitlab)
|
75
|
+
Danger::Dangerfile.new(env, testing_ui)
|
76
|
+
end
|
77
|
+
|
67
78
|
def dummy_ktlint_result
|
68
79
|
File.read(File.expand_path('../fixtures/ktlint_result.txt', __FILE__)).chomp
|
69
80
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-ktlint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mataku
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger-plugin-api
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,20 +80,6 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: yard
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: guard
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,20 +108,6 @@ dependencies:
|
|
122
108
|
- - "~>"
|
123
109
|
- !ruby/object:Gem::Version
|
124
110
|
version: '4.7'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: listen
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - '='
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: 3.0.7
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - '='
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: 3.0.7
|
139
111
|
- !ruby/object:Gem::Dependency
|
140
112
|
name: pry
|
141
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -157,9 +129,10 @@ executables: []
|
|
157
129
|
extensions: []
|
158
130
|
extra_rdoc_files: []
|
159
131
|
files:
|
160
|
-
- ".
|
132
|
+
- ".github/workflows/test.yml"
|
161
133
|
- ".gitignore"
|
162
134
|
- ".rubocop.yml"
|
135
|
+
- CHANGELOG.md
|
163
136
|
- Gemfile
|
164
137
|
- Guardfile
|
165
138
|
- LICENSE.txt
|
@@ -177,7 +150,7 @@ homepage: https://github.com/mataku/danger-ktlint
|
|
177
150
|
licenses:
|
178
151
|
- MIT
|
179
152
|
metadata: {}
|
180
|
-
post_install_message:
|
153
|
+
post_install_message:
|
181
154
|
rdoc_options: []
|
182
155
|
require_paths:
|
183
156
|
- lib
|
@@ -192,9 +165,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
165
|
- !ruby/object:Gem::Version
|
193
166
|
version: '0'
|
194
167
|
requirements: []
|
195
|
-
|
196
|
-
|
197
|
-
signing_key:
|
168
|
+
rubygems_version: 3.2.32
|
169
|
+
signing_key:
|
198
170
|
specification_version: 4
|
199
171
|
summary: Lint kotlin files using ktlint command line interface.
|
200
172
|
test_files:
|
data/.circleci/config.yml
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
version: 2
|
2
|
-
jobs:
|
3
|
-
build:
|
4
|
-
docker:
|
5
|
-
- image: ruby:2.5.3
|
6
|
-
steps:
|
7
|
-
- checkout
|
8
|
-
- restore_cache:
|
9
|
-
keys:
|
10
|
-
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
11
|
-
# fallback to using the latest cache if no exact match is found
|
12
|
-
- v1-dependencies-
|
13
|
-
|
14
|
-
- run:
|
15
|
-
name: Install Dependencies
|
16
|
-
command: |
|
17
|
-
bundle install --jobs=4 --path vendor/bundle
|
18
|
-
|
19
|
-
- save_cache:
|
20
|
-
paths:
|
21
|
-
- vendor/bundle
|
22
|
-
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
23
|
-
|
24
|
-
- run:
|
25
|
-
name: Run RSpec
|
26
|
-
command: |
|
27
|
-
bundle exec rspec
|