djoos / Symfony-coding-standard

Development repository for the Symfony coding standard
MIT License
401 stars 102 forks source link

Error that halts checking #187

Open noldona opened 3 years ago

noldona commented 3 years ago

When trying to use the coding standard, I am getting this error that halts the linting.

  1 | ERROR   | An error occurred during processing; checking has been aborted. The error message was: Undefined index: return_type_token in
    |         | /home/rjones/.config/composer/vendor/escapestudios/symfony2-coding-standard/Symfony/Sniffs/Functions/ReturnTypeSniff.php on line 62
    |         | (Internal.Exception)

Excluding the rule allows the linting to continue. It is probably related to the fact that the code I am trying to lint is a 20 year old legacy application that was not coded to any standards. Specifically, most functions do not actually have a return type declared.

mmoll commented 3 years ago

Without a code snippet that reproduces the crash, it's going to be impossible to investigate further.