Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't print trailing spaces on empty DocBlock lines #1669

Open
kohenkatz opened this issue Feb 4, 2025 · 0 comments
Open

Don't print trailing spaces on empty DocBlock lines #1669

kohenkatz opened this issue Feb 4, 2025 · 0 comments

Comments

@kohenkatz
Copy link

Summary

The ide-helper:models command modifies the DocBlock of the models in the application.

It looks like this happens by reading the entire comment and rebuilding it, which makes sense.

The problem is that this process adds extra space to blank lines in the comment.

Example:

/**
 * This model does something interesting.
 *
 * It is an example of a model with lots of documentation
 */
class MyModel extends Model
{}

After the ide-helper:models command is run (here using -M to simplify the output), the following is produced:

/**
 * This model does something interesting.
 * <-- THIS LINE HAS EXTRA TRAILING SPACE
 * It is an example of a model with lots of documentation
 *
 * @mixin IdeHelperMyModel
 */
class MyModel extends Model
{}

This requires a second step (manual or automated) of removing all these trailing spaces again.

Would it be possible for this tool to not write those spaces in the first place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant