Review main Merged

54790[TASK] Script to check doc comments for invalid annotations

Alexander Schnitzler CR +2 V +2 Normal +175 −0 updated 12/14/17, 20:20

Commit message

To prevent the introduction of further invalid
php doc annotations a build script should scan
all php files and report the usage of invalid
annotations.

Review

  • Code review CR +2
    • Christian Kuhn +2
  • Verified V +2
    • Christian Kuhn +2
    • TYPO3com +1 CI

Issues 1

Files 4

Review log 3142

Show 1117 earlier messages
  1. Alexander Schnitzler uploaded patch set 1 11/27/17, 13:18

  2. TYPO3com voted on patch set 1 V -1 11/27/17, 13:19 Completed build in 52s on Mon, 27 Nov, 02:19 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-16664

  3. Alexander Schnitzler uploaded patch set 2 11/27/17, 13:21

  4. TYPO3com voted on patch set 2 V +1 11/27/17, 13:33 Completed build in 11m 57s on Mon, 27 Nov, 02:33 PM Test Summary: 56802 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-16666

  5. Jörg Bösche voted on patch set 2 CR +1 11/28/17, 06:23

  6. Jörg Bösche uploaded patch set 3 12/04/17, 11:00

  7. TYPO3com voted on patch set 3 V -1 12/04/17, 11:05 Completed build in 05m 44s on Mon, 4 Dec, 12:05 PM Test Summary: 39204 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-TL-1880

  8. TYPO3com voted on patch set 3 V +1 12/04/17, 11:11 Completed build in 11m 04s on Mon, 4 Dec, 12:11 PM Test Summary: 57084 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17190

  9. Susi Moog commented on patch set 3 CR -1 12/09/17, 21:23

    We should add the bamboo config with the script at the same time I guess (see Build/bamboo/src/main/java/core/PreMergeSpec.java) What do you think?
  10. Stefan Neufeind uploaded patch set 4 12/11/17, 03:44

  11. Stefan Neufeind commented on patch set 4 V +1 CR +1 12/11/17, 03:46

    The annotations-checker is fine for me (and complains about some parts in the TYPO3 core). Can somebody please verify the bamboo-code works as expected? Is there a cleaner way to call PHP here than hardcoding it's path?
  12. Stefan Neufeind uploaded patch set 5 12/11/17, 03:48

  13. TYPO3com voted on patch set 4 V +1 12/11/17, 04:00 Completed build in 15m 50s on Mon, 11 Dec, 05:00 AM Test Summary: 57075 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17540

  14. TYPO3com voted on patch set 5 V +1 12/11/17, 04:00 Completed build in 11m 56s on Mon, 11 Dec, 05:00 AM Test Summary: 57075 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17541

  15. Stefan Neufeind voted on patch set 5 V +1 CR +1 12/11/17, 04:10

  16. Stefan Neufeind commented on patch set 5 12/11/17, 04:14

    The bamboo-jobs here didn't yet execute the new code. But I expect that's correct. Somebody please verify the bamboo-part works as expected. Before/shortly after enabling the additional check we'll need to take care of the complains about core-annotations :-)
  17. Stefan Neufeind commented on patch set 5 V 0 CR 0 12/11/17, 04:19

    @Alex: How about the complaints of the script against current code-code? Do we need code-adjustments there first or might we need to add further negativeLookaheadMatches?
  1. Stefan Neufeind commented on patch set 5 12/11/17, 10:10

    Anja explained that for the bamboo-change to take effect it will afterwards need to be deployed
  2. Stefan Neufeind uploaded patch set 6 12/11/17, 10:27

  3. Stefan Neufeind commented on patch set 6 V +1 CR +1 12/11/17, 10:28

    Added further whitelist-elements. Checks for core are clean now. (Thanks Alex.) !!! checking changes to PreMergeSpec.java (bamboo) still open.
  4. TYPO3com voted on patch set 6 V +1 12/11/17, 10:38 Completed build in 10m 20s on Mon, 11 Dec, 11:38 AM Test Summary: 57075 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17568

  5. Christian Kuhn commented on patch set 6 12/11/17, 18:17

    annotationChecker.php:55

    the plan is to reduce this list over time and drop eg 'Inject' as soon as core is clean here?

    annotationChecker.php:89

    I would prefer to just run this to ../../typo3/ and skip the excludes instead: This is a core test script for core only.
  6. Alexander Schnitzler commented on patch set 6 12/12/17, 14:06

    annotationChecker.php:55 Reply

    If we agree to always use aliased Annotations, we can reduce the list even now to "Extbase\\\\Foo", "Extbase\\Bar". And once we removed all old annotations we can reduce the list even further. So, yes.

    annotationChecker.php:89 Reply

    I am fine with that.
  7. Stefan Neufeind commented on patch set 6 CR -1 12/12/17, 14:10

    annotationChecker.php:55 Reply

    So we're fine for now and will reduce the list later, right?

    annotationChecker.php:89 Reply

    I'll take care.
  8. Stefan Neufeind uploaded patch set 7 12/12/17, 14:17

  9. Stefan Neufeind commented on patch set 7 12/12/17, 14:19

    restricted the find to the typo3-directory only; shortened the list of annotation-exceptions to the ones we currently use in core (or potentially might, like phpdoc-tags). Some deprecated ones which we don't have in core anymore as well as PEAR etc. are removed now
  10. TYPO3com voted on patch set 7 V +1 12/12/17, 14:27 Completed build in 09m 17s on Tue, 12 Dec, 03:27 PM Test Summary: 29979 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17663

  11. Christian Kuhn commented on patch set 7 12/12/17, 15:01

    i would shift that patch to "after 9.0" if that is ok. we don't have urgent pressure here.
  12. Christian Kuhn commented on patch set 7 CR -1 12/14/17, 18:51

    on it. i'll play and test around with that a bit.

    PreMergeSpec.java:83

    should be added to nightly, too, so the method should go to the abstract class.
  13. Christian Kuhn uploaded patch set 8 12/14/17, 19:37

  14. Christian Kuhn commented on patch set 8 CR -1 12/14/17, 19:41

    Now running on bamboo through 'testbed-lolli' which has the new plan specs with the annotation checker script active. patch set 8 should go green.
  15. TYPO3com voted on patch set 8 V +1 12/14/17, 19:45 Completed build in 07m 50s on Thu, 14 Dec, 08:45 PM Test Summary: 29975 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17746

  16. Christian Kuhn uploaded patch set 9 12/14/17, 19:55

  17. Christian Kuhn commented on patch set 9 12/14/17, 19:55

    set 9 should go red on testbed lolli (i removed @inject from allowed list).
  18. TYPO3com voted on patch set 9 V +1 12/14/17, 20:01 Completed build in 06m 07s on Thu, 14 Dec, 09:01 PM Test Summary: 29975 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17750

  19. Christian Kuhn commented on patch set 9 12/14/17, 20:07

    as expected: green with set 8, red with set 9. all fine. will roll out to pre-merge master & nightly. https://bamboo.typo3.com/browse/CORE-TL-1889 https://bamboo.typo3.com/browse/CORE-TL-1890
  20. Christian Kuhn voted on patch set 9 CR -1 12/14/17, 20:07

  21. Christian Kuhn uploaded patch set 10 12/14/17, 20:10

  22. Christian Kuhn commented on patch set 10 12/14/17, 20:11

    set 10 now running bamboo master pre-merge with this job enabled.
  23. TYPO3com voted on patch set 10 V +1 12/14/17, 20:19 Completed build in 08m 45s on Thu, 14 Dec, 09:19 PM Test Summary: 29975 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-17751

  24. Christian Kuhn voted on patch set 10 V +2 CR +2 12/14/17, 20:20

  25. Christian Kuhn merged patch set 11 12/14/17, 20:20