规则是
“ // Reference [matches(@literal,\” ^ \ $ [^!] + \“)和./preceding-sibling::Text和./following-sibling::Text]”
为了方便起见,我将提供该项目,您可以对其进行mvn测试。
整个项目在https://github.com/XenoAmess/p3c/tree/1605f4d1b9c6a505074be5328953af26f578e190/p3c-pmd
Rule类为com.alibaba.p3c.pmd.lang.vm.rule.other.UseQuietReferenceNotationRule
我试图浏览您的更新日志,但没有发现任何相关。
感谢您的帮助。
或者,您可以更改规则以使用ctx.getSourceCodeFile().toString()
恢复UseQuietReferenceNotationRule.java:62中的完整路径名。尽管该文件不存在,但仍指向“ n / a”。
用于检查规则本身中路径名称的替代方法可能是File exclusion/inclusion patterns。
此外,如果您认为规则对更广泛的受众有意义,也欢迎对https://github.com/pmd/pmd做出贡献。