Error activating / deactivating rules with the same name
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 Eclipse's PMD Rule Configuration 开始,检查存储已激活规则的 Eclipse 首选项文件。重现 Java/Ecmascript 同名规则的情况,然后验证在应用设置并重新构建后,特定于语言的激活和停用仍然会持久化,且不会报告已停用规则的违规问题。
由索引模型根据 Issue 内容生成。
描述
Hi, I think I spotted a bug when I try to activate a rule in Java and deactivate the rule with the same name in all other languages.
Tested with Eclipse 4.25.0 (2022-09) and PMD plugin 4.40.0.v20221029
Steps to reproduce:
- Install PMD Eclipse plugin
- Import project with Java and Javascript. In my case, the Java is the code I actually want to check, and the Javascript is automatically generated in
targetdirectory (Jacoco report in HTML/JS format), I don't want to see violations for - Go to Window -> Preferences -> PMD Rule Configuration
- Activate rules manually: choose to activate
AssignmentInOperandfor Java and deactivate it for Ecmascript - Apply & close, click Yes when it asks for a full rebuild
- The project sees violations in the Javascript that we just deactivated :'(
- Reopen Window -> Preferences -> PMD Rule Configuration
- The Ecmascript rule we just deactivated is now activate again :'(
I played around with Eclipse preference files, it seems that the activated rules are stored just with their names without mentioning the language and without storing the rules properties. This would break when several rules have the same name.
I worked around this bug by ignoring the target folder in the File Filters preference.
- 主要语言
- Java
- 星标
- 99
- 派生
- 42
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 10
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pmd/pmd-eclipse-plugin 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
pmd/pmd-eclipse-plugin#297 · 1 个 reaction ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
pmd/pmd-eclipse-plugin#212 · 3 条评论 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
pmd/pmd-eclipse-plugin#180 · 6 条评论 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
pmd/pmd-eclipse-plugin#175 ·
维护者通常 2 天内回复
-
info needed
难度 4/5 3-5 天 新手友好度 30/100
pmd/pmd-eclipse-plugin#167 · 3 条评论 ·
维护者通常 2 天内回复
查看 pmd/pmd-eclipse-plugin 的全部 Issue
相似的 Issue
-
agent:working documentation enhancement go:build lane:needs-decision
难度 2/5 1-3 小时 新手友好度 72/100
Sanne/incus-spawn#1435 · 3 条评论 ·
维护者通常 1 天内回复
-
enhancement good first issue up-for-grabs
难度 2/5 1-3 小时 新手友好度 80/100
AnikethTS/ChangeRadar#22 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
openai/openai-java#1202 ·
维护者通常 1 天内回复
-
admin sql type: bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
library-new-request priority
难度 2/5 1-3 小时 新手友好度 70/100
oracle/graalvm-reachability-metadata#10911 · 1 条评论 ·
维护者通常 1 天内回复