@atlisp/lint 0.1.19 → 0.1.20

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.
@@ -82,7 +82,7 @@
82
82
  "undeclared_setq": "warn",
83
83
  "unused_catch_result": "warn",
84
84
  "string_concat_loop": "warn",
85
- "if_without_else": "warn",
85
+ "if_without_else": "off",
86
86
  "redundant_list": "warn",
87
87
  "entget_in_loop": "warn",
88
88
  "promise_handler": "warn",
package/dist/config.js CHANGED
@@ -124,7 +124,7 @@ const DEFAULT_CONFIG = {
124
124
  redundant_if: 'warn',
125
125
  unused_catch_result: 'warn',
126
126
  string_concat_loop: 'warn',
127
- if_without_else: 'warn',
127
+ if_without_else: 'off',
128
128
  redundant_list: 'warn',
129
129
  entget_in_loop: 'warn',
130
130
  promise_handler: 'warn',
package/dist/locale.js CHANGED
@@ -91,7 +91,7 @@ const messages = {
91
91
  'index.format_unstable': 'Formatting is not idempotent — re-running formatCode produces different output',
92
92
  unused_catch_result: 'vl-catch-all-apply result used as boolean — use vl-catch-all-error-p to check',
93
93
  string_concat_loop: 'String concatenation inside {0} — move strcat outside the loop for performance',
94
- if_without_else: 'if has no else branch and the return value is used add nil else for clarity',
94
+ if_without_else: 'if without else branch else is implicitly nil, which is idiomatic in Lisp',
95
95
  redundant_list: '(list) evaluates to nil — use nil directly',
96
96
  entget_in_loop: 'entget inside loop — cache entget result before the loop for performance',
97
97
  promise_handler: 'vlax-invoke/vlax-invoke-method without callback handler — results may be lost',
@@ -211,7 +211,7 @@ Options:
211
211
  'index.format_unstable': '格式化结果不稳定——再次格式化后输出不同',
212
212
  unused_catch_result: 'vl-catch-all-apply 的结果被当作布尔值使用——应用 vl-catch-all-error-p 检查',
213
213
  string_concat_loop: '循环 {0} 内使用了字符串拼接——为提升性能请将 strcat 移到循环外',
214
- if_without_else: 'if 没有 else 分支且返回值被使用——建议添加 nil else 分支',
214
+ if_without_else: 'if 没有 else 分支——else 默认为 nil Lisp 惯用写法',
215
215
  redundant_list: '(list) 等于 nil——请直接使用 nil',
216
216
  entget_in_loop: '循环内使用了 entget——请在循环外缓存 entget 结果',
217
217
  promise_handler: 'vlax-invoke/vlax-invoke-method 没有回调处理器——结果可能丢失',
package/dist/presets.js CHANGED
@@ -67,7 +67,7 @@ exports.PRESETS = {
67
67
  redundant_if: 'warn',
68
68
  unused_catch_result: 'warn',
69
69
  string_concat_loop: 'warn',
70
- if_without_else: 'warn',
70
+ if_without_else: 'off',
71
71
  redundant_list: 'warn',
72
72
  entget_in_loop: 'warn',
73
73
  promise_handler: 'warn',
@@ -153,7 +153,7 @@ exports.PRESETS = {
153
153
  namespace_header: 'error',
154
154
  unused_catch_result: 'error',
155
155
  string_concat_loop: 'warn',
156
- if_without_else: 'error',
156
+ if_without_else: 'off',
157
157
  redundant_list: 'error',
158
158
  entget_in_loop: 'warn',
159
159
  promise_handler: 'error',
package/dist/rules.js CHANGED
@@ -230,7 +230,7 @@ exports.RULES = [
230
230
  },
231
231
  { name: 'unused_catch_result', defaultSeverity: 'warn', description: '检测 vl-catch-all-apply 结果被当布尔值用', category: '正确性' },
232
232
  { name: 'string_concat_loop', defaultSeverity: 'warn', description: '检测循环内字符串拼接', category: '性能' },
233
- { name: 'if_without_else', defaultSeverity: 'warn', description: '检测 if 无 else 分支且返回值被使用', category: '正确性' },
233
+ { name: 'if_without_else', defaultSeverity: 'off', description: '检测 if 无 else 分支', category: '风格' },
234
234
  { name: 'redundant_list', defaultSeverity: 'warn', description: '检测 (list) 等价于 nil', category: '风格' },
235
235
  { name: 'entget_in_loop', defaultSeverity: 'warn', description: '检测循环内 entget', category: '性能' },
236
236
  { name: 'promise_handler', defaultSeverity: 'warn', description: '检测 vlax-invoke 缺少回调处理器', category: '最佳实践' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlisp/lint",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "AutoLISP static analysis tool — parens, security, conventions, SBCL syntax validation",
5
5
  "keywords": [
6
6
  "CAD",