Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29737568: Issue 4580 - Removed ext.webRequest.onBeforeRequest (Closed)

Created:
March 30, 2018, 11:18 p.m. by Sebastian Noack
Modified:
April 9, 2018, 2:53 p.m.
Reviewers:
kzar
CC:
Manish Jethani
Visibility:
Public.

Description

Issue 4580 - Removed ext.webRequest.onBeforeRequest

Patch Set 1 #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -66 lines) Patch
M ext/background.js View 2 chunks +0 lines, -54 lines 0 comments Download
M lib/requestBlocker.js View 2 chunks +47 lines, -12 lines 7 comments Download

Messages

Total messages: 5
Sebastian Noack
March 30, 2018, 11:20 p.m. (2018-03-30 23:20:08 UTC) #1
kzar
Otherwise seems like a nice change and LGTM https://codereview.adblockplus.org/29737568/diff/29737569/lib/requestBlocker.js File lib/requestBlocker.js (right): https://codereview.adblockplus.org/29737568/diff/29737569/lib/requestBlocker.js#newcode107 lib/requestBlocker.js:107: return; ...
April 5, 2018, 11:26 a.m. (2018-04-05 11:26:27 UTC) #2
Sebastian Noack
https://codereview.adblockplus.org/29737568/diff/29737569/lib/requestBlocker.js File lib/requestBlocker.js (right): https://codereview.adblockplus.org/29737568/diff/29737569/lib/requestBlocker.js#newcode107 lib/requestBlocker.js:107: return; On 2018/04/05 11:26:26, kzar wrote: > Please could ...
April 5, 2018, 4:04 p.m. (2018-04-05 16:04:09 UTC) #3
Manish Jethani
https://codereview.adblockplus.org/29737568/diff/29737569/lib/requestBlocker.js File lib/requestBlocker.js (right): https://codereview.adblockplus.org/29737568/diff/29737569/lib/requestBlocker.js#newcode116 lib/requestBlocker.js:116: return; On 2018/04/05 16:04:09, Sebastian Noack wrote: > On ...
April 6, 2018, 2:12 p.m. (2018-04-06 14:12:48 UTC) #4
kzar
April 9, 2018, 2:53 p.m. (2018-04-09 14:53:25 UTC) #5
Message was sent while issue was closed.
On 2018/04/06 14:12:48, Manish Jethani wrote:
>
https://codereview.adblockplus.org/29737568/diff/29737569/lib/requestBlocker.js
> File lib/requestBlocker.js (right):
> 
>
https://codereview.adblockplus.org/29737568/diff/29737569/lib/requestBlocker....
> lib/requestBlocker.js:116: return;
> On 2018/04/05 16:04:09, Sebastian Noack wrote:
> > On 2018/04/05 11:26:26, kzar wrote:
> > > Please can you add the braces back, since the rule is if the condition or
> the
> > > body spans multiple lines you have to add them.
> > 
> > Since when is this the rule? [...]
> 
> As far back as I can remember (which is not too far since I've been around for
> only a year), Dave has always insisted on this, and I have made it a point to
do
> it. To be fair a lot of the rules don't make sense, our style guide needs an
> upgrade at some point.
> 
> For what it's worth, when there's an else block, I also add the braces around
> the else block now to "balance it out".
> 
> e.g.
> 
>   if (foo ||
>       bar)
>   {
>     doSomething();
>   }
>   else
>   {
>     doSomethingElse();
>   }
> 
> If the condition fit on one line then I would drop the braces from both
blocks.
> 
> Anyway, my two cents. I'm not a big fan of these rules myself.

Well I discussed this with Sebastian in IRC, I was just trying to be consistent
with what I've been told. IIRC Wladimir's logic was that sometimes multiple line
clauses followed by a one line body can be easy to misread at a glance, so even
though the braces make things a little uglier it makes mistakes less likely.

That said I don't have the time (or energy TBH) to go back through my old emails
to back this up. Since you guys disagree with the rule I'll just stop mentioning
this in codereviews, if someone wants to make a second push for getting
everybody to agree on the rules for braces + updating the ESLint configuration
then be my guest! I'd warn you that it's quite demotivating however!

Powered by Google App Engine
This is Rietveld