simple_english 0.6.0-aarch64-linux → 0.8.0-aarch64-linux

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: 5122afb44d3c0332b53c7636a893150d5d27bf2a80d49cae239d44e57c250ea2
4
- data.tar.gz: c4e8fcf8f0c5a0dd9ebd31ab5f4e8c1f93d7bd37118015da48d0c21ba2d82656
3
+ metadata.gz: 30ed262fa42e930d214f509eaa23942e688d98b34eb5167024476596ef99e837
4
+ data.tar.gz: 829397f43675f72ca584d2224e8a8b487eaa9259864d8a4642f39d336fee95c5
5
5
  SHA512:
6
- metadata.gz: 694c1b6d1af013b704a8ece195f9e55f0189b1220b01fd259aa04fc255ff4f82df3c264dc75d3bdde65e2a53c67529876f25d370d8397e6d1febec36f8cf4b8c
7
- data.tar.gz: d72828c6a2d99e17a5d0a7f3d5e0fb5e20a06a47ac7baa7375de393986753c9bd7471cada8bc8a748d818bc21e35f6e4cf4f8ed47b8460896bd4d469baab489b
6
+ metadata.gz: b96987fac6a6fcd46c9e9abf1088b7efd650c11d5c616ffe320283c19bcca063bde9055453b51232905bde6cfd8d27785628cd41b8d23314d39d56fce646b71e
7
+ data.tar.gz: 7d485aea74bb0a9ad1f14844fdaa8e827ffc6877a535aedd3080bc780df056696bfafecc9e4b1316df6470ccc7dae3b28fba28670923dad6c8f811a25ffdc91d
data/README.md CHANGED
@@ -39,14 +39,16 @@ If your language is not on the list, [open an issue](https://github.com/TonyCTHs
39
39
 
40
40
  ## Agent integrations
41
41
 
42
- Plug the linter into your coding agent. It checks its own draft
43
- before you read the file.
42
+ Plug the linter into your coding agent. It writes plain English on
43
+ the first pass and checks its own draft before you read the file.
44
44
 
45
- | Coding agent | Integration |
46
- |---|---|
47
- | pi | [pi-simple-english](integrations/pi/README.md) |
48
- | Claude Code | [simple-english](integrations/claude-code/README.md) |
49
- | Codex | [simple-english](integrations/codex/README.md) |
45
+ | Coding agent | Ships as | Docs |
46
+ |---|---|---|
47
+ | `pi` | npm package `pi-simple-english` | [README](integrations/pi/README.md) |
48
+ | `claude-code` | plugin `simple-english` | [README](integrations/claude-code/README.md) |
49
+ | `codex` | plugin `simple-english` | [README](integrations/codex/README.md) |
50
+ | `cursor` | plugin folder `simple-english` | [README](integrations/cursor/README.md) |
51
+ | `opencode` | plugin `simple-english` | [README](integrations/opencode/README.md) |
50
52
 
51
53
  If your agent is not on the list, [open an issue](https://github.com/TonyCTHsu/simple-english/issues).
52
54
 
@@ -66,16 +68,16 @@ The full list, with a wrong and a right example for each rule [docs/RULES.md](do
66
68
 
67
69
  ## Install
68
70
 
69
- ### Homebrew (macOS arm64)
71
+ ### Ruby gem (macOS arm64, Linux x86-64 and arm64)
70
72
 
71
73
  ```bash
72
- brew install TonyCTHsu/tap/simple-english
74
+ gem install simple_english
73
75
  ```
74
76
 
75
- ### Ruby gem (macOS arm64, Linux x86-64 and arm64)
77
+ ### Homebrew (macOS arm64)
76
78
 
77
79
  ```bash
78
- gem install simple_english
80
+ brew install TonyCTHsu/tap/simple-english
79
81
  ```
80
82
 
81
83
  ### Container
@@ -189,10 +191,6 @@ In a code comment:
189
191
 
190
192
  ## FAQ
191
193
 
192
- ### Have you thought about an agent skill?
193
-
194
- This project takes its idea from [SimpleEnglish](https://github.com/AminBlg/SimpleEnglish). If you like, use both: the skill helps the first draft, and the linter catches what the agent missed.
195
-
196
194
  ### Why not Vale?
197
195
 
198
196
  We ported rules to Vale and ran the corpus on both engines.
@@ -55,7 +55,9 @@ module SimpleEnglish
55
55
  warn "error: file not readable: #{path}"
56
56
  return 2
57
57
  end
58
- text = (path == "-") ? $stdin.read : File.read(path)
58
+ # The lintable gate in lint_file reads lintable files itself. A
59
+ # non-lintable path must not cost a full read here.
60
+ text = (path == "-") ? $stdin.read : nil
59
61
  findings = SimpleEnglish.lint_file(path, text)
60
62
  return 2 if findings.nil? # already warned why
61
63
  SimpleEnglish::Config.filter(config, path, findings).each do |finding|
@@ -28,6 +28,8 @@ module SimpleEnglish
28
28
  ".h" => "cpp"
29
29
  }.freeze
30
30
 
31
+ PROSE_EXTENSIONS = [".md"].freeze
32
+
31
33
  module_function
32
34
 
33
35
  # nil for files we do not lint.
@@ -35,6 +37,14 @@ module SimpleEnglish
35
37
  EXTENSION_LANGUAGES[File.extname(path)]
36
38
  end
37
39
 
40
+ # true when the path is a file this linter owns: Markdown, stdin,
41
+ # or a supported code language. Everything else is skipped, so a
42
+ # single explicit path behaves like directory expansion (cli.rb).
43
+ def lintable?(path)
44
+ path == "-" || PROSE_EXTENSIONS.include?(File.extname(path)) ||
45
+ !EXTENSION_LANGUAGES[File.extname(path)].nil?
46
+ end
47
+
38
48
  def comment_spans(source, language)
39
49
  require "tree_sitter_language_pack"
40
50
  root = TreeSitterLanguagePack.get_parser(language).parse(source).root_node
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleEnglish
4
- VERSION = "0.6.0"
4
+ VERSION = "0.8.0"
5
5
  end
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Lint Markdown prose with the SimpleEnglish Plain-mode rules.
4
- # Pattern rules run on LanguageTool. Counting rules run here.
3
+ # Lint Markdown prose and code comments with the SimpleEnglish
4
+ # Plain-mode rules. Pattern rules run on LanguageTool. Counting rules
5
+ # run here.
5
6
  # This file is the composition root. The pieces live in lib/simple_english/.
6
7
 
7
8
  require_relative "simple_english/version"
@@ -37,9 +38,12 @@ module SimpleEnglish
37
38
 
38
39
  # One entry point for files. LintPlan decides what kind of lint
39
40
  # this is. Both tiers share it, so they cannot drift. Code files
40
- # lint comments through the daemon. nil means unreachable:
41
- # the caller decides how fatal that is.
42
- def lint_file(path, text = File.read(path))
41
+ # lint comments through the daemon. File types the linter does not
42
+ # own are skipped up front: an unknown extension is not prose.
43
+ # nil means unreachable: the caller decides how fatal that is.
44
+ def lint_file(path, text = nil)
45
+ return [] unless Extractor.lintable?(path)
46
+ text = File.read(path) if text.nil?
43
47
  language = Extractor.language_for(path)
44
48
  plan = LintPlan.call(text, language)
45
49
  return [] if plan.nil?
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: data/libexec/simple_english/languagetool-server
3
3
  size: 127207544 bytes
4
- sha256: bd7d282af7f023de2da013f1f453de8da8f4b56a2b7ea466d095612cb9ef65e3
4
+ sha256: fbf1bc1ed21cdfcd400b7827429f8945727d0d5c1b7034267d18a5fd1774484a
@@ -4,7 +4,7 @@
4
4
  "serialNumber" : "urn:uuid:c99881b6-e8ff-383d-92df-6845602c70c5",
5
5
  "version" : 1,
6
6
  "metadata" : {
7
- "timestamp" : "2026-10-06T19:11:45Z",
7
+ "timestamp" : "2026-10-12T09:10:31Z",
8
8
  "lifecycles" : [
9
9
  {
10
10
  "phase" : "build"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_english
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.8.0
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - TonyCTHsu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-06 00:00:00.000000000 Z
11
+ date: 2026-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tree_sitter_language_pack
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '5.27'
83
+ - !ruby/object:Gem::Dependency
84
+ name: json_schemer
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '2.4'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '2.4'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: json
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -162,7 +176,7 @@ licenses:
162
176
  metadata:
163
177
  homepage_uri: https://github.com/TonyCTHsu/simple-english
164
178
  source_code_uri: https://github.com/TonyCTHsu/simple-english
165
- changelog_uri: https://github.com/TonyCTHsu/simple-english/blob/v0.6.0/CHANGELOG.md
179
+ changelog_uri: https://github.com/TonyCTHsu/simple-english/blob/v0.8.0/CHANGELOG.md
166
180
  post_install_message:
167
181
  rdoc_options: []
168
182
  require_paths: