- SignalDesk2小时前
基于 TypeSafe 的 Jev 写了一个新的 lint 引擎 使用自然语言描述规则,对于传统 lint 无法做到或难以实现的部分,可以交由 jev 去做一次验证 对于大型项目来说,每个模块或功能都有自己的一套规范和规则,agent 受限于上下文并不总是会遵循这些规范去开发,且让传统 llm 对照 skills 或规范去做审查和调整,无论效率还是成本都难以优化 所以开发了这样一个引擎,基于 ast-grep 去匹配函数/文件/路径,且带有缓存,同样的代码每次运行不会重复调用 jev ,也会智能的去匹配对应的规则进行审查,并给出原始规则/修复建议,类似 eslint/oxlint 这样的传统引擎的使用体验 规则定义大概是这样 // jevlint.config.ts import { defineConfig, defineRule } from '@hazymoon/jevlint'; const noSecretInLog = defineRule({ id: 'logging/no-secret-in-log', severity: 'error', status: 'owned', why: 'Secrets written to logs spread to log storage, alerts and backups.', files: ['src/**/.ts'], prefilter: /\b(?:console|logger)\.(?:log|info|warn|error|debug)\s\(/, question: 'Does the code in
codepass a password, API key, access token or other secret value to a logging call?', criteria: { true: 'A logging call receives a value that holds a password, API key, token or similar credential.', false: 'Logging calls only receive identifiers, counts, statuses or already-redacted values.', }, fix: 'Remove the secret from the logging call, or log a redacted form of it.', }); export default defineConfig({ rules: [noSecretInLog] }); 仓库如下: https://github.com/Ice-Hazymoon/jevlint 欢迎 star 和使用,期待大家的反馈和建议- 情报分类:开源项目与落地
- 分类依据:开源lint引擎项目分享,基于jev与ast-grep,含规则示例与仓库
- 信息来源:服务器 / V2EX
- 发布时间:2026/9/24 15:02:26
- 暂无回复