danger-typos 0.1.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ca58a8024d01464f7d5f9b3849b6fc4ee9917864415af35b4c3e46df7eed4c4
4
- data.tar.gz: 2e651317a64d71f85634a1dcab2b9ad31e447d9ddc335694cdb3c529715fc028
3
+ metadata.gz: ab10dbdb7560f5bf444c66be23c1d65e3029dc49ed620eaa245f2c076c540133
4
+ data.tar.gz: 0bf1f12c823e6a78f3b7d0df44896ab1f9019c126f228f49a3f13f5a47c9c901
5
5
  SHA512:
6
- metadata.gz: 3b27895cc1ad3b248bc8594374f5832c244368daa950f350dc8e36f68ca5be2940116b263340892599083ac22ac448a4ad16573e5b573c42035cbfc2b311ceee
7
- data.tar.gz: b4c12aacdde430d2d523f807dfb9f49bc36f5c79fb9aa21bf0937b9d3363a075a285fc86655e4c7cc2801932c0cb30b17ec2d3ac038e58dc2b98442e7bbe1c3a
6
+ metadata.gz: 64a863ac0adc608f3106114188fc0c13d80aeacbd977a2dbdb7d264df11f75104542156a1e156ace9001f055f6cf526ab7ebd35ef15cce5c8ea21eb3c7959edc
7
+ data.tar.gz: 36bc966eee976a0b23b5c4dfc9933df887500a955f4b3ea4b6855588d5c7b1fb57ec6696fc5f47c7e7ec2b840dab89cfabba88159a6623351f0c0a83074e0c16
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
 
@@ -46,7 +55,7 @@ jobs:
46
55
  uses: baptiste0928/cargo-install@v3
47
56
  with:
48
57
  crate: typos-cli
49
- version: 1.29.7
58
+ version: 1.36.2
50
59
 
51
60
  - run: bundle exec danger
52
61
  env:
@@ -75,9 +84,11 @@ jobs:
75
84
  bundler-cache: true
76
85
 
77
86
  - name: Install typos
87
+ env:
88
+ TYPOS_VERSION: 1.36.2
78
89
  run: |
79
- wget https://github.com/crate-ci/typos/releases/download/v1.29.7/typos-v1.29.7-x86_64-unknown-linux-musl.tar.gz
80
- tar xf typos-v1.29.7-x86_64-unknown-linux-musl.tar.gz
90
+ wget https://github.com/crate-ci/typos/releases/download/v${TYPOS_VERSION}/typos-v${TYPOS_VERSION}-x86_64-unknown-linux-musl.tar.gz
91
+ tar xf typos-v${TYPOS_VERSION}-x86_64-unknown-linux-musl.tar.gz
81
92
  mkdir -p $HOME/.cargo/bin
82
93
  mv typos $HOME/.cargo/bin/
83
94
  echo "$HOME/.cargo/bin" >> $GITHUB_PATH
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Typos
4
- VERSION = "0.1.0"
4
+ VERSION = "0.3.0"
5
5
  end
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 = ["--force-exclude", "--format", "json"] + target_files
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|
data/renovate.json CHANGED
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
- "extends": [
4
- "config:recommended"
5
- ]
3
+ "extends": ["config:recommended"],
4
+ "minimumReleaseAge": "5 days"
6
5
  }
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.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyosuke Takayama
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-02-15 00:00:00.000000000 Z
10
+ date: 2025-09-10 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: danger-plugin-api