moose / Perl-Critic-Moose

Policies for Perl::Critic concerned with using Moose
http://metacpan.org/release/Perl-Critic-Moose/
Other
0 stars 2 forks source link

Ignore use statements that import nothing #2

Closed Zhtwn closed 9 years ago

Zhtwn commented 9 years ago

Update RequireCleanNamespace to not require a cleaner if nothing was imported. Allows "use Moose ();", as recommended by Moose::Exporter.

I think this is the simplest way to do it -- I'm ignoring all "use" statements that have an empty list, whether or not the module is in the modules-to-be-unimported list.

Zhtwn commented 9 years ago

May be pedantic, but I think it reads better, too. Lemme redo...

Zhtwn commented 9 years ago

Okay, redone with Karen's cleaner logic.

Zhtwn commented 9 years ago

Ugh. Silly me didn't realize a forced push would invalidate the pull req. I was trying to keep the log clean by amending the commit rather than adding another one.

Guess I have to do it in a separate branch and pull request now?

karenetheridge commented 9 years ago

A force push should be fine. what are you seeing?

Zhtwn commented 9 years ago

I did the force push to the branch, then tried the Reopen and comment button on the PR, and it told me that the branch had been forced, and did not reopen it.

Now, when I hover over the Reopen and comment button it says, "The handle-noimport branch was force-pushed or recreated", and the button is disabled.

Ah, maybe I just needed another PR without another branch?

karenetheridge commented 9 years ago

then tried the Reopen

ah, did you close the PR manually? that's probably why.

If you just force-push to the branch used in an open PR, it will update itself (you may have to reload the page if you have the PR open in your browser). I've not tried to reopen a closed PR; it sounds plausible that it cannot be reopened.

Zhtwn commented 9 years ago

Yup, that's probably it. Thanks -- I thought I was being careful by closing the PR, but was just shooting myself in the foot. ;-/

karenetheridge commented 9 years ago

No worries - github does a lot of goofy things :)