Issue #3253828: Use static analysis to detect new or changed update functions, to reduce false positives in StagedDBUpdateValidator
1 unresolved thread
Merge request reports
Activity
added 6 commits
-
0011d522...9bff583f - 4 commits from branch
project:3.0.x
- 68061929 - Merge branch '3.0.x' into 3253828-use-static-analysis
- f0ae625e - Better null handling
-
0011d522...9bff583f - 4 commits from branch
added 1 commit
- 61894b19 - Fix parser trouble and handle anonymous functions
added 1 commit
- 2fb93a0b - Hollow out StagedDatabaseUpdateValidatorTest
- Resolved by Adam G-H
- Resolved by Adam G-H
- Resolved by Adam G-H
- Resolved by Adam G-H
- Resolved by Adam G-H
- Resolved by Adam G-H
- Resolved by Adam G-H
- Resolved by Adam G-H
added 1 commit
- fe6c9155 - Try to fill in missing test gaps, and switch to array_diff for accuracy
- Resolved by Adam G-H
133 $code = file_get_contents($file); 134 $tokens = token_get_all($code); 135 136 for ($i = 0; $i < count($tokens); $i++) { 137 $chunk = array_slice($tokens, $i, 3); 138 if ($this->tokensMatchFunctionNamePattern($chunk, $pattern)) { 139 $function_names[] = $chunk[2][1]; 140 } 124 141 } 125 142 } 126 return $hashes; 143 return $function_names; 144 } 145 146 /** 147 * Determines if a set of tokens contain a function name matching a pattern. We should mention somewhere that this expecting tokens as made by
token_get_all
. that function is not in comment anywhere in this MR and only used by 1 line. So if you missed that it would very hard to understand. I only found out abouttoken_get_all
a couple days ago so I think we can assume it will be new others
added 1 commit
- 3d0c6b58 - Remove the word "possible" -- these are definitely database updates
Please register or sign in to reply