danger-typos 0.1.0 → 0.2.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/README.md +11 -2
- data/lib/typos/gem_version.rb +1 -1
- data/lib/typos/plugin.rb +8 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06630b2718951c3956bc974c02fdd0e8b0580acf490c57883b694814d5b919f8
|
4
|
+
data.tar.gz: a4b9aa7d63372f3429fb6d27c12b50d0f7bd277e0478b440286116df2714ea3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd09fc19bb9e4b2d28819669fceede3c801d9dbf096dbd07ae7b96df190d7477aacfe4ff0d544b7036ca075e996857f18556a94f7b97364f31c8bb80c185d663
|
7
|
+
data.tar.gz: d78d14624a81b759f51d4b83effb6db0bf02695f577ae6d8d1e52bb0277874672f5581e5596b00da6b48cfbd8ffa19adfade279a5b3f0d73c306f865ba43985c
|
data/README.md
CHANGED
@@ -12,17 +12,26 @@
|
|
12
12
|
|
13
13
|
Add this to Dangerfile.
|
14
14
|
|
15
|
-
```
|
15
|
+
```ruby
|
16
16
|
typos.run
|
17
17
|
```
|
18
18
|
|
19
19
|
If you want to specify typos bin file, you can set a bin path to the binary_path parameter.
|
20
20
|
|
21
|
-
```
|
21
|
+
```ruby
|
22
22
|
typos.binary_path = "path/to/typos"
|
23
23
|
typos.run
|
24
24
|
```
|
25
25
|
|
26
|
+
To use a custom config file, set the config_path parameter.
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
typos.run config_path: "_typos.toml"
|
30
|
+
```
|
31
|
+
|
32
|
+
## Example
|
33
|
+
|
34
|
+
<img width="320" src="https://github.com/user-attachments/assets/0fa06466-e945-454e-8d61-73c5cbe8a8ce" />
|
26
35
|
|
27
36
|
### GitHub actions
|
28
37
|
|
data/lib/typos/gem_version.rb
CHANGED
data/lib/typos/plugin.rb
CHANGED
@@ -21,10 +21,16 @@ module Danger
|
|
21
21
|
|
22
22
|
# Execute typos
|
23
23
|
# @return [void]
|
24
|
-
def run
|
24
|
+
def run(options = {})
|
25
25
|
return if target_files.empty?
|
26
26
|
|
27
|
-
args = [
|
27
|
+
args = [
|
28
|
+
"--force-exclude",
|
29
|
+
"--format", "json"
|
30
|
+
]
|
31
|
+
args.push("--config", options[:config_path]) if options[:config_path]
|
32
|
+
args += target_files
|
33
|
+
|
28
34
|
stdout, = Open3.capture3(cmd_path, *args)
|
29
35
|
|
30
36
|
stdout.split("\n").each do |result|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-typos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyosuke Takayama
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-02-
|
10
|
+
date: 2025-02-16 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: danger-plugin-api
|