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

Issue 29443587: Noissue - Do not add subdomain wildcard if subdomain excluded (Closed)

Created:
May 20, 2017, 11:50 p.m. by Manish Jethani
Modified:
May 24, 2017, 12:06 p.m.
Reviewers:
Sebastian Noack, kzar
Base URL:
https://hg.adblockplus.org/abp2blocklist
Visibility:
Public.

Description

Noissue - Do not add subdomain wildcard if subdomain excluded For a filter like this: foo$domain=bar.com|~de.bar.com We should generate a rule like this: [ { "trigger": { "url-filter": "^https?://.*foo", "resource-type": [ ... ], "if-domain": [ "bar.com" ] }, ... } ] i.e. no subdomain wildcard, because at least one subdomain has been excluded.

Patch Set 1 #

Patch Set 2 : Add "www" prefix #

Total comments: 9

Patch Set 3 : Add unit tests #

Patch Set 4 : Use includes #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -1 line) Patch
M lib/abp2blocklist.js View 1 2 3 2 chunks +40 lines, -1 line 0 comments Download
M test/abp2blocklist.js View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 15
Manish Jethani
May 20, 2017, 11:51 p.m. (2017-05-20 23:51:01 UTC) #1
Manish Jethani
Patch Set 1
May 20, 2017, 11:54 p.m. (2017-05-20 23:54:22 UTC) #2
Manish Jethani
Maybe we should add the "www." In this case.
May 21, 2017, 12:34 a.m. (2017-05-21 00:34:23 UTC) #3
kzar
On 2017/05/21 00:34:23, Manish Jethani wrote: > Maybe we should add the "www." In this ...
May 21, 2017, 11:19 a.m. (2017-05-21 11:19:22 UTC) #4
Manish Jethani
Patch Set 2: Add "www" prefix
May 21, 2017, 5:40 p.m. (2017-05-21 17:40:43 UTC) #5
Sebastian Noack
What's about tests for this scenario? https://codereview.adblockplus.org/29443587/diff/29444555/lib/abp2blocklist.js File lib/abp2blocklist.js (right): https://codereview.adblockplus.org/29443587/diff/29444555/lib/abp2blocklist.js#newcode293 lib/abp2blocklist.js:293: if ((filter instanceof ...
May 21, 2017, 8:56 p.m. (2017-05-21 20:56:13 UTC) #6
Manish Jethani
Patch Set 3: Add unit tests https://codereview.adblockplus.org/29443587/diff/29444555/lib/abp2blocklist.js File lib/abp2blocklist.js (right): https://codereview.adblockplus.org/29443587/diff/29444555/lib/abp2blocklist.js#newcode293 lib/abp2blocklist.js:293: if ((filter instanceof ...
May 21, 2017, 9:49 p.m. (2017-05-21 21:49:05 UTC) #7
Sebastian Noack
https://codereview.adblockplus.org/29443587/diff/29444555/lib/abp2blocklist.js File lib/abp2blocklist.js (right): https://codereview.adblockplus.org/29443587/diff/29444555/lib/abp2blocklist.js#newcode293 lib/abp2blocklist.js:293: if ((filter instanceof filterClasses.BlockingFilter || On 2017/05/21 21:49:05, Manish ...
May 22, 2017, 8:06 a.m. (2017-05-22 08:06:11 UTC) #8
Manish Jethani
https://codereview.adblockplus.org/29443587/diff/29444555/lib/abp2blocklist.js File lib/abp2blocklist.js (right): https://codereview.adblockplus.org/29443587/diff/29444555/lib/abp2blocklist.js#newcode300 lib/abp2blocklist.js:300: if (!notSubdomains.some(name => name == "www")) On 2017/05/22 08:06:11, ...
May 22, 2017, 10:37 a.m. (2017-05-22 10:37:39 UTC) #9
Sebastian Noack
https://codereview.adblockplus.org/29443587/diff/29444555/lib/abp2blocklist.js File lib/abp2blocklist.js (right): https://codereview.adblockplus.org/29443587/diff/29444555/lib/abp2blocklist.js#newcode300 lib/abp2blocklist.js:300: if (!notSubdomains.some(name => name == "www")) On 2017/05/22 10:37:39, ...
May 22, 2017, 11:09 a.m. (2017-05-22 11:09:00 UTC) #10
Manish Jethani
Patch Set 4: Use includes https://codereview.adblockplus.org/29443587/diff/29444555/lib/abp2blocklist.js File lib/abp2blocklist.js (right): https://codereview.adblockplus.org/29443587/diff/29444555/lib/abp2blocklist.js#newcode300 lib/abp2blocklist.js:300: if (!notSubdomains.some(name => name ...
May 22, 2017, 4:07 p.m. (2017-05-22 16:07:08 UTC) #11
Sebastian Noack
LGTM
May 22, 2017, 7:14 p.m. (2017-05-22 19:14:17 UTC) #12
kzar
LGTM
May 23, 2017, 11:38 a.m. (2017-05-23 11:38:42 UTC) #13
Manish Jethani
Patch Set 5: Rebase (Is it normal to resubmit for review after a LGTM+rebase even ...
May 23, 2017, 5:05 p.m. (2017-05-23 17:05:51 UTC) #14
Sebastian Noack
May 23, 2017, 5:16 p.m. (2017-05-23 17:16:36 UTC) #15
On 2017/05/23 17:05:51, Manish Jethani wrote:
> Patch Set 5: Rebase
> 
> (Is it normal to resubmit for review after a LGTM+rebase even if there are no
> conflicts during the merge?)

I don't think we always do it if there are no conflicts. But it's actually
possible that an automatic merge breaks something. So at least make sure to test
your changes after merges. Perhaps, we should also always re-review in this
case, but I guess this would have to be discussed somewhere else.

Still LGTM.

Powered by Google App Engine
This is Rietveld