simple_english 0.11.1-aarch64-linux → 0.12.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: babcdc7dadd08a99940f136c676ea2ff54b390418ea0662a157d558da083f286
4
- data.tar.gz: 3d6bd9a3c67a40f15572c6fb225dee5e8d33e126c62d93d491688ecc78f5ada7
3
+ metadata.gz: 9b5b5ff768caae05ffb5aeb9df64b4ecb31b2cf5128366a3a2cce154f1f94fe9
4
+ data.tar.gz: b298b915f34c3060dae2b6f90fa78f4a5dd1fe912b8be6d532fd3f031f894719
5
5
  SHA512:
6
- metadata.gz: 0421a9df3870c2770bcef292462dbf55743b1fcd710e6b337ccd99391a9c76112c893a36608b1cf39bcd456053bd26c92dc475ccf49ffb4c4db02292d0cea13b
7
- data.tar.gz: e02c69092d4fb38331d095b5285594df392230e80a132d7dd8b6fb5454ca3e103f1c60708deb340e8e748d8a91be9e99afa66b6c5c75ae9dcd1d82e8ee9f1529
6
+ metadata.gz: 9ded9b7cd8890fff2dad83a0d0eb272e29ab99e9feb33926733f512011a5299c86a947605eabbbb28b129621f06cfcd4988d566d4a09e0c588a2a1ec078c262f
7
+ data.tar.gz: 2b9acfc5fc537d7d177d14b9607a1714660f96868be5906e8d00c3b4ac2979fabc5453e2c57a8b9e0d4a9b9fde439e8860ecbab5d9cf442aecd0227885810630
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # simple_english
6
6
 
7
- > Write for human, not for agent.
7
+ > Write plain English for humans. Keep the agent honest.
8
8
 
9
9
  You can teach an agent plain-English prose with a skill or a
10
10
  prompt. It writes clean prose in the first paragraph and slop again
@@ -32,8 +32,11 @@ the agent corrects its own text.
32
32
  </table>
33
33
 
34
34
  The linter covers Markdown prose plus code comments in Python, Ruby,
35
- JavaScript, TypeScript, Go, Rust, Java, C#, C++, Kotlin, bash, and
36
- YAML. Findings print as plain text, JSON, or SARIF.
35
+ JavaScript, TypeScript, Go, Rust, Java, C, C++, and C#. It also
36
+ reads Objective-C, Kotlin, Swift, Scala, Dart, PHP, Perl, Elixir,
37
+ Lua, R, Haskell, Zig, SQL, and bash. It reads comments in config
38
+ formats and markup as well: YAML, TOML, INI, Makefile, Dockerfile,
39
+ HTML, and XML. Findings print as plain text, JSON, or SARIF.
37
40
 
38
41
  If your language is not on the list, [open an issue](https://github.com/TonyCTHsu/simple-english/issues).
39
42
 
@@ -143,7 +146,7 @@ jobs:
143
146
  runs-on: ubuntu-latest
144
147
  steps:
145
148
  - uses: actions/checkout@v7
146
- - uses: TonyCTHsu/simple-english@v0.11.1
149
+ - uses: TonyCTHsu/simple-english@v0.12.0
147
150
  with:
148
151
  files: |
149
152
  docs/
@@ -155,7 +158,7 @@ To see the findings inline in the pull request, lint with
155
158
  `permissions: {security-events: write}` to the workflow:
156
159
 
157
160
  ```yaml
158
- - uses: TonyCTHsu/simple-english@v0.11.1
161
+ - uses: TonyCTHsu/simple-english@v0.12.0
159
162
  with:
160
163
  format: sarif
161
164
  - uses: github/codeql-action/upload-sarif@v3
@@ -178,7 +181,7 @@ is `se lint`.
178
181
  # .pre-commit-config.yaml
179
182
  repos:
180
183
  - repo: https://github.com/TonyCTHsu/simple-english
181
- rev: v0.11.1
184
+ rev: v0.12.0
182
185
  hooks:
183
186
  - id: se-lint
184
187
  ```
@@ -232,9 +235,21 @@ silent. Closing the Vale gaps needs scripts or an external
232
235
  tagger, and that erases Vale's main advantage: one binary with no
233
236
  service behind it.
234
237
 
235
- ## Scope
238
+ ## Compliance
236
239
 
237
- This tool does not check ASD-STE100 compliance. This repo holds no ASD-STE100 text. If you need full compliance, read the free standard at <https://www.asd-ste100.org/>.
240
+ This tool does not check ASD-STE100 compliance. This repo holds no
241
+ ASD-STE100 text. For full compliance, read the free standard at
242
+ <https://www.asd-ste100.org/>.
243
+
244
+ The tool checks no external style standard. The rules are this repo's
245
+ own, but they draw on the [GOV.UK A to Z style
246
+ guide](https://guidance.publishing.service.gov.uk/writing-to-gov-uk-standards/style-guides/a-to-z-style-guide/)
247
+ and the [US plain language
248
+ guide](https://digital.gov/guides/plain-language/).
249
+
250
+ The rule sources are `rules/simple-english.xml` for pattern rules and
251
+ `lib/simple_english/lint/counts.rb` for counting rules. The full list
252
+ sits in [docs/RULES.md](docs/RULES.md).
238
253
 
239
254
  ## Develop
240
255
 
data/docs/RULES.md CHANGED
@@ -477,6 +477,92 @@ Delete it.
477
477
  - Wrong: let's dive in. Read the log.
478
478
  - Right: Read the log.
479
479
 
480
+ ### SE_SLOP_EMPOWER: allow, not empower
481
+
482
+ Write allow.
483
+
484
+ - Wrong: The setting empowers the user to edit files.
485
+ - Right: The setting allows the user to edit files.
486
+
487
+ ### SE_SLOP_COLLABORATE: work with, not collaborate or liaise
488
+
489
+ Write work with.
490
+
491
+ - Wrong: The team collaborates with the owners.
492
+ - Right: The team works with the owners.
493
+
494
+ ### SE_SLOP_INITIATE: start, not initiate
495
+
496
+ Write start.
497
+
498
+ - Wrong: Initiate the build.
499
+ - Right: Start the build.
500
+
501
+ ### SE_SLOP_GOING_FORWARD: from now on, not going forward
502
+
503
+ Write from now on.
504
+
505
+ - Wrong: Going forward, read the log.
506
+ - Right: From now on, read the log.
507
+
508
+ ### SE_SLOP_TACKLE: solve, not tackle
509
+
510
+ Write solve or deal with.
511
+
512
+ - Wrong: The team tackled the problem.
513
+ - Right: The team solved the problem.
514
+
515
+ ### SE_HIDDEN_VERB_DECISION: decide, not make a decision
516
+
517
+ Write decide.
518
+
519
+ - Wrong: Make a decision before the release.
520
+ - Right: Decide before the release.
521
+
522
+ ### SE_HIDDEN_VERB_ASSISTANCE: help, not provide assistance
523
+
524
+ Write help.
525
+
526
+ - Wrong: The tool provides assistance to new users.
527
+ - Right: The tool helps new users.
528
+
529
+ ### SE_HIDDEN_VERB_CONSIDERATION: consider, not take into consideration
530
+
531
+ Write consider.
532
+
533
+ - Wrong: Take the failure into consideration before you restart.
534
+ - Right: Consider the failure before you restart.
535
+
536
+ ### SE_HIDDEN_VERB_ABLE: can, not is able to
537
+
538
+ Write can.
539
+
540
+ - Wrong: The tool is able to read the log.
541
+ - Right: The tool can read the log.
542
+
543
+ ### SE_NUMBER_WORDS: numerals, not compound number words
544
+
545
+ #### spelled with a space
546
+
547
+ Write the numeral, such as 24.
548
+
549
+ - Wrong: The log keeps twenty four hours.
550
+ - Right: The log keeps 24 hours.
551
+
552
+ #### spelled with a hyphen
553
+
554
+ Write the numeral, such as 24.
555
+
556
+ - Wrong: The job runs for twenty-four hours.
557
+ - Right: The job runs for 24 hours.
558
+
559
+ #### standalone teens and tens
560
+
561
+ Write the numeral, such as 12.
562
+
563
+ - Wrong: The retry waits fifteen seconds.
564
+ - Right: The retry waits 15 seconds.
565
+
480
566
  ## Counting rules
481
567
 
482
568
  These rules run in Ruby on Markdown text. Code comments do not use
@@ -82,7 +82,7 @@ module SimpleEnglish
82
82
  def split(comment)
83
83
  marker = comment[MARKER] || ""
84
84
  body = comment[marker.length..] || comment
85
- closer = body[CLOSER] || ""
85
+ closer = body[CLOSER, 1] || ""
86
86
  body = body[0, body.length - closer.length] unless closer.empty?
87
87
  [marker, body, closer]
88
88
  end
@@ -25,7 +25,37 @@ module SimpleEnglish
25
25
  ".cc" => "cpp",
26
26
  ".cxx" => "cpp",
27
27
  ".hpp" => "cpp",
28
- ".h" => "cpp"
28
+ ".h" => "cpp",
29
+ ".c" => "c",
30
+ ".m" => "objc",
31
+ ".php" => "php",
32
+ ".swift" => "swift",
33
+ ".scala" => "scala",
34
+ ".ex" => "elixir",
35
+ ".exs" => "elixir",
36
+ ".lua" => "lua",
37
+ ".dart" => "dart",
38
+ ".pl" => "perl",
39
+ ".pm" => "perl",
40
+ ".r" => "r",
41
+ ".sql" => "sql",
42
+ ".hs" => "haskell",
43
+ ".zig" => "zig",
44
+ ".toml" => "toml",
45
+ ".ini" => "ini",
46
+ ".mk" => "makefile",
47
+ ".html" => "html",
48
+ ".htm" => "html",
49
+ ".xml" => "xml"
50
+ }.freeze
51
+
52
+ # Dockerfile and Makefile carry no extension, and the variants
53
+ # keep the language: Dockerfile.dev, Makefile.dev.
54
+ NAME_LANGUAGES = {
55
+ "Dockerfile" => "dockerfile",
56
+ "Makefile" => "makefile",
57
+ "makefile" => "makefile",
58
+ "GNUmakefile" => "makefile"
29
59
  }.freeze
30
60
 
31
61
  PROSE_EXTENSIONS = [".md"].freeze
@@ -34,6 +64,10 @@ module SimpleEnglish
34
64
 
35
65
  # nil for files we do not lint.
36
66
  def language_for(path)
67
+ name = File.basename(path)
68
+ return NAME_LANGUAGES[name] if NAME_LANGUAGES[name]
69
+ return "dockerfile" if name.start_with?("Dockerfile.")
70
+ return "makefile" if name.start_with?("Makefile.")
37
71
  EXTENSION_LANGUAGES[File.extname(path)]
38
72
  end
39
73
 
@@ -42,7 +76,7 @@ module SimpleEnglish
42
76
  # single explicit path behaves like directory expansion (cli.rb).
43
77
  def lintable?(path)
44
78
  path == "-" || PROSE_EXTENSIONS.include?(File.extname(path)) ||
45
- !EXTENSION_LANGUAGES[File.extname(path)].nil?
79
+ !language_for(path).nil?
46
80
  end
47
81
 
48
82
  def comment_spans(source, language)
@@ -61,8 +95,11 @@ module SimpleEnglish
61
95
  spans.sort_by!(&:start_byte)
62
96
  end
63
97
 
98
+ # The xml grammar names the node "Comment", so the kind check
99
+ # reads case-insensitive.
64
100
  def comment?(node)
65
- node.kind.end_with?("comment") && !node.kind.start_with?("non")
101
+ kind = node.kind.downcase
102
+ kind.end_with?("comment") && !kind.start_with?("non")
66
103
  end
67
104
 
68
105
  private_class_method :comment?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleEnglish
4
- VERSION = "0.11.1"
4
+ VERSION = "0.12.0"
5
5
  end
@@ -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: 4fa1302a50cc6418e5de2832ff526b95bb369679f1847782e1af5404c6935437
4
+ sha256: 35722a07e3544928d59be6d6d05ebe3c5a2c0a84bdadb7ea18051071cc58aa8f
@@ -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-17T22:37:36Z",
7
+ "timestamp" : "2026-10-19T20:22:10Z",
8
8
  "lifecycles" : [
9
9
  {
10
10
  "phase" : "build"
@@ -74,7 +74,7 @@
74
74
  states a condition, put the condition first
75
75
  (SE_CONDITION_FIRST). No word-list carve-outs: this tool ships
76
76
  no approved dictionary, so every comma-plus-ing participle
77
- fires, including the preposition-like ones. -->
77
+ fires, even the preposition-like ones. -->
78
78
  <rule id="SE_ING_AFTER_COMMA" name="No -ing after a comma">
79
79
  <pattern><token>,</token><token postag="VBG"><exception scope="next" regexp="yes">[,)]|and|or</exception></token></pattern>
80
80
  <message>Write a new sentence, or put the condition first. A trailing -ing phrase hides who does what and when.</message>
@@ -641,5 +641,132 @@
641
641
  <example type="correct">Read the log.</example>
642
642
  </rule>
643
643
 
644
+ <!-- Swap words from the GOV.UK "A to Z" style guide, used under the
645
+ Open Government Licence v3.0: guidance.publishing.service.gov.uk -->
646
+ <rule id="SE_SLOP_EMPOWER" name="allow, not empower">
647
+ <pattern>
648
+ <token inflected="yes">empower</token>
649
+ </pattern>
650
+ <message>Write <suggestion>allow</suggestion>.</message>
651
+ <example type="incorrect">The setting <marker>empowers</marker> the user to edit files.</example>
652
+ <example type="correct">The setting allows the user to edit files.</example>
653
+ </rule>
654
+
655
+ <rule id="SE_SLOP_COLLABORATE" name="work with, not collaborate or liaise">
656
+ <pattern>
657
+ <token regexp="yes" inflected="yes">collaborate|liaise</token>
658
+ </pattern>
659
+ <message>Write <suggestion>work with</suggestion>.</message>
660
+ <example type="incorrect">The team <marker>collaborates</marker> with the owners.</example>
661
+ <example type="correct">The team works with the owners.</example>
662
+ </rule>
663
+
664
+ <rule id="SE_SLOP_INITIATE" name="start, not initiate">
665
+ <pattern>
666
+ <token inflected="yes">initiate</token>
667
+ </pattern>
668
+ <message>Write <suggestion>start</suggestion>.</message>
669
+ <example type="incorrect"><marker>Initiate</marker> the build.</example>
670
+ <example type="correct">Start the build.</example>
671
+ </rule>
672
+
673
+ <rule id="SE_SLOP_GOING_FORWARD" name="from now on, not going forward">
674
+ <pattern>
675
+ <token regexp="yes">going|moving</token>
676
+ <token>forward</token>
677
+ </pattern>
678
+ <message>Write <suggestion>from now on</suggestion>.</message>
679
+ <example type="incorrect"><marker>Going forward</marker>, read the log.</example>
680
+ <example type="correct">From now on, read the log.</example>
681
+ </rule>
682
+
683
+ <rule id="SE_SLOP_TACKLE" name="solve, not tackle">
684
+ <pattern>
685
+ <token inflected="yes">tackle</token>
686
+ </pattern>
687
+ <message>Write <suggestion>solve</suggestion> or <suggestion>deal with</suggestion>.</message>
688
+ <example type="incorrect">The team <marker>tackled</marker> the problem.</example>
689
+ <example type="correct">The team solved the problem.</example>
690
+ </rule>
691
+
692
+ <!-- Hidden verbs from the plain-language guidance at
693
+ plainlanguage.gov: the noun names the action, the verb
694
+ makes the sentence shorter and names who acts. -->
695
+ <rule id="SE_HIDDEN_VERB_DECISION" name="decide, not make a decision">
696
+ <pattern>
697
+ <token inflected="yes">make</token>
698
+ <token min="0" max="1" regexp="yes">a|an</token>
699
+ <token regexp="yes">decisions?</token>
700
+ </pattern>
701
+ <message>Write <suggestion>decide</suggestion>.</message>
702
+ <example type="incorrect"><marker>Make a decision</marker> before the release.</example>
703
+ <example type="correct">Decide before the release.</example>
704
+ </rule>
705
+
706
+ <rule id="SE_HIDDEN_VERB_ASSISTANCE" name="help, not provide assistance">
707
+ <pattern>
708
+ <token inflected="yes">provide</token>
709
+ <token>assistance</token>
710
+ </pattern>
711
+ <message>Write <suggestion>help</suggestion>.</message>
712
+ <example type="incorrect">The tool <marker>provides assistance</marker> to new users.</example>
713
+ <example type="correct">The tool helps new users.</example>
714
+ </rule>
715
+
716
+ <rule id="SE_HIDDEN_VERB_CONSIDERATION" name="consider, not take into consideration">
717
+ <pattern>
718
+ <token inflected="yes" skip="3">take</token>
719
+ <token>into</token>
720
+ <token>consideration</token>
721
+ </pattern>
722
+ <message>Write <suggestion>consider</suggestion>.</message>
723
+ <example type="incorrect"><marker>Take the failure into consideration</marker> before you restart.</example>
724
+ <example type="correct">Consider the failure before you restart.</example>
725
+ </rule>
726
+
727
+ <rule id="SE_HIDDEN_VERB_ABLE" name="can, not is able to">
728
+ <pattern>
729
+ <token regexp="yes">am|is|are|be|being</token>
730
+ <token>able</token>
731
+ <token>to</token>
732
+ </pattern>
733
+ <message>Write <suggestion>can</suggestion>.</message>
734
+ <example type="incorrect">The tool <marker>is able to</marker> read the log.</example>
735
+ <example type="correct">The tool can read the log.</example>
736
+ </rule>
737
+
738
+ <!-- Compound number words carry no defense in any source this
739
+ ruleset follows: plainlanguage.gov, GOV.UK, Microsoft, and
740
+ Chicago all write the numeral in technical prose. The
741
+ sub-rules cover the two spellings: LanguageTool keeps
742
+ "twenty-four" as one token. -->
743
+ <rulegroup id="SE_NUMBER_WORDS" name="numerals, not compound number words">
744
+ <rule name="spelled with a space">
745
+ <pattern>
746
+ <token regexp="yes">twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety</token>
747
+ <token regexp="yes">one|two|three|four|five|six|seven|eight|nine</token>
748
+ </pattern>
749
+ <message>Write the numeral, such as 24.</message>
750
+ <example type="incorrect">The log keeps <marker>twenty four</marker> hours.</example>
751
+ <example type="correct">The log keeps 24 hours.</example>
752
+ </rule>
753
+ <rule name="spelled with a hyphen">
754
+ <pattern>
755
+ <token regexp="yes">(twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety)[-–‑](one|two|three|four|five|six|seven|eight|nine)</token>
756
+ </pattern>
757
+ <message>Write the numeral, such as 24.</message>
758
+ <example type="incorrect">The job runs for <marker>twenty-four</marker> hours.</example>
759
+ <example type="correct">The job runs for 24 hours.</example>
760
+ </rule>
761
+ <rule name="standalone teens and tens">
762
+ <pattern>
763
+ <token regexp="yes">ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety</token>
764
+ </pattern>
765
+ <message>Write the numeral, such as 12.</message>
766
+ <example type="incorrect">The retry waits <marker>fifteen</marker> seconds.</example>
767
+ <example type="correct">The retry waits 15 seconds.</example>
768
+ </rule>
769
+ </rulegroup>
770
+
644
771
  </category>
645
772
  </rules>
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.11.1
4
+ version: 0.12.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-17 00:00:00.000000000 Z
11
+ date: 2026-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tree_sitter_language_pack
@@ -178,7 +178,7 @@ licenses:
178
178
  metadata:
179
179
  homepage_uri: https://github.com/TonyCTHsu/simple-english
180
180
  source_code_uri: https://github.com/TonyCTHsu/simple-english
181
- changelog_uri: https://github.com/TonyCTHsu/simple-english/blob/v0.11.1/CHANGELOG.md
181
+ changelog_uri: https://github.com/TonyCTHsu/simple-english/blob/v0.12.0/CHANGELOG.md
182
182
  post_install_message:
183
183
  rdoc_options: []
184
184
  require_paths: