Skip to content
Snippets Groups Projects

Issue #3253828: Use static analysis to detect new or changed update functions, to reduce false positives in StagedDBUpdateValidator

Merged Issue #3253828: Use static analysis to detect new or changed update functions, to reduce false positives in StagedDBUpdateValidator
1 unresolved thread
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Ted Bowman
  • Ted Bowman
  • Ted Bowman
  • Ted Bowman
  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H resolved all threads

    resolved all threads

  • Adam G-H added 1 commit

    added 1 commit

    • 9d486404 - Use a regular assert for count

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    • 4ae9dd24 - Revert "Use a regular assert for count"

    Compare with previous version

  • Ted Bowman
  • Ted Bowman
  • Adam G-H added 1 commit

    added 1 commit

    • 4f9e7951 - Minor fixes, still needing test coverage

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    • fe6c9155 - Try to fill in missing test gaps, and switch to array_diff for accuracy

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H resolved all threads

    resolved all threads

  • Ted Bowman
  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H resolved all threads

    resolved all threads

  • Adam G-H added 2 commits

    added 2 commits

    • c85daa53 - 1 commit from branch project:3.0.x
    • 48f00808 - Merge branch '3.0.x' into 3253828-use-static-analysis

    Compare with previous version

  • Ted Bowman
    Ted Bowman @tedbow started a thread on the diff
  • 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 about token_get_all a couple days ago so I think we can assume it will be new others

    • Please register or sign in to reply
  • Adam G-H added 1 commit

    added 1 commit

    • a5281d69 - Mention token_get_all in comment

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    • 3d0c6b58 - Remove the word "possible" -- these are definitely database updates

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • Adam G-H added 1 commit

    added 1 commit

    Compare with previous version

  • merged

  • Please register or sign in to reply
    Loading