danger-textlint 1.1.0 → 2.0.1
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/.dependabot/config.yml +18 -0
- data/.devcontainer/Dockerfile +18 -0
- data/.devcontainer/devcontainer.json +35 -0
- data/.github/dependabot.yml +12 -0
- data/.github/workflows/ci.yml +29 -0
- data/.rubocop.yml +8 -8
- data/Gemfile.lock +78 -64
- data/README.md +1 -1
- data/danger-textlint.gemspec +6 -3
- data/lib/textlint/gem_version.rb +1 -1
- data/lib/textlint/plugin.rb +20 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/textlint_spec.rb +33 -3
- metadata +28 -11
- data/.travis.yml +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccf323fb77d25bc1bade56d96fc8dc3456fee206c12ba5267fb56409bf134844
|
4
|
+
data.tar.gz: 331557efb9c25959b393c29206bfc6b57e8d72425dc7a67b391b774e409e5c2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10c90d66a45ef436816d8df8d2f8fa38ee42a14d6065309d08ec8a7514b06bcb19b964204b5d14418d4b7572c6b748f1c52b12edcf872b91aa7b41800291f419
|
7
|
+
data.tar.gz: 4d2265bf02c94c8a19e47a12b48fcc28813c8d50a5d145a59041dc59e59525d39cdce2c9eb6afc00e73a531c0b7c1b796491a44f359b405f3ae4c3787525e9c4
|
@@ -0,0 +1,18 @@
|
|
1
|
+
version: 1
|
2
|
+
|
3
|
+
update_configs:
|
4
|
+
- package_manager: "ruby:bundler"
|
5
|
+
directory: "/"
|
6
|
+
update_schedule: "monthly"
|
7
|
+
|
8
|
+
allowed_updates:
|
9
|
+
- match:
|
10
|
+
update_type: "security"
|
11
|
+
automerged_updates:
|
12
|
+
- match:
|
13
|
+
dependency_type: "all"
|
14
|
+
update_type: "security:patch"
|
15
|
+
- match:
|
16
|
+
dependency_type: "development"
|
17
|
+
update_type: "semver:minor"
|
18
|
+
version_requirement_updates: "off"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.134.1/containers/ruby/.devcontainer/base.Dockerfile
|
2
|
+
ARG VARIANT="2"
|
3
|
+
FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-${VARIANT}
|
4
|
+
|
5
|
+
# [Optional] Install a version of Node.js using nvm for front end dev
|
6
|
+
ARG INSTALL_NODE="true"
|
7
|
+
ARG NODE_VERSION="lts/*"
|
8
|
+
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
|
9
|
+
|
10
|
+
# [Optional] Uncomment this section to install additional OS packages.
|
11
|
+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
12
|
+
&& apt-get -y install --no-install-recommends git vim
|
13
|
+
|
14
|
+
# [Optional] Uncomment this line to install additional gems.
|
15
|
+
# RUN gem install <your-gem-names-here>
|
16
|
+
|
17
|
+
# [Optional] Uncomment this line to install global node packages.
|
18
|
+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|
@@ -0,0 +1,35 @@
|
|
1
|
+
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
|
2
|
+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.134.1/containers/ruby
|
3
|
+
{
|
4
|
+
"name": "Ruby",
|
5
|
+
"build": {
|
6
|
+
"dockerfile": "Dockerfile",
|
7
|
+
"args": {
|
8
|
+
// Update 'VARIANT' to pick a Ruby version: 2, 2.7, 2.6, 2.5
|
9
|
+
"VARIANT": "2.7",
|
10
|
+
// Options
|
11
|
+
"INSTALL_NODE": "true",
|
12
|
+
"NODE_VERSION": "lts/*"
|
13
|
+
}
|
14
|
+
},
|
15
|
+
|
16
|
+
// Set *default* container specific settings.json values on container create.
|
17
|
+
"settings": {
|
18
|
+
"terminal.integrated.shell.linux": "/bin/bash"
|
19
|
+
},
|
20
|
+
|
21
|
+
// Add the IDs of extensions you want installed when the container is created.
|
22
|
+
"extensions": [
|
23
|
+
"rebornix.Ruby"
|
24
|
+
]
|
25
|
+
|
26
|
+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
27
|
+
// "forwardPorts": [],
|
28
|
+
|
29
|
+
// Use 'postCreateCommand' to run commands after the container is created.
|
30
|
+
// "postCreateCommand": "ruby --version",
|
31
|
+
|
32
|
+
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
|
33
|
+
// "remoteUser": "vscode"
|
34
|
+
|
35
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
3
|
+
# Please see the documentation for all configuration options:
|
4
|
+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
5
|
+
|
6
|
+
version: 2
|
7
|
+
updates:
|
8
|
+
- package-ecosystem: "bundler" # See documentation for possible values
|
9
|
+
directory: "/" # Location of package manifests
|
10
|
+
schedule:
|
11
|
+
interval: "monthly"
|
12
|
+
timezone: "Asia/Tokyo"
|
@@ -0,0 +1,29 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [push]
|
3
|
+
|
4
|
+
jobs:
|
5
|
+
test:
|
6
|
+
name: Test
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
image: [ 'ruby:2.5', 'ruby:2.6', 'ruby:2.7' ]
|
11
|
+
container:
|
12
|
+
image: ${{ matrix.image }}
|
13
|
+
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v2
|
16
|
+
|
17
|
+
- name: Setup bundler
|
18
|
+
run: gem install bundler
|
19
|
+
|
20
|
+
- name: bundle install
|
21
|
+
run: bundle install --jobs=4 --retry=3 --path=./vendor
|
22
|
+
|
23
|
+
- name: Show versions
|
24
|
+
run: |
|
25
|
+
ruby --version
|
26
|
+
bundle --version
|
27
|
+
|
28
|
+
- name: test
|
29
|
+
run: bundle exec rake spec
|
data/.rubocop.yml
CHANGED
@@ -3,7 +3,8 @@
|
|
3
3
|
# If you don't like these settings, just delete this file :)
|
4
4
|
|
5
5
|
AllCops:
|
6
|
-
TargetRubyVersion: 2.
|
6
|
+
TargetRubyVersion: 2.7
|
7
|
+
NewCops: disable
|
7
8
|
|
8
9
|
Style/StringLiterals:
|
9
10
|
EnforcedStyle: double_quotes
|
@@ -13,20 +14,16 @@ Style/StringLiterals:
|
|
13
14
|
Style/ClassCheck:
|
14
15
|
EnforcedStyle: kind_of?
|
15
16
|
|
16
|
-
# It's better to be more explicit about the type
|
17
|
-
Style/BracesAroundHashParameters:
|
18
|
-
Enabled: false
|
19
|
-
|
20
17
|
# specs sometimes have useless assignments, which is fine
|
21
18
|
Lint/UselessAssignment:
|
22
19
|
Exclude:
|
23
20
|
- '**/spec/**/*'
|
24
21
|
|
25
22
|
# We could potentially enable the 2 below:
|
26
|
-
Layout/
|
23
|
+
Layout/FirstHashElementIndentation:
|
27
24
|
Enabled: false
|
28
25
|
|
29
|
-
Layout/
|
26
|
+
Layout/HashAlignment:
|
30
27
|
Enabled: false
|
31
28
|
|
32
29
|
# HoundCI doesn't like this rule
|
@@ -130,7 +127,7 @@ Style/MixinGrouping:
|
|
130
127
|
Naming/FileName:
|
131
128
|
Enabled: false
|
132
129
|
|
133
|
-
Layout/
|
130
|
+
Layout/HeredocIndentation:
|
134
131
|
Enabled: false
|
135
132
|
|
136
133
|
Style/SpecialGlobalVars:
|
@@ -153,3 +150,6 @@ Security/YAMLLoad:
|
|
153
150
|
|
154
151
|
Style/FrozenStringLiteralComment:
|
155
152
|
Enabled: false
|
153
|
+
|
154
|
+
Metrics/ModuleLength:
|
155
|
+
Enabled: false
|
data/Gemfile.lock
CHANGED
@@ -1,47 +1,50 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
danger-textlint (
|
4
|
+
danger-textlint (2.0.1)
|
5
5
|
danger-plugin-api (~> 1.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
addressable (2.
|
11
|
-
public_suffix (>= 2.0.2, <
|
12
|
-
ast (2.4.
|
13
|
-
|
10
|
+
addressable (2.7.0)
|
11
|
+
public_suffix (>= 2.0.2, < 5.0)
|
12
|
+
ast (2.4.1)
|
13
|
+
bump (0.9.0)
|
14
|
+
claide (1.0.3)
|
14
15
|
claide-plugins (0.9.2)
|
15
16
|
cork
|
16
17
|
nap
|
17
18
|
open4 (~> 1.3)
|
18
|
-
coderay (1.1.
|
19
|
+
coderay (1.1.3)
|
19
20
|
colored2 (3.1.2)
|
20
21
|
cork (0.3.0)
|
21
22
|
colored2 (~> 3.1)
|
22
|
-
danger (
|
23
|
+
danger (8.0.5)
|
23
24
|
claide (~> 1.0)
|
24
25
|
claide-plugins (>= 0.9.2)
|
25
26
|
colored2 (~> 3.1)
|
26
27
|
cork (~> 0.1)
|
27
|
-
faraday (
|
28
|
-
faraday-http-cache (~>
|
29
|
-
git (~> 1)
|
30
|
-
kramdown (~>
|
28
|
+
faraday (>= 0.9.0, < 2.0)
|
29
|
+
faraday-http-cache (~> 2.0)
|
30
|
+
git (~> 1.7)
|
31
|
+
kramdown (~> 2.3)
|
32
|
+
kramdown-parser-gfm (~> 1.0)
|
31
33
|
no_proxy_fix
|
32
34
|
octokit (~> 4.7)
|
33
35
|
terminal-table (~> 1)
|
34
36
|
danger-plugin-api (1.0.0)
|
35
37
|
danger (> 2.0)
|
36
38
|
diff-lcs (1.3)
|
37
|
-
faraday (0.
|
39
|
+
faraday (1.0.1)
|
38
40
|
multipart-post (>= 1.2, < 3)
|
39
|
-
faraday-http-cache (
|
40
|
-
faraday (
|
41
|
-
ffi (1.
|
41
|
+
faraday-http-cache (2.2.0)
|
42
|
+
faraday (>= 0.8)
|
43
|
+
ffi (1.13.1)
|
42
44
|
formatador (0.2.5)
|
43
|
-
git (1.
|
44
|
-
|
45
|
+
git (1.7.0)
|
46
|
+
rchardet (~> 1.8)
|
47
|
+
guard (2.16.2)
|
45
48
|
formatador (>= 0.2.4)
|
46
49
|
listen (>= 2.7, < 4.0)
|
47
50
|
lumberjack (>= 1.0.12, < 2.0)
|
@@ -55,80 +58,91 @@ GEM
|
|
55
58
|
guard (~> 2.1)
|
56
59
|
guard-compat (~> 1.1)
|
57
60
|
rspec (>= 2.99.0, < 4.0)
|
58
|
-
kramdown (
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
61
|
+
kramdown (2.3.0)
|
62
|
+
rexml
|
63
|
+
kramdown-parser-gfm (1.1.0)
|
64
|
+
kramdown (~> 2.0)
|
65
|
+
listen (3.2.1)
|
66
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
67
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
68
|
+
lumberjack (1.2.5)
|
69
|
+
method_source (1.0.0)
|
70
|
+
multipart-post (2.1.1)
|
65
71
|
nap (1.1.0)
|
66
72
|
nenv (0.3.0)
|
67
73
|
no_proxy_fix (0.1.2)
|
68
|
-
notiffany (0.1.
|
74
|
+
notiffany (0.1.3)
|
69
75
|
nenv (~> 0.1)
|
70
76
|
shellany (~> 0.0)
|
71
|
-
octokit (4.
|
77
|
+
octokit (4.18.0)
|
78
|
+
faraday (>= 0.9)
|
72
79
|
sawyer (~> 0.8.0, >= 0.5.3)
|
73
80
|
open4 (1.3.4)
|
74
|
-
parallel (1.
|
75
|
-
parser (2.
|
76
|
-
ast (~> 2.
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
public_suffix (3.0.2)
|
81
|
+
parallel (1.19.2)
|
82
|
+
parser (2.7.1.4)
|
83
|
+
ast (~> 2.4.1)
|
84
|
+
pry (0.13.1)
|
85
|
+
coderay (~> 1.1)
|
86
|
+
method_source (~> 1.0)
|
87
|
+
public_suffix (4.0.6)
|
82
88
|
rainbow (3.0.0)
|
83
|
-
rake (
|
84
|
-
rb-fsevent (0.10.
|
85
|
-
rb-inotify (0.
|
86
|
-
ffi (
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
rspec-
|
93
|
-
|
89
|
+
rake (13.0.1)
|
90
|
+
rb-fsevent (0.10.4)
|
91
|
+
rb-inotify (0.10.1)
|
92
|
+
ffi (~> 1.0)
|
93
|
+
rchardet (1.8.0)
|
94
|
+
regexp_parser (1.7.1)
|
95
|
+
rexml (3.2.4)
|
96
|
+
rspec (3.9.0)
|
97
|
+
rspec-core (~> 3.9.0)
|
98
|
+
rspec-expectations (~> 3.9.0)
|
99
|
+
rspec-mocks (~> 3.9.0)
|
100
|
+
rspec-core (3.9.2)
|
101
|
+
rspec-support (~> 3.9.3)
|
102
|
+
rspec-expectations (3.9.2)
|
94
103
|
diff-lcs (>= 1.2.0, < 2.0)
|
95
|
-
rspec-support (~> 3.
|
96
|
-
rspec-mocks (3.
|
104
|
+
rspec-support (~> 3.9.0)
|
105
|
+
rspec-mocks (3.9.1)
|
97
106
|
diff-lcs (>= 1.2.0, < 2.0)
|
98
|
-
rspec-support (~> 3.
|
99
|
-
rspec-support (3.
|
100
|
-
rubocop (0.
|
107
|
+
rspec-support (~> 3.9.0)
|
108
|
+
rspec-support (3.9.3)
|
109
|
+
rubocop (0.90.0)
|
101
110
|
parallel (~> 1.10)
|
102
|
-
parser (>= 2.
|
103
|
-
powerpack (~> 0.1)
|
111
|
+
parser (>= 2.7.1.1)
|
104
112
|
rainbow (>= 2.2.2, < 4.0)
|
113
|
+
regexp_parser (>= 1.7)
|
114
|
+
rexml
|
115
|
+
rubocop-ast (>= 0.3.0, < 1.0)
|
105
116
|
ruby-progressbar (~> 1.7)
|
106
|
-
unicode-display_width (
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
117
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
118
|
+
rubocop-ast (0.3.0)
|
119
|
+
parser (>= 2.7.1.4)
|
120
|
+
ruby-progressbar (1.10.1)
|
121
|
+
sawyer (0.8.2)
|
122
|
+
addressable (>= 2.3.5)
|
123
|
+
faraday (> 0.8, < 2.0)
|
111
124
|
shellany (0.0.1)
|
112
125
|
terminal-table (1.8.0)
|
113
126
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
114
|
-
thor (0.
|
115
|
-
unicode-display_width (1.
|
116
|
-
yard (0.9.
|
127
|
+
thor (1.0.1)
|
128
|
+
unicode-display_width (1.6.0)
|
129
|
+
yard (0.9.25)
|
117
130
|
|
118
131
|
PLATFORMS
|
119
132
|
ruby
|
120
133
|
|
121
134
|
DEPENDENCIES
|
122
|
-
|
135
|
+
bump (~> 0.9.0)
|
136
|
+
bundler (~> 2.0)
|
123
137
|
danger-textlint!
|
124
138
|
guard (~> 2.14)
|
125
139
|
guard-rspec (~> 4.7)
|
126
|
-
listen (= 3.
|
140
|
+
listen (= 3.2.1)
|
127
141
|
pry
|
128
|
-
rake (~>
|
142
|
+
rake (~> 13.0)
|
129
143
|
rspec (~> 3.4)
|
130
144
|
rubocop
|
131
145
|
yard
|
132
146
|
|
133
147
|
BUNDLED WITH
|
134
|
-
1.
|
148
|
+
2.1.4
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# danger-textlint
|
2
2
|
[](https://badge.fury.io/rb/danger-textlint)
|
3
|
-
[](https://github.com/Kesin11/danger-textlint/actions)
|
4
4
|
|
5
5
|
|
6
6
|
[Danger](http://danger.systems/ruby/) plugin for [textlint](https://textlint.github.io/).
|
data/danger-textlint.gemspec
CHANGED
@@ -21,8 +21,8 @@ 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', '~> 13.0'
|
26
26
|
|
27
27
|
# Testing support
|
28
28
|
spec.add_development_dependency 'rspec', '~> 3.4'
|
@@ -36,7 +36,10 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_development_dependency 'guard-rspec', '~> 4.7'
|
37
37
|
|
38
38
|
# If you want to work on older builds of ruby
|
39
|
-
spec.add_development_dependency 'listen', '3.
|
39
|
+
spec.add_development_dependency 'listen', '3.2.1'
|
40
|
+
|
41
|
+
# Help gem version up when release new version
|
42
|
+
spec.add_development_dependency 'bump', '~> 0.9.0'
|
40
43
|
|
41
44
|
# This gives you the chance to run a REPL inside your tests
|
42
45
|
# via:
|
data/lib/textlint/gem_version.rb
CHANGED
data/lib/textlint/plugin.rb
CHANGED
@@ -14,6 +14,11 @@ module Danger
|
|
14
14
|
# textlint.max_severity = "warn"
|
15
15
|
# textlint.lint
|
16
16
|
#
|
17
|
+
# @example Max inline comment number. If you want disable this feature, please set nil. Default: nil
|
18
|
+
#
|
19
|
+
# textlint.max_comment_num = 5
|
20
|
+
# textlint.lint
|
21
|
+
#
|
17
22
|
# @see Kesin11/danger-textlint
|
18
23
|
# @tags lint, textlint
|
19
24
|
#
|
@@ -27,9 +32,16 @@ module Danger
|
|
27
32
|
# @return [String]
|
28
33
|
attr_accessor :max_severity
|
29
34
|
|
35
|
+
# Set max danger reporting comment number
|
36
|
+
# choice: nil or integer
|
37
|
+
# @return [String]
|
38
|
+
attr_accessor :max_comment_num
|
39
|
+
|
30
40
|
# Execute textlint and send comment
|
31
41
|
# @return [void]
|
32
42
|
def lint
|
43
|
+
return if target_files.empty?
|
44
|
+
|
33
45
|
bin = textlint_path
|
34
46
|
result_json = run_textlint(bin, target_files)
|
35
47
|
errors = parse(result_json)
|
@@ -47,6 +59,7 @@ module Danger
|
|
47
59
|
|
48
60
|
# File.exist?(local) ? local : find_executable("textlint")
|
49
61
|
raise "textlint not found in ./node_modules/.bin/textlint" unless File.exist?(local)
|
62
|
+
|
50
63
|
local
|
51
64
|
end
|
52
65
|
|
@@ -88,7 +101,13 @@ module Danger
|
|
88
101
|
end
|
89
102
|
|
90
103
|
def send_comment(errors)
|
91
|
-
|
104
|
+
limited_errors = errors
|
105
|
+
if max_comment_num && limited_errors.size > max_comment_num
|
106
|
+
limited_errors = limited_errors.first(max_comment_num)
|
107
|
+
send("warn", "Textlint reported more than #{max_comment_num} problems, but danger-textlint doesn't to display all problems. Please run textlint in your machine and check all problems.")
|
108
|
+
end
|
109
|
+
|
110
|
+
limited_errors.each do |error|
|
92
111
|
send(error[:severity], error[:message], file: error[:file_path], line: error[:line])
|
93
112
|
end
|
94
113
|
end
|
data/spec/spec_helper.rb
CHANGED
data/spec/textlint_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require File.expand_path("
|
1
|
+
require File.expand_path("spec_helper", __dir__)
|
2
2
|
|
3
3
|
module Danger
|
4
4
|
describe "with Dangerfile" do
|
@@ -15,7 +15,7 @@ module Danger
|
|
15
15
|
end
|
16
16
|
|
17
17
|
let(:fixture) do
|
18
|
-
fixture_path = File.expand_path("
|
18
|
+
fixture_path = File.expand_path("fixtures/textlint_result.json", __dir__)
|
19
19
|
File.read(fixture_path)
|
20
20
|
end
|
21
21
|
|
@@ -62,7 +62,10 @@ module Danger
|
|
62
62
|
end
|
63
63
|
|
64
64
|
# stub for simulate to run textlint
|
65
|
-
before
|
65
|
+
before do
|
66
|
+
allow(@textlint).to receive(:run_textlint).and_return fixture
|
67
|
+
allow(@textlint).to receive(:target_files).and_return [""]
|
68
|
+
end
|
66
69
|
|
67
70
|
context "with default max_severity" do
|
68
71
|
before { @textlint.lint }
|
@@ -100,6 +103,33 @@ module Danger
|
|
100
103
|
)
|
101
104
|
end
|
102
105
|
end
|
106
|
+
|
107
|
+
context "with .max_comment_num = 5" do
|
108
|
+
let(:max_comment_num) { 5 }
|
109
|
+
before do
|
110
|
+
@textlint.max_comment_num = max_comment_num
|
111
|
+
@textlint.lint
|
112
|
+
end
|
113
|
+
|
114
|
+
it "status_report" do
|
115
|
+
status_report = @textlint.status_report
|
116
|
+
expect(status_report[:errors].size).to eq(max_comment_num)
|
117
|
+
end
|
118
|
+
|
119
|
+
it "violation_report" do
|
120
|
+
violation_report = @textlint.violation_report
|
121
|
+
expect(violation_report[:errors].size).to eq(max_comment_num)
|
122
|
+
end
|
123
|
+
|
124
|
+
it "danger comment" do
|
125
|
+
# find not inline comment
|
126
|
+
comment = @textlint.violation_report[:warnings].find do |warning|
|
127
|
+
warning.message.match(/Textlint reported more than/)
|
128
|
+
end
|
129
|
+
|
130
|
+
expect(comment).not_to be_nil
|
131
|
+
end
|
132
|
+
end
|
103
133
|
end
|
104
134
|
|
105
135
|
describe ".target_files" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-textlint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kesin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-09-05 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: '13.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: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +128,28 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - '='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 3.
|
131
|
+
version: 3.2.1
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - '='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 3.
|
138
|
+
version: 3.2.1
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: bump
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.9.0
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.9.0
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: pry
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -157,9 +171,13 @@ executables: []
|
|
157
171
|
extensions: []
|
158
172
|
extra_rdoc_files: []
|
159
173
|
files:
|
174
|
+
- ".dependabot/config.yml"
|
175
|
+
- ".devcontainer/Dockerfile"
|
176
|
+
- ".devcontainer/devcontainer.json"
|
177
|
+
- ".github/dependabot.yml"
|
178
|
+
- ".github/workflows/ci.yml"
|
160
179
|
- ".gitignore"
|
161
180
|
- ".rubocop.yml"
|
162
|
-
- ".travis.yml"
|
163
181
|
- Gemfile
|
164
182
|
- Gemfile.lock
|
165
183
|
- Guardfile
|
@@ -193,8 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
193
211
|
- !ruby/object:Gem::Version
|
194
212
|
version: '0'
|
195
213
|
requirements: []
|
196
|
-
|
197
|
-
rubygems_version: 2.7.5
|
214
|
+
rubygems_version: 3.1.2
|
198
215
|
signing_key:
|
199
216
|
specification_version: 4
|
200
217
|
summary: Danger plugin for textlint.
|