Commit c141fe2
authored
Improve error (#18)
* feat: add no-ai-colon-continuation rule with kuromojin morphological analysis
- Implement new rule to detect English syntax patterns translated to Japanese
- Use kuromojin for accurate part-of-speech analysis to distinguish nouns from predicates
- Allow natural Japanese expressions like '使い方:' (noun + colon)
- Detect unnatural patterns like '実行します:' (predicate + colon)
- Support AST-based detection for Paragraph + block element combinations
- Remove duplicate colon detection from ai-tech-writing-guideline rule
- Add comprehensive test coverage for various patterns
Fixes #16
* fix: support full-width colon and add original test cases
- Add support for both half-width (:) and full-width (:) colons
- Include conjunction detection (例えば: should be flagged)
- Port original test cases from ai-tech-writing-guideline
- Ensure proper colon character display in error messages
- All tests now passing with comprehensive pattern coverage
* refactor: improve colon detection implementation
- Remove redundant colon index calculation
- Determine colon type once and reuse
- Remove unused colonIndex variable
- Keep clean and efficient implementation
* feat: no-ai-colon-continuationルールを追加し、自然な日本語表現を促進
* fix: コロンで終わる述語パターンのエラーメッセージを改善し、自然な日本語表現を提案
* fix: エラーメッセージの表現を改善し、述語とコロンで終わるパターンを明確にしました
* fix: エラーメッセージから冗長な表現を削除し、自然な日本語表現を強調しました1 parent 2522ce8 commit c141fe2
File tree
2 files changed
+7
-7
lines changed- src/rules
- test/rules
2 files changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
0 commit comments