BoilWP / Boilerplate-Generator

A simple form that replaces strings with the information you fill in to generate your copy of either boilerplates I have created. Once the form has been filled, press "Generate" to download a ready prepared plugin for you to start developing.
GNU General Public License v2.0
1 stars 1 forks source link

Remove @todo comments #1

Open seb86 opened 9 years ago

seb86 commented 9 years ago

There are many comments through out the boilerplate. Some are not one liners.

seb86 commented 9 years ago

It works but it only removes the first line if it is spaced onto more than one line. Also it leaves a blank line in place. Would be good if we can close the gap on that.

soulseekah commented 9 years ago

See b0cd04266a889910e37f33e474f37881b7ead902 might help.

seb86 commented 9 years ago

Blank lines are now gone. Will have to improve areas where @todo is on more than one line within the boilerplate plugin for it to take full effect.

soulseekah commented 9 years ago

Examples?

seb86 commented 9 years ago

What if I put something at the end of the @todo comments that have more than one line.

Example

@todo Remove both lines of this comment.
      This second line is part of the first line. #

Would that help?

soulseekah commented 9 years ago

That would work, but I'd suggest this instead:

@todo Remove both lines of this comment.
@todo This second line is part of the first line.
seb86 commented 9 years ago

In the uninstall.php file there are @todo's that are like so.

/*
 * @todo Place your own uninstall code here.
 */

The generator returns those areas like this.

/*
 */
seb86 commented 9 years ago

Example of a @todo that has more than one line.

/**
 * The WordPress.org Plugin URI.
 *
 * @todo    Replace 'your-plugin-name' with the name of the
 *          plugin slug given for your wordpress repository

As you can see the line is broken in two to prevent the developer to use soft wrap or word wrap in their editor to read it.

You are suggesting to do it like so.

/**
 * The WordPress.org Plugin URI.
 *
 * @todo    Replace 'your-plugin-name' with the name of the
 * @todo    plugin slug given for your wordpress repository

This does not look right and I'm not sure if this complies with phpDoc

So I can either change those with more than one line like so.

/**
 * The WordPress.org Plugin URI.
 *
 * @todo    Replace 'your-plugin-name' with the name of the #
 *          plugin slug given for your wordpress repository #end

Or simple put them all on one line.

/**
 * The WordPress.org Plugin URI.
 *
 * @todo    Replace 'your-plugin-name' with the name of the plugin slug given for your wordpress repository

What do you think?

seb86 commented 9 years ago

Oh and since you did the white space cleanup. Everything is now close together. There is no line spacing anywhere between functions and variables.

soulseekah commented 9 years ago

Single linespaces should have been left alone. What editor are you using and which file are you viewing?

seb86 commented 9 years ago

I'm currently using Atom and this has been applied to many, maybe even all.