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 +4 -4
- data/README.md +13 -15
- data/lib/simple_english/cli.rb +3 -1
- data/lib/simple_english/lint/extractor.rb +10 -0
- data/lib/simple_english/version.rb +1 -1
- data/lib/simple_english.rb +9 -5
- data/libexec/simple_english/languagetool-server +1 -1
- data/libexec/simple_english/languagetool-server.sbom.json +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 30ed262fa42e930d214f509eaa23942e688d98b34eb5167024476596ef99e837
|
|
4
|
+
data.tar.gz: 829397f43675f72ca584d2224e8a8b487eaa9259864d8a4642f39d336fee95c5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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 |
|
|
46
|
-
|
|
47
|
-
| pi |
|
|
48
|
-
|
|
|
49
|
-
|
|
|
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
|
-
###
|
|
71
|
+
### Ruby gem (macOS arm64, Linux x86-64 and arm64)
|
|
70
72
|
|
|
71
73
|
```bash
|
|
72
|
-
|
|
74
|
+
gem install simple_english
|
|
73
75
|
```
|
|
74
76
|
|
|
75
|
-
###
|
|
77
|
+
### Homebrew (macOS arm64)
|
|
76
78
|
|
|
77
79
|
```bash
|
|
78
|
-
|
|
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.
|
data/lib/simple_english/cli.rb
CHANGED
|
@@ -55,7 +55,9 @@ module SimpleEnglish
|
|
|
55
55
|
warn "error: file not readable: #{path}"
|
|
56
56
|
return 2
|
|
57
57
|
end
|
|
58
|
-
|
|
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
|
data/lib/simple_english.rb
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Lint Markdown prose with the SimpleEnglish
|
|
4
|
-
# Pattern rules run on LanguageTool. Counting rules
|
|
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.
|
|
41
|
-
#
|
|
42
|
-
|
|
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:
|
|
4
|
+
sha256: fbf1bc1ed21cdfcd400b7827429f8945727d0d5c1b7034267d18a5fd1774484a
|
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.
|
|
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-
|
|
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.
|
|
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:
|