You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any file that is modified with the pre-processor is completely and badly reformatted.
What is the expected behavior?
Only code related to the SDK should be changed. Formatting of all code in the file should not be completely changed and reformatted to have things like double spaces and spaces before semi-colons.
to this (all line breaks removed, random spaces added, extra line break at top of file):
<?php/** * Plugin Name: ... */defined( 'ABSPATH' ) or die;
constPLUGIN_VERSION = '1.0.0' ; // <-- two extra spaces added hererequire_once__DIR__ . '/includes.php';
Plugin::run();
$test = 456;
It looks much worse when you have a lot more code. And the same happens with classes, e.g. no line break between use and class, properties and methods, etc.
This really negatively impacts the overall quality of the plugin's code. It's difficult to read and looks like the developer didn't give a damn writing it. I really hope this can be looked into at some point. I certainly will not be releasing code that looks like this.
The text was updated successfully, but these errors were encountered:
The PHP Parser library that we currently use doesn't yet have a stable format-preserving prettifier, that's why you see the code style changes (only) in files that require editing by the preprocessor. That said, they are working on that and we keep track of the changes. Once they'll have a stable version we'll update the preprocessor to work with that version.
🐞 bug report
Behavior:
Any file that is modified with the pre-processor is completely and badly reformatted.What is the issue? (*)
Only code related to the SDK should be changed. Formatting of all code in the file should not be completely changed and reformatted to have things like double spaces and spaces before semi-colons.What is the expected behavior?
For example, code goes from this:
to this (all line breaks removed, random spaces added, extra line break at top of file):
It looks much worse when you have a lot more code. And the same happens with classes, e.g. no line break between
use
andclass
,properties
andmethods
, etc.This really negatively impacts the overall quality of the plugin's code. It's difficult to read and looks like the developer didn't give a damn writing it. I really hope this can be looked into at some point. I certainly will not be releasing code that looks like this.
The text was updated successfully, but these errors were encountered: