关闭。这个问题是opinion-based .它目前不接受答案。
想改进这个问题?更新问题,以便 editing this post 可以用事实和引用来回答它.
6年前关闭。
Improve this question
今天我收到了一个 friend 的一个非常有趣的问题,我无法给出一个满意的答案。
“您如何衡量 Android 上的代码质量?”
首先,我说声纳是一个很好的工具,但后来我意识到它有点过时了,不是吗?我想说的是测试覆盖率,作为一个通用术语,但坦率地说,高代码覆盖率并不意味着经过良好测试的代码。
所以伙计们,如果你能在这个问题上添加一些好的答案,我会很高兴的!
“您如何衡量 Android 上的代码质量”?
最佳答案
我认为没有一个简单的答案。如果你需要一套工具来衡量代码质量,这里有一些:
1) FindBugs for Java (http://findbugs.sourceforge.net/)
2) Checkstyle for Java (http://checkstyle.sourceforge.net/)
3) Android Lint (http://developer.android.com/tools/debugging/improving-w-lint.html)
4) Jenkins/Hudson for build-automation
5) Valgrind for C++/native library (http://valgrind.org/docs/manual/dist.readme-android.html)
6) JUNITs for unit test coverage
7) Crashlytics (https://try.crashlytics.com/) (This is not free, there may be other alternatives)
8) Google Analytics
9) Code review tool of your choice
10)LeakCanary (https://github.com/square/leakcanary)
11) Relic (https://newrelic.com/ -- Paid)
可能还有更多,但我经常使用其中一些来交叉检查代码质量。
更重要的是,这里有一个很好的质量工具列表:https://github.com/stephanenicolas/Quality-Tools-for-Android
您和您的团队需要就基线达成一致并遵循它。
关于java - 安卓代码质量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36167326/