Page MenuHomePhabricator

Resolve static analysis errors found by etsy/phan
Closed, ResolvedPublic

Description

Upgrading the elasticsearch plugins has been relatively easy because the compiler is able to tell us about changed/missing methods/classes/etc. The phan project can give us similar information about php. Resolve all, or as many as possible, errors than phan identifies in CirrusSearch so we can use it with the upgraded Elastica library to identify other possible issues.

Details

SubjectRepoBranchLines +/-
mediawiki/extensions/CirrusSearchmaster+2 -0
mediawiki/extensions/CirrusSearchmaster+59 -24
mediawiki/extensions/CirrusSearchmaster+58 -21
mediawiki/extensions/CirrusSearches2.x+57 -30
mediawiki/extensions/CirrusSearchmaster+113 -97
mediawiki/extensions/CirrusSearchmaster+107 -0
mediawiki/extensions/CirrusSearchmaster+67 -5
mediawiki/extensions/CirrusSearchmaster+67 -27
mediawiki/extensions/CirrusSearchmaster+23 -15
mediawiki/extensions/CirrusSearchmaster+6 -30
mediawiki/extensions/CirrusSearchmaster+102 -44
mediawiki/extensions/CirrusSearchmaster+7 -7
mediawiki/extensions/CirrusSearchmaster+4 -2
mediawiki/extensions/CirrusSearchmaster+4 -9
mediawiki/extensions/CirrusSearchmaster+15 -3
mediawiki/extensions/CirrusSearchmaster+2 -2
mediawiki/extensions/CirrusSearchmaster+0 -20
mediawiki/extensions/CirrusSearchmaster+104 -104
mediawiki/extensions/CirrusSearchmaster+0 -38
mediawiki/extensions/CirrusSearchmaster+84 -21
mediawiki/extensions/CirrusSearchmaster+5 -1
mediawiki/extensions/CirrusSearchmaster+254 -52
mediawiki/extensions/CirrusSearchmaster+157 -34
mediawiki/extensions/CirrusSearchmaster+163 -43
mediawiki/extensions/CirrusSearchmaster+9 -3
mediawiki/coremaster+1 -1
mediawiki/extensions/CirrusSearchmaster+21 -7
mediawiki/extensions/CirrusSearchmaster+8 -0
mediawiki/extensions/CirrusSearchmaster+1 -1
mediawiki/extensions/CirrusSearchmaster+11 -2
mediawiki/extensions/CirrusSearchmaster+16 -8
mediawiki/extensions/CirrusSearchmaster+44 -23
mediawiki/extensions/CirrusSearchmaster+65 -24
mediawiki/extensions/CirrusSearchmaster+18 -12
mediawiki/extensions/CirrusSearchmaster+57 -30
Show related patches Customize query in gerrit

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 283350 had a related patch set uploaded (by EBernhardson):
Replace deprecated ConfigFactory::getDefaultInstance()

https://gerrit.wikimedia.org/r/283350

Change 283353 had a related patch set uploaded (by EBernhardson):
Cleanup annotations/signatures in CirrusSearch\\Sanity

https://gerrit.wikimedia.org/r/283353

Change 283352 had a related patch set uploaded (by EBernhardson):
Minor static analysis cleanups

https://gerrit.wikimedia.org/r/283352

Change 283354 had a related patch set uploaded (by EBernhardson):
Cleanup annotations and signatures in CirrusSearch\BuildDocument

https://gerrit.wikimedia.org/r/283354

Change 283355 had a related patch set uploaded (by EBernhardson):
Cleanup annotations and signatures in CirrusSearch\LanguageDetect

https://gerrit.wikimedia.org/r/283355

Change 283356 had a related patch set uploaded (by EBernhardson):
Remove call to nonexistent method

https://gerrit.wikimedia.org/r/283356

Change 283357 had a related patch set uploaded (by EBernhardson):
Make static analysis happy by forcing to string

https://gerrit.wikimedia.org/r/283357

Change 283358 had a related patch set uploaded (by EBernhardson):
Add missing properties and methods to updateSuggesterIndex

https://gerrit.wikimedia.org/r/283358

Change 283465 had a related patch set uploaded (by EBernhardson):
search: getInterwikiResults returns array of SearchResultSets

https://gerrit.wikimedia.org/r/283465

Change 283350 merged by jenkins-bot:
Replace deprecated ConfigFactory::getDefaultInstance()

https://gerrit.wikimedia.org/r/283350

Change 283556 had a related patch set uploaded (by EBernhardson):
Add/update a variety of annotations to be correct

https://gerrit.wikimedia.org/r/283556

Change 283557 had a related patch set uploaded (by EBernhardson):
Standardize on catching/passing Elasticas ExceptionInterface

https://gerrit.wikimedia.org/r/283557

Change 283558 had a related patch set uploaded (by EBernhardson):
Annotate SearchResult and related classes

https://gerrit.wikimedia.org/r/283558

Change 283559 had a related patch set uploaded (by EBernhardson):
Fix missing variable in RescoreBuilder

https://gerrit.wikimedia.org/r/283559

Change 283560 had a related patch set uploaded (by EBernhardson):
Add script to run etsy/phan from in vagrant

https://gerrit.wikimedia.org/r/283560

Change 283561 had a related patch set uploaded (by EBernhardson):
Only call getData() if the right type of Action is used

https://gerrit.wikimedia.org/r/283561

Change 283562 had a related patch set uploaded (by EBernhardson):
Make sure the Config instance really has a getElement method

https://gerrit.wikimedia.org/r/283562

Change 283352 merged by jenkins-bot:
Minor static analysis cleanups

https://gerrit.wikimedia.org/r/283352

Change 283353 merged by jenkins-bot:
Cleanup annotations/signatures in CirrusSearch\\Sanity

https://gerrit.wikimedia.org/r/283353

Change 283578 had a related patch set uploaded (by EBernhardson):
Add more type annotations to CirrusSearch\Search namespace

https://gerrit.wikimedia.org/r/283578

Change 283579 had a related patch set uploaded (by EBernhardson):
Add more type annotations to CirrusSearch\BuildDocument namespace

https://gerrit.wikimedia.org/r/283579

Change 283580 had a related patch set uploaded (by EBernhardson):
Add annotations to Api, Elastica, and Extra sub-namespaces

https://gerrit.wikimedia.org/r/283580

Change 283581 had a related patch set uploaded (by EBernhardson):
Very minor cleanups to CirrusSearch\Job namespace

https://gerrit.wikimedia.org/r/283581

Change 283582 had a related patch set uploaded (by EBernhardson):
Trivial whitespace changes to Elastica\LanguageDetector

https://gerrit.wikimedia.org/r/283582

Change 283583 had a related patch set uploaded (by EBernhardson):
Expand annotations in Elasticsearch\Maintenance namespace

https://gerrit.wikimedia.org/r/283583

Change 283354 merged by jenkins-bot:
Cleanup annotations and signatures in CirrusSearch\BuildDocument

https://gerrit.wikimedia.org/r/283354

Change 283355 merged by jenkins-bot:
Cleanup annotations and signatures in CirrusSearch\LanguageDetect

https://gerrit.wikimedia.org/r/283355

Change 283356 merged by jenkins-bot:
Implement missing setMaxNgramsExtracted method

https://gerrit.wikimedia.org/r/283356

Change 283357 merged by jenkins-bot:
Make static analysis happy by forcing to string

https://gerrit.wikimedia.org/r/283357

Change 283582 merged by jenkins-bot:
Trivial whitespace changes to Elastica\LanguageDetector

https://gerrit.wikimedia.org/r/283582

Change 283581 merged by jenkins-bot:
Very minor cleanups to CirrusSearch\Job namespace

https://gerrit.wikimedia.org/r/283581

Change 283465 merged by jenkins-bot:
search: getInterwikiResults returns array of SearchResultSets

https://gerrit.wikimedia.org/r/283465

Change 283562 merged by jenkins-bot:
Make sure the Config instance really has a getElement method

https://gerrit.wikimedia.org/r/283562

Change 283583 merged by jenkins-bot:
Expand annotations in Elasticsearch\Maintenance namespace

https://gerrit.wikimedia.org/r/283583

Change 283558 merged by jenkins-bot:
Annotate SearchResult and related classes

https://gerrit.wikimedia.org/r/283558

Change 283578 merged by jenkins-bot:
Add more type annotations to CirrusSearch\Search namespace

https://gerrit.wikimedia.org/r/283578

Change 283561 merged by jenkins-bot:
Only call getData() if the right type of Action is used

https://gerrit.wikimedia.org/r/283561

Change 283358 merged by jenkins-bot:
Add missing properties and methods to maint classes

https://gerrit.wikimedia.org/r/283358

Change 284260 had a related patch set uploaded (by EBernhardson):
Apply more annotations/type signature updates

https://gerrit.wikimedia.org/r/284260

Change 284238 had a related patch set uploaded (by EBernhardson):
More PhpDoc cleanups

https://gerrit.wikimedia.org/r/284238

Change 284261 had a related patch set uploaded (by EBernhardson):
Drop unused method indexToIndexTypes

https://gerrit.wikimedia.org/r/284261

Change 284216 had a related patch set uploaded (by EBernhardson):
Fix a few minor analysis issues in test cases

https://gerrit.wikimedia.org/r/284216

Change 284211 had a related patch set uploaded (by EBernhardson):
Remove unused method

https://gerrit.wikimedia.org/r/284211

Change 284208 had a related patch set uploaded (by EBernhardson):
Add some missing @return annotations

https://gerrit.wikimedia.org/r/284208

Change 284209 had a related patch set uploaded (by EBernhardson):
Remove some unused use statements

https://gerrit.wikimedia.org/r/284209

Change 284210 had a related patch set uploaded (by EBernhardson):
Remove unused variables

https://gerrit.wikimedia.org/r/284210

Change 284212 had a related patch set uploaded (by EBernhardson):
Cleanup some potentially undefined variables

https://gerrit.wikimedia.org/r/284212

Change 283563 had a related patch set uploaded (by EBernhardson):
Add @suppress annotations for unfixable static analysis

https://gerrit.wikimedia.org/r/283563

Change 284345 had a related patch set uploaded (by EBernhardson):
Spelling corrections

https://gerrit.wikimedia.org/r/284345

Change 284362 had a related patch set uploaded (by EBernhardson):
Standardize namespace/use syntax and spacing

https://gerrit.wikimedia.org/r/284362

Change 284261 merged by jenkins-bot:
Drop unused method indexToIndexTypes

https://gerrit.wikimedia.org/r/284261

Change 284345 merged by jenkins-bot:
Spelling corrections

https://gerrit.wikimedia.org/r/284345

Change 284211 merged by jenkins-bot:
Remove unused method

https://gerrit.wikimedia.org/r/284211

Deskana removed a project: Discovery-Search.

Change 284212 merged by jenkins-bot:
Use the correct $exception variable instead of $e

https://gerrit.wikimedia.org/r/284212

Change 284216 merged by jenkins-bot:
Fix a few minor analysis issues in test cases

https://gerrit.wikimedia.org/r/284216

Change 284209 merged by jenkins-bot:
Remove some unused use statements

https://gerrit.wikimedia.org/r/284209

Change 284208 merged by jenkins-bot:
Add some missing @return annotations

https://gerrit.wikimedia.org/r/284208

Change 283557 merged by jenkins-bot:
Standardize on catching/passing Elasticas ExceptionInterface

https://gerrit.wikimedia.org/r/283557

Change 283579 merged by jenkins-bot:
Add more type annotations to CirrusSearch\BuildDocument namespace

https://gerrit.wikimedia.org/r/283579

Change 284210 merged by jenkins-bot:
Remove unused variables

https://gerrit.wikimedia.org/r/284210

Change 284362 merged by jenkins-bot:
Standardize namespace/use syntax and spacing

https://gerrit.wikimedia.org/r/284362

Change 283556 merged by jenkins-bot:
Add/update a variety of annotations to be correct

https://gerrit.wikimedia.org/r/283556

Change 283563 merged by jenkins-bot:
Add @suppress annotations for unfixable static analysis

https://gerrit.wikimedia.org/r/283563

Change 283560 merged by jenkins-bot:
Add script to run etsy/phan from in vagrant

https://gerrit.wikimedia.org/r/283560

Change 283580 merged by jenkins-bot:
Add annotations to Api, Elastica, and Extra sub-namespaces

https://gerrit.wikimedia.org/r/283580

Change 284837 had a related patch set uploaded (by EBernhardson):
Replace deprecated ConfigFactory::getDefaultInstance()

https://gerrit.wikimedia.org/r/284837

Change 284837 abandoned by EBernhardson:
Replace deprecated ConfigFactory::getDefaultInstance()

https://gerrit.wikimedia.org/r/284837

Change 284238 merged by jenkins-bot:
More PhpDoc cleanups

https://gerrit.wikimedia.org/r/284238

Change 284260 merged by jenkins-bot:
Apply more annotations/type signature updates

https://gerrit.wikimedia.org/r/284260

Change 283559 merged by jenkins-bot:
Fix missing variable in RescoreBuilder

https://gerrit.wikimedia.org/r/283559

Deskana subscribed.

I'll take your word for it. ;-)