Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2688)

Unified Diff: docs/retrieving_code_analysis_warnings.md

Issue 1324603002: [Docs] Another round of stylistic fixes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « docs/proxy_auto_config.md ('k') | docs/script_preprocessor.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: docs/retrieving_code_analysis_warnings.md
diff --git a/docs/retrieving_code_analysis_warnings.md b/docs/retrieving_code_analysis_warnings.md
index 34c36f18600669d05839e52214314ec8730edaaa..a59e6964bdf5f9b890f7b3d1b06dcd0feab0f84d 100644
--- a/docs/retrieving_code_analysis_warnings.md
+++ b/docs/retrieving_code_analysis_warnings.md
@@ -1,40 +1,66 @@
-# Introduction
+# Retrieving Code Analysis Warnings
-Several times a day the Chromium code base is built with Microsoft VC++'s /analyze compile option. This does static code analysis which has found numerous bugs (see https://code.google.com/p/chromium/issues/detail?id=427616). While it is possible to visit the /analyze builder page and look at the raw results (http://build.chromium.org/p/chromium.fyi/builders/Chromium%20Windows%20Analyze) this works very poorly.
+Several times a day the Chromium code base is built with Microsoft VC++'s
+`/analyze` compile option. This does static code analysis which has found
+numerous bugs (see https://crbug.com/427616). While it is possible to visit the
+`/analyze` builder page and look at the raw results
+(http://build.chromium.org/p/chromium.fyi/builders/Chromium%20Windows%20Analyze)
+this works very poorly.
-As of this writing there are 2,702 unique warnings. Some of these are in header files and fire multiple times so there are a total of 11,202 warning lines. Most of these have been examined and found to be false positives. Therefore, in order to sanely examine the /analyze warnings it is necessary to summarize the warnings, and find what is new.
+As of this writing there are 2,702 unique warnings. Some of these are in header
+files and fire multiple times so there are a total of 11,202 warning lines. Most
+of these have been examined and found to be false positives. Therefore, in order
+to sanely examine the /analyze warnings it is necessary to summarize the
+warnings, and find what is new.
There are scripts to do this.
-# Details
+## Details
-The necessary scripts, which currently run on Windows only, are checked in to tools\win\new\_analyze\_warnings. Typical usage is like this:
+The necessary scripts, which currently run on Windows only, are checked in to
+`tools\win\new_analyze_warnings`. Typical usage is like this:
-```
-> set ANALYZE_REPO=d:\src\analyze_chromium
-> retrieve_latest_warnings.bat
-```
+ > set ANALYZE_REPO=d:\src\analyze_chromium
+ > retrieve_latest_warnings.bat
-The batch file using the associated Python scripts to retrieve the latest results from the web page, create a summary file, and if previous results were found create a new warnings file. Typical results look like this:
+The batch file using the associated Python scripts to retrieve the latest
+results from the web page, create a summary file, and if previous results were
+found create a new warnings file. Typical results look like this:
-```
-analyze0067_full.txt
-analyze0067_summary.txt
-analyze0067_new.txt
-```
+ analyze0067_full.txt
+ analyze0067_summary.txt
+ analyze0067_new.txt
-If ANALYZE\_REPO is set then the batch file goes to %ANALYZE\_REPO%\src, does a git pull, then does a checkout of the revision that corresponds to the latest warnings, and then does a gclient sync. The warnings can then be easily correlated to the specific source that triggered them.
+If `ANALYZE_REPO` is set then the batch file goes to `%ANALYZE_REPO%\src`, does
+a git pull, then does a checkout of the revision that corresponds to the latest
+warnings, and then does a gclient sync. The warnings can then be easily
+correlated to the specific source that triggered them.
-# Understanding the results
+## Understanding the results
-The new.txt file lists new warnings, and fixed warnings. Usually it can accurately identify them but sometimes all it can say is that the number of instances of a particularly warning has changed, which is usually not of interest. If you look at new warnings every day or two then the number of new warnings is usually low enough to be quite manageable.
+The `new.txt` file lists new warnings, and fixed warnings. Usually it can
+accurately identify them but sometimes all it can say is that the number of
+instances of a particularly warning has changed, which is usually not of
+interest. If you look at new warnings every day or two then the number of new
+warnings is usually low enough to be quite manageable.
-The summary.txt file groups warnings by type, and then sorts the groups by frequency. Low frequency warnings are more likely to be real bugs, so focus on those. However, all of the low-frequency have been investigated so at this time they are unlikely to be real bugs.
+The `summary.txt` file groups warnings by type, and then sorts the groups by
+frequency. Low frequency warnings are more likely to be real bugs, so focus on
+those. However, all of the low-frequency have been investigated so at this time
+they are unlikely to be real bugs.
-The majority of new warnings are variable shadowing warnings. Until -Wshadow is enabled for gcc/clang builds these warnings will continue to appear, and unless they are actually buggy or are particularly confusing it is usually not worth fixing them. One exception would be if you are planning to enable -Wshadow in which case using the list or relevant shadowing warnings would be ideal.
+The majority of new warnings are variable shadowing warnings. Until `-Wshadow`
+is enabled for gcc/clang builds these warnings will continue to appear, and
+unless they are actually buggy or are particularly confusing it is usually not
+worth fixing them. One exception would be if you are planning to enable
+`-Wshadow` in which case using the list or relevant shadowing warnings would be
+ideal.
-Some of the warnings say that out-of-range memory accesses will occur, which is pretty scary. For instance "warning C6201: Index '-1' is out of valid index range '0' to '4'". In most cases these are false positives so use your own judgment when deciding whether to fix them.
+Some of the warnings say that out-of-range memory accesses will occur, which is
+pretty scary. For instance "warning C6201: Index '-1' is out of valid index
+range '0' to '4'". In most cases these are false positives so use your own
+judgment when deciding whether to fix them.
-The full.txt file contains the raw output and should usually be ignored.
+The `full.txt` file contains the raw output and should usually be ignored.
-If you have any questions then post to the chromium dev mailing list.
+If you have any questions then post to the chromium dev mailing list.
« no previous file with comments | « docs/proxy_auto_config.md ('k') | docs/script_preprocessor.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698