py. syntax is doing weird things with the clj-kondo linter

未关闭
#268 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
clojure, python
领域
tooling

调研方向

首先使用 clj-kondo 重现 py/py. 调用,并比较自定义 :lint-as 的行为与抑制 :unresolved-var 的效果。没有指定实现文件或测试;跟踪 clj-kondo 如何解析保留的 py. 表示法,并将完成定义为一种可用的 lint 配置或有文档说明的支持,能够移除报告的两个波浪线标记。

由索引模型根据 Issue 内容生成。

描述

The linter is doing something weird, because it assumes that py/py. is actually a reference to the symbol "py/py" with no ".".

I'm unable to write a custom :lint-as for this, because clj-kondo doesn't consider the possibility that "py." could represent a macro. ingoring :unresolved-var doesn't quite fill my usecase, as I want to remove the red squiglies under the second argument of the py. call as well.

I think clj-kondo is technically in the right here, because py. isn't supported clojure syntax, although I do like the py. notation, and it'd be nice if it was supported. I don't ask to change the notation, but it'd be nice to have a workaround that fixes these tooling issues.

https://clojure.org/reference/reader#_reader_forms

Symbols beginning or ending with '.' are reserved by Clojure.

Great Library! -- Sammy

主要语言
Clojure
星标
1.2k
派生
74
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

clj-python/libpython-clj 的其他 Issue

查看 clj-python/libpython-clj 的全部 Issue

相似的 Issue

更多 Clojure Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。