Android Reports comments that contain Java code. Usually code that is commented out

编程入门 行业动态 更新时间:2024-10-28 19:23:49

Android Reports <a href=https://www.elefans.com/category/jswz/34/1466783.html style=comments that contain Java code. Usually code that is commented out"/>

Android Reports comments that contain Java code. Usually code that is commented out

  • 告警信息
  • Reports comments that contain Java code. Usually code that is commented out gets outdated very fast and becomes misleading. As most of the projects use some kind of version control system, it is better to delete commented out code completely and use VCS history instead.
  • 解决办法

将 /**/注释部分从 方法中拿出来

最新版本的 Idea/AndriudStudio 推荐使用VCS hIstory 版本记录来处理删除的代码,而不是使用 注释,注释方案较之于版本管理方案风险较高,推荐在删除代码时就要做一次版本提交,亦或是通过VCS寻找

最终效果 将注释部分从方法中拿出来以后 此黄色代码告警消失

  • Android Studio 中 VCS 的使用介绍

VCS 使用案列
入口

注意区分Git和 VCS 点击 show history

更多推荐

Android Reports comments that contain Java code. Usually code that is commented

本文发布于:2024-02-11 03:24:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1678873.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:comments   Reports   Android   commented   code

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!