Formatter removes a new line after a class closing brace on save, and I can't find an option to disable this behavior. So my phpcs with Drupal code style always warn about this:

FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------
 32 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY

How can I fix this?

    Hi Murz,

    Thank you for letting us know. We do this by default, we are going to add an option to alter this behavior.

    Thank you!

      Hi Murz,

      We've found out, this behavior can be modified directly in VS Code:

      In the Settings | Text Editor | Files, there is an option Insert Final Newline

      That should do it.

      Thank you!

        Ok, Not solved actually. Formatter tries to always remove it even when VS Code adds it.

        Will be fixed.

        Thanks!

          Hi Murz,

          Fixed in the pre-release. Should be available to try within one hour.

          Thanks!

          Thank you for such quick fixing!

            Write a Reply...