From f12b4c458ea843fa2cf6c180701679167b94d45a Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Mon, 13 May 2019 11:28:44 +0000 Subject: [PATCH 01/14] mv discourse to first badge --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index 078994afe..63e5c06a0 100644 --- a/.github/README.md +++ b/.github/README.md @@ -2,8 +2,8 @@

FilterLists is the independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances.

-

License Discourse status +

License BuiltWithDot.Net shield Beerpay Beerpay

From 0150998481f160cac508dac9ca8a709413c10b6b Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Mon, 13 May 2019 11:29:08 +0000 Subject: [PATCH 02/14] fix badge alignment --- .github/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/README.md b/.github/README.md index 63e5c06a0..f75bf4e19 100644 --- a/.github/README.md +++ b/.github/README.md @@ -2,8 +2,8 @@

FilterLists is the independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances.

-Discourse status -

License +

Discourse status +License BuiltWithDot.Net shield Beerpay Beerpay

From 3e7db7467e7e3feb580576c66f758a6fa75f6e4f Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Mon, 13 May 2019 10:47:37 -0500 Subject: [PATCH 03/14] rm unused file --- .../FilterListsDesignTimeDbContextFactory.cs | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 src/FilterLists.Data/FilterListsDesignTimeDbContextFactory.cs diff --git a/src/FilterLists.Data/FilterListsDesignTimeDbContextFactory.cs b/src/FilterLists.Data/FilterListsDesignTimeDbContextFactory.cs deleted file mode 100644 index ee34cb2dd..000000000 --- a/src/FilterLists.Data/FilterListsDesignTimeDbContextFactory.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Design; - -namespace FilterLists.Data -{ - //TODO: [BLOCKED] pass connection string https://github.com/aspnet/EntityFrameworkCore/issues/8332 - //[UsedImplicitly] - //public class FilterListsDesignTimeDbContextFactory : IDesignTimeDbContextFactory - //{ - // private readonly int commandTimeoutSecs = (int)TimeSpan.FromMinutes(30).TotalSeconds; - - // /// - // /// increases command timeout for design time migrations - // /// - // public FilterListsDbContext CreateDbContext(string[] args) - // { - // var optionsBuilder = new DbContextOptionsBuilder(); - // optionsBuilder.UseMySql( - // @"", - // o => - // { - // o.MigrationsAssembly("FilterLists.Api"); - // o.CommandTimeout(commandTimeoutSecs); - // } - // ); - - // return new FilterListsDbContext(optionsBuilder.Options); - // } - //} -} \ No newline at end of file From 4dd5a2b5285d125ba0638b1014d07054f947f376 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Mon, 13 May 2019 11:09:00 -0500 Subject: [PATCH 04/14] speicfy Automapper assemblies explicitly to resolve obsolete warning --- .../Extensions/ConfigureServicesCollection.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FilterLists.Services/DependencyInjection/Extensions/ConfigureServicesCollection.cs b/src/FilterLists.Services/DependencyInjection/Extensions/ConfigureServicesCollection.cs index f5db60192..456e14753 100644 --- a/src/FilterLists.Services/DependencyInjection/Extensions/ConfigureServicesCollection.cs +++ b/src/FilterLists.Services/DependencyInjection/Extensions/ConfigureServicesCollection.cs @@ -35,7 +35,7 @@ public static void AddFilterListsApiServices(this IServiceCollection services, I services.TryAddScoped(); services.TryAddScoped(); services.TryAddScoped(); - services.AddAutoMapper(); + services.AddAutoMapper(typeof(Service)); } public static void AddFilterListsAgentServices(this IServiceCollection services, IConfiguration config) @@ -48,7 +48,7 @@ public static void AddFilterListsAgentServices(this IServiceCollection services, services.TryAddScoped(); services.TryAddScoped(); services.TryAddScoped(); - services.AddAutoMapper(); + services.AddAutoMapper(typeof(Service)); } } } \ No newline at end of file From ef2ebd776f64ada3c06f5ddd3e81dfc769d65c30 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Mon, 13 May 2019 11:18:34 -0500 Subject: [PATCH 05/14] expand data-specific Git README --- data/README.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/data/README.md b/data/README.md index 0a5263d62..21ff790fb 100644 --- a/data/README.md +++ b/data/README.md @@ -1,5 +1,29 @@ ## Adding or Updating Lists -To submit a new list or update data about an existing list, please submit a pull request to this directory in conjunction with the data model described [here](https://github.com/collinbarrett/FilterLists/wiki/Data-Model_sidebar). Alternatively, you can [open a new issue](https://github.com/collinbarrett/FilterLists/issues/new) providing information for all of the fields described in the [data model](https://github.com/collinbarrett/FilterLists/wiki/Data-Model_sidebar). +To submit a new list or update data about an existing list, please submit a pull request to [data](https://github.com/collinbarrett/FilterLists/tree/master/data) in conjunction with the data model described [here](https://github.com/collinbarrett/FilterLists/wiki/Data-Model_sidebar). Alternatively, you can [open a new issue](https://github.com/collinbarrett/FilterLists/issues/new) providing information for all of the fields described in the [data model](https://github.com/collinbarrett/FilterLists/wiki/Data-Model_sidebar). -*Note: We prefer not to re-use `Id`s. So, when submitting a PR, add any new lists, maintainers, etc. with the next incremental Id at the end of the list (rather than filling in a hole in the sequence that may have been left by a previously removed entity). +## Building and Running Locally + +We have containerized FilterLists to make it as easy as possible for contributers to get the project up and running locally. + +### Up and Running + +1. Install Docker CE for your computer's operating system. [Docs](https://docs.docker.com/install/) +2. Clone the FilterLists git repository to your computer. [Docs](https://help.github.com/en/articles/cloning-a-repository) +3. Navigate to the root directory of your locally cloned FilterLists git repository in a command-line interface. +4. Execute `docker-compose up`. +5. Visit the locally running version of FilterLists in a web browser at `http://localhost/`. + +### Testing changes to the data (.json files) + +#### Automated + +Execute: + +`docker-compose -f docker-compose.data.tests.yml down -v && docker-compose -f docker-compose.data.tests.yml build api && docker-compose -f docker-compose.data.tests.yml run api` + +#### Manual + +1. Execute `docker container ls` to find the `CONTAINER ID` of the `filterlists.api` container. +2. Execute `docker-compose up -d --build [CONTAINER ID]` replacing `[CONTAINER ID]` with the hash from step 1. +3. Verify your changes are properly reflected at `http://localhost/`. From 11c7c64b1a4f67058882272a2576983a3c5389a2 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Mon, 13 May 2019 11:28:48 -0500 Subject: [PATCH 06/14] cut out swagger for now, not working and hacky, will redo --- .../Extensions/ConfigureServicesCollection.cs | 37 +------------------ src/FilterLists.Api/FilterLists.Api.csproj | 1 - src/FilterLists.Api/Startup.cs | 26 ------------- .../V1/Controllers/BaseController.cs | 1 - src/FilterLists.Web/ClientApp/Layout.tsx | 4 +- 5 files changed, 3 insertions(+), 66 deletions(-) diff --git a/src/FilterLists.Api/DependencyInjection/Extensions/ConfigureServicesCollection.cs b/src/FilterLists.Api/DependencyInjection/Extensions/ConfigureServicesCollection.cs index 1388a2e83..c1caaa892 100644 --- a/src/FilterLists.Api/DependencyInjection/Extensions/ConfigureServicesCollection.cs +++ b/src/FilterLists.Api/DependencyInjection/Extensions/ConfigureServicesCollection.cs @@ -1,13 +1,9 @@ -using System; -using System.IO; -using Microsoft.ApplicationInsights.Extensibility.Implementation; +using Microsoft.ApplicationInsights.Extensibility.Implementation; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.PlatformAbstractions; using Newtonsoft.Json; -using Swashbuckle.AspNetCore.Swagger; namespace FilterLists.Api.DependencyInjection.Extensions { @@ -21,7 +17,6 @@ public static void AddFilterListsApi(this IServiceCollection services) services.AddMvcCustom(); services.AddRoutingCustom(); services.AddApiVersioning(); - services.AddSwaggerGenCustom(); TelemetryDebugWriter.IsTracingDisabled = true; } @@ -43,35 +38,5 @@ private static void AddMvcCustom(this IServiceCollection services) => private static void AddRoutingCustom(this IServiceCollection services) => services.AddRouting(opts => opts.LowercaseUrls = true); - - private static void AddSwaggerGenCustom(this IServiceCollection services) => - services.AddSwaggerGen(opts => - { - opts.SwaggerDoc("v1", - new Info - { - Title = "FilterLists API", - Version = "v1", - Description = - "An API for FilterLists, the independent, comprehensive directory of all public filter and hosts lists for advertisements, trackers, malware, and annoyances." + - Environment.NewLine + - "Home: https://filterlists.com" + - Environment.NewLine + - "Data Model Docs: https://github.com/collinbarrett/FilterLists/wiki/Data-Model_sidebar", - Contact = - new Contact - { - Url = "https://github.com/collinbarrett/FilterLists/", - Name = "FilterLists - GitHub" - }, - License = new License - { - Name = "MIT License", - Url = "https://github.com/collinbarrett/FilterLists/blob/master/LICENSE" - } - }); - opts.IncludeXmlComments(Path.Combine(PlatformServices.Default.Application.ApplicationBasePath, - "FilterLists.Api.xml")); - }); } } \ No newline at end of file diff --git a/src/FilterLists.Api/FilterLists.Api.csproj b/src/FilterLists.Api/FilterLists.Api.csproj index a9246a9e1..441c93bbb 100644 --- a/src/FilterLists.Api/FilterLists.Api.csproj +++ b/src/FilterLists.Api/FilterLists.Api.csproj @@ -35,7 +35,6 @@ - diff --git a/src/FilterLists.Api/Startup.cs b/src/FilterLists.Api/Startup.cs index 70fa9e78f..c6971ddcc 100644 --- a/src/FilterLists.Api/Startup.cs +++ b/src/FilterLists.Api/Startup.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.HttpOverrides; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using Swashbuckle.AspNetCore.Swagger; namespace FilterLists.Api { @@ -47,31 +46,6 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env) app.UseStaticFiles(); app.UseCookiePolicy(); app.UseMvc(); - app.UseSwagger(opts => - { - opts.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.Host = httpReq.Host.Value); - //TODO: remove preprocessor directives -#if RELEASE - opts.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.BasePath = "/api"); -#endif - opts.RouteTemplate = "docs/{documentName}/swagger.json"; - UseLowercaseControllerNameInSwaggerHack(opts); - }); - app.UseSwaggerUI(opts => - { - opts.SwaggerEndpoint("v1/swagger.json", "FilterLists API v1"); - opts.DocumentTitle = "FilterLists API v1"; - opts.RoutePrefix = "docs"; - }); } - - //TODO: remove hack (https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/74#issuecomment-386762178) - private static void UseLowercaseControllerNameInSwaggerHack(SwaggerOptions opts) => - opts.PreSerializeFilters.Add((document, request) => - { - var paths = document.Paths.ToDictionary(item => item.Key.ToLowerInvariant(), item => item.Value); - document.Paths.Clear(); - foreach (var pathItem in paths) document.Paths.Add(pathItem.Key, pathItem.Value); - }); } } \ No newline at end of file diff --git a/src/FilterLists.Api/V1/Controllers/BaseController.cs b/src/FilterLists.Api/V1/Controllers/BaseController.cs index 2bcceb414..6cce28d1b 100644 --- a/src/FilterLists.Api/V1/Controllers/BaseController.cs +++ b/src/FilterLists.Api/V1/Controllers/BaseController.cs @@ -8,7 +8,6 @@ namespace FilterLists.Api.V1.Controllers { [ApiVersion("1.0")] - //TODO: use versioning without needing to manually specify in swagger-ui (https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/370) [Route("v{version:apiVersion}/[controller]")] [ResponseCache(Duration = 86400)] public abstract class BaseController : Controller diff --git a/src/FilterLists.Web/ClientApp/Layout.tsx b/src/FilterLists.Web/ClientApp/Layout.tsx index c4516bb69..8024be1a7 100644 --- a/src/FilterLists.Web/ClientApp/Layout.tsx +++ b/src/FilterLists.Web/ClientApp/Layout.tsx @@ -45,8 +45,8 @@ const GitHubLink = () => ; const ApiLink = () => - + API ; From f3106b34408dfc188e45e83073cbe23fbda7fda5 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Mon, 13 May 2019 11:44:16 -0500 Subject: [PATCH 07/14] rm some unneeded services --- src/FilterLists.Api/Startup.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/FilterLists.Api/Startup.cs b/src/FilterLists.Api/Startup.cs index c6971ddcc..b51d4ee76 100644 --- a/src/FilterLists.Api/Startup.cs +++ b/src/FilterLists.Api/Startup.cs @@ -1,5 +1,4 @@ -using System.Linq; -using FilterLists.Api.DependencyInjection.Extensions; +using FilterLists.Api.DependencyInjection.Extensions; using FilterLists.Services.DependencyInjection.Extensions; using JetBrains.Annotations; using Microsoft.AspNetCore.Builder; @@ -29,22 +28,14 @@ public void ConfigureServices(IServiceCollection services) public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) - { app.UseDeveloperExceptionPage(); - } else - { app.UseExceptionHandler("/Error"); - app.UseHsts(); - } - app.UseForwardedHeaders(new ForwardedHeadersOptions { ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto }); - app.UseHttpsRedirection(); app.UseStaticFiles(); - app.UseCookiePolicy(); app.UseMvc(); } } From 6a50d413418e12553ec4a7065a959d0a3b8210c3 Mon Sep 17 00:00:00 2001 From: Imre Kristoffer Eilertsen Date: Tue, 14 May 2019 13:38:49 +0200 Subject: [PATCH 08/14] Mid-May pull 2 (#787) * Added 2 lists * Update FilterListTag.json * Hoping to make Peter Lowe's Little Snitch list subscribable * Update FilterListLanguage.json * Update FilterList.json --- data/FilterList.json | 27 ++++++++++++++++--- data/FilterListLanguage.json | 4 +++ data/FilterListTag.json | 12 +++++++++ .../linkButtons/SubscribeButton.tsx | 9 +++++++ 4 files changed, 49 insertions(+), 3 deletions(-) diff --git a/data/FilterList.json b/data/FilterList.json index 2c0416652..fa45f31a9 100644 --- a/data/FilterList.json +++ b/data/FilterList.json @@ -7095,15 +7095,15 @@ }, { "id": 670, - "description": "A version of the Norwegian filter list for Little Snitch. It currently doesn't see much work done on it, as the maintainer does not have a Mac to test it with.", + "description": "A version of the Nordic filter list for Little Snitch. It currently doesn't see much work done on it, as the maintainer does not have a Mac to test it with.", "donateUrl": "https://sproutsluckycorner.wordpress.com/2017/11/14/my-work-and-contact-resume/#donations", "emailAddress": "imreeil42@gmail.com", "homeUrl": "https://github.com/DandelionSprout/adfilt", "issuesUrl": "https://github.com/DandelionSprout/adfilt/issues", "licenseId": 10, - "name": "Dandelion Sprout's Norwegian Filters for Tidier Websites (Little Snitch)", + "name": "Dandelion Sprout's Nordic Filters for Tidier Websites (Little Snitch)", "syntaxId": 18, - "updatedDate": "2018-09-30T04:23:50", + "updatedDate": "2019-05-02T00:00:00", "viewUrl": "https://raw.githubusercontent.com/DandelionSprout/adfilt/master/NorwegianExperimentalList%20alternate%20versions/LittleSnitchNorwegianList.lsrules", "viewUrlMirror1": "https://repo.or.cz/FilterMirrorRepo.git/blob_plain/refs/heads/master:/NorwegianExperimentalList%20alternate%20versions/LittleSnitchNorwegianList.lsrules", "viewUrlMirror2": "https://gitlab.com/DandelionSprout/adfilt/raw/master/NorwegianExperimentalList%20alternate%20versions/LittleSnitchNorwegianList.lsrules" @@ -16946,5 +16946,26 @@ "viewUrl": "https://raw.githubusercontent.com/DandelionSprout/adfilt/master/Anti-'Custom%20cursors'%20List.txt", "viewUrlMirror1": "https://repo.or.cz/FilterMirrorRepo.git/blob_plain/refs/heads/master:/Anti-'Custom%20cursors'%20List.txt", "viewUrlMirror2": "https://gitlab.com/DandelionSprout/adfilt/raw/master/Anti-'Custom%20cursors'%20List.txt" + }, + { + "id": 1577, + "donateUrl": "https://opencollective.com/adnauseam", + "homeUrl": "https://github.com/dhowe/uAssets", + "issuesUrl": "https://github.com/dhowe/uAssets/issues", + "licenseId": 4, + "name": "AdNauseam Filters", + "syntaxId": 4, + "viewUrl": "https://raw.githubusercontent.com/dhowe/uAssets/master/filters/adnauseam.txt" + }, + { + "id": 1578, + "description": "This is a long list of domains accociated with facebook taken from https://github.com/jmdugan/blocklists", + "descriptionSourceUrl": "https://raw.githubusercontent.com/fabianmoronzirfas/block-facebook/master/block-facebook.lsrules", + "homeUrl": "https://github.com/fabianmoronzirfas/block-facebook", + "issuesUrl": "https://github.com/fabianmoronzirfas/block-facebook/issues", + "licenseId": 28, + "name": "Little Snitch Block Facebook Rule Set", + "syntaxId": 18, + "viewUrl": "https://raw.githubusercontent.com/fabianmoronzirfas/block-facebook/master/block-facebook.lsrules" } ] diff --git a/data/FilterListLanguage.json b/data/FilterListLanguage.json index 3b9dc5573..7e5cfb4a8 100644 --- a/data/FilterListLanguage.json +++ b/data/FilterListLanguage.json @@ -2126,5 +2126,9 @@ { "filterListId": 1242, "languageId": 167 + }, + { + "filterListId": 670, + "languageId": 106 } ] diff --git a/data/FilterListTag.json b/data/FilterListTag.json index 33cf010ec..2f8121a80 100644 --- a/data/FilterListTag.json +++ b/data/FilterListTag.json @@ -6722,5 +6722,17 @@ { "filterListId": 1576, "tagId": 27 + }, + { + "filterListId": 1577, + "tagId": 2 + }, + { + "filterListId": 1577, + "tagId": 10 + }, + { + "filterListId": 1578, + "tagId": 19 } ] diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/linkButtons/SubscribeButton.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/linkButtons/SubscribeButton.tsx index 15e0c462a..f7f3d4c1b 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/linkButtons/SubscribeButton.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/linkButtons/SubscribeButton.tsx @@ -28,16 +28,25 @@ if (props.url.indexOf(".tpl") > 0) { href = `javascript:window.external.msAddTrackingProtectionList('${encodeURIComponent(props.url)}', '${hrefTitle}')`; } else if (props.url.indexOf(".lsrules") > 0) +{ + href = `x-littlesnitch:subscribe-rules?url=${encodeURIComponent(props.url)}`; +} else if (props.url.indexOf("?hostformat=littlesnitch") > 0) { href = `x-littlesnitch:subscribe-rules?url=${encodeURIComponent(props.url)}`; } else { href = `abp:subscribe?location=${encodeURIComponent(props.url)}&title=${hrefTitle}`; }; + + + let title; if (props.url.indexOf(".tpl") > 0) { title = `${titlePrefix}Subscribe to ${props.name} with Internet Explorer's Tracking Protection List feature.`; } else if (props.url.indexOf(".lsrules") > 0) +{ + title = `${titlePrefix}Subscribe to ${props.name} with Little Snitch's rule group subscription feature.`; +} else if (props.url.indexOf("?hostformat=littlesnitch") > 0) { title = `${titlePrefix}Subscribe to ${props.name} with Little Snitch's rule group subscription feature.`; } else { From c666b57a89a96e390e8c250d87721e420a537804 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Tue, 14 May 2019 13:08:01 -0500 Subject: [PATCH 09/14] add Microsoft.CodeAnalysis.FxCopAnalyzers --- src/FilterLists.Agent/FilterLists.Agent.csproj | 1 + src/FilterLists.Api/FilterLists.Api.csproj | 1 + src/FilterLists.Data/FilterLists.Data.csproj | 1 + src/FilterLists.Services/FilterLists.Services.csproj | 1 + src/FilterLists.Web/FilterLists.Web.csproj | 1 + tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj | 1 + .../FilterLists.Services.Tests/FilterLists.Services.Tests.csproj | 1 + 7 files changed, 7 insertions(+) diff --git a/src/FilterLists.Agent/FilterLists.Agent.csproj b/src/FilterLists.Agent/FilterLists.Agent.csproj index f8e7dd8e9..910252a44 100644 --- a/src/FilterLists.Agent/FilterLists.Agent.csproj +++ b/src/FilterLists.Agent/FilterLists.Agent.csproj @@ -20,6 +20,7 @@ + diff --git a/src/FilterLists.Api/FilterLists.Api.csproj b/src/FilterLists.Api/FilterLists.Api.csproj index 441c93bbb..65afc1456 100644 --- a/src/FilterLists.Api/FilterLists.Api.csproj +++ b/src/FilterLists.Api/FilterLists.Api.csproj @@ -33,6 +33,7 @@ + diff --git a/src/FilterLists.Data/FilterLists.Data.csproj b/src/FilterLists.Data/FilterLists.Data.csproj index 6ddcd79c0..c8d847f85 100644 --- a/src/FilterLists.Data/FilterLists.Data.csproj +++ b/src/FilterLists.Data/FilterLists.Data.csproj @@ -19,6 +19,7 @@ + all diff --git a/src/FilterLists.Services/FilterLists.Services.csproj b/src/FilterLists.Services/FilterLists.Services.csproj index dbab4d666..6048f7a72 100644 --- a/src/FilterLists.Services/FilterLists.Services.csproj +++ b/src/FilterLists.Services/FilterLists.Services.csproj @@ -21,6 +21,7 @@ + diff --git a/src/FilterLists.Web/FilterLists.Web.csproj b/src/FilterLists.Web/FilterLists.Web.csproj index 2a2a25d7b..f89b25325 100644 --- a/src/FilterLists.Web/FilterLists.Web.csproj +++ b/src/FilterLists.Web/FilterLists.Web.csproj @@ -26,6 +26,7 @@ + diff --git a/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj b/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj index 761f6ffbc..83b12e758 100644 --- a/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj +++ b/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj @@ -17,6 +17,7 @@ + all runtime; build; native; contentfiles; analyzers diff --git a/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj b/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj index 7b21e3c09..37f61f16d 100644 --- a/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj +++ b/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj @@ -17,6 +17,7 @@ + all runtime; build; native; contentfiles; analyzers From deb449728965b074324263faf7182d1a29156b50 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Tue, 14 May 2019 13:28:12 -0500 Subject: [PATCH 10/14] suppress CA2007 https://stackoverflow.com/a/13494570/2343739 --- .../FilterLists.Agent.csproj | 8 ++ .../FilterLists.Agent.ruleset | 74 +++++++++++++++++++ src/FilterLists.Api/FilterLists.Api.csproj | 8 ++ src/FilterLists.Api/FilterLists.Api.ruleset | 74 +++++++++++++++++++ src/FilterLists.Data/FilterLists.Data.csproj | 8 ++ src/FilterLists.Data/FilterLists.Data.ruleset | 74 +++++++++++++++++++ .../FilterLists.Services.csproj | 8 ++ .../FilterLists.Services.ruleset | 74 +++++++++++++++++++ src/FilterLists.Web/FilterLists.Web.csproj | 8 ++ src/FilterLists.Web/FilterLists.Web.ruleset | 74 +++++++++++++++++++ .../FilterLists.Data.Tests.csproj | 8 ++ .../FilterLists.Data.Tests.ruleset | 74 +++++++++++++++++++ .../FilterLists.Services.Tests.csproj | 8 ++ .../FilterLists.Services.Tests.ruleset | 74 +++++++++++++++++++ 14 files changed, 574 insertions(+) create mode 100644 src/FilterLists.Agent/FilterLists.Agent.ruleset create mode 100644 src/FilterLists.Api/FilterLists.Api.ruleset create mode 100644 src/FilterLists.Data/FilterLists.Data.ruleset create mode 100644 src/FilterLists.Services/FilterLists.Services.ruleset create mode 100644 src/FilterLists.Web/FilterLists.Web.ruleset create mode 100644 tests/FilterLists.Data.Tests/FilterLists.Data.Tests.ruleset create mode 100644 tests/FilterLists.Services.Tests/FilterLists.Services.Tests.ruleset diff --git a/src/FilterLists.Agent/FilterLists.Agent.csproj b/src/FilterLists.Agent/FilterLists.Agent.csproj index 910252a44..6d8ea839d 100644 --- a/src/FilterLists.Agent/FilterLists.Agent.csproj +++ b/src/FilterLists.Agent/FilterLists.Agent.csproj @@ -18,6 +18,14 @@ false + + FilterLists.Agent.ruleset + + + + FilterLists.Agent.ruleset + + diff --git a/src/FilterLists.Agent/FilterLists.Agent.ruleset b/src/FilterLists.Agent/FilterLists.Agent.ruleset new file mode 100644 index 000000000..e4169cd7d --- /dev/null +++ b/src/FilterLists.Agent/FilterLists.Agent.ruleset @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/FilterLists.Api/FilterLists.Api.csproj b/src/FilterLists.Api/FilterLists.Api.csproj index 65afc1456..e81d11986 100644 --- a/src/FilterLists.Api/FilterLists.Api.csproj +++ b/src/FilterLists.Api/FilterLists.Api.csproj @@ -22,6 +22,14 @@ ..\..\docker-compose.dcproj + + FilterLists.Api.ruleset + + + + FilterLists.Api.ruleset + + diff --git a/src/FilterLists.Api/FilterLists.Api.ruleset b/src/FilterLists.Api/FilterLists.Api.ruleset new file mode 100644 index 000000000..e4169cd7d --- /dev/null +++ b/src/FilterLists.Api/FilterLists.Api.ruleset @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/FilterLists.Data/FilterLists.Data.csproj b/src/FilterLists.Data/FilterLists.Data.csproj index c8d847f85..c541daf99 100644 --- a/src/FilterLists.Data/FilterLists.Data.csproj +++ b/src/FilterLists.Data/FilterLists.Data.csproj @@ -16,6 +16,14 @@ false + + FilterLists.Data.ruleset + + + + FilterLists.Data.ruleset + + diff --git a/src/FilterLists.Data/FilterLists.Data.ruleset b/src/FilterLists.Data/FilterLists.Data.ruleset new file mode 100644 index 000000000..e4169cd7d --- /dev/null +++ b/src/FilterLists.Data/FilterLists.Data.ruleset @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/FilterLists.Services/FilterLists.Services.csproj b/src/FilterLists.Services/FilterLists.Services.csproj index 6048f7a72..f83bc86d4 100644 --- a/src/FilterLists.Services/FilterLists.Services.csproj +++ b/src/FilterLists.Services/FilterLists.Services.csproj @@ -16,6 +16,14 @@ false + + FilterLists.Services.ruleset + + + + FilterLists.Services.ruleset + + diff --git a/src/FilterLists.Services/FilterLists.Services.ruleset b/src/FilterLists.Services/FilterLists.Services.ruleset new file mode 100644 index 000000000..e4169cd7d --- /dev/null +++ b/src/FilterLists.Services/FilterLists.Services.ruleset @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/FilterLists.Web/FilterLists.Web.csproj b/src/FilterLists.Web/FilterLists.Web.csproj index f89b25325..0a1d6eed3 100644 --- a/src/FilterLists.Web/FilterLists.Web.csproj +++ b/src/FilterLists.Web/FilterLists.Web.csproj @@ -22,6 +22,14 @@ ..\..\docker-compose.dcproj + + FilterLists.Web.ruleset + + + + FilterLists.Web.ruleset + + diff --git a/src/FilterLists.Web/FilterLists.Web.ruleset b/src/FilterLists.Web/FilterLists.Web.ruleset new file mode 100644 index 000000000..e4169cd7d --- /dev/null +++ b/src/FilterLists.Web/FilterLists.Web.ruleset @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj b/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj index 83b12e758..696da93d7 100644 --- a/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj +++ b/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj @@ -16,6 +16,14 @@ https://github.com/collinbarrett/FilterLists + + FilterLists.Data.Tests.ruleset + + + + FilterLists.Data.Tests.ruleset + + diff --git a/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.ruleset b/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.ruleset new file mode 100644 index 000000000..e4169cd7d --- /dev/null +++ b/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.ruleset @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj b/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj index 37f61f16d..9a95dc0d1 100644 --- a/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj +++ b/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj @@ -16,6 +16,14 @@ https://github.com/collinbarrett/FilterLists + + FilterLists.Services.Tests.ruleset + + + + FilterLists.Services.Tests.ruleset + + diff --git a/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.ruleset b/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.ruleset new file mode 100644 index 000000000..e4169cd7d --- /dev/null +++ b/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.ruleset @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 73d23f9b4719a3d8e1f745d84d73b8b50a42f588 Mon Sep 17 00:00:00 2001 From: Imre Kristoffer Eilertsen Date: Tue, 14 May 2019 21:23:57 +0200 Subject: [PATCH 11/14] Adding AdNauseam as a software tool (#788) * Update Software.json * Update SoftwareSyntax.json * Add files via upload * Update index.ts * Update SoftwareIcon.tsx --- data/Software.json | 9 ++- data/SoftwareSyntax.json | 54 +++++++++++++++++- .../components/softwareIcon/SoftwareIcon.tsx | 4 +- .../softwareIcon/imgs/32-AdNauseam.png | Bin 0 -> 713 bytes .../components/softwareIcon/imgs/index.ts | 4 +- 5 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/imgs/32-AdNauseam.png diff --git a/data/Software.json b/data/Software.json index 9f0e9d27e..fe99957b8 100644 --- a/data/Software.json +++ b/data/Software.json @@ -200,5 +200,12 @@ "homeUrl": "https://github.com/AdguardTeam/AdGuardHome", "isAbpSubscribable": false, "name": "AdGuard Home" + }, + { + "id": 32, + "downloadUrl": "https://adnauseam.io/", + "homeUrl": "https://adnauseam.io/", + "isAbpSubscribable": true, + "name": "AdNauseam" } -] \ No newline at end of file +] diff --git a/data/SoftwareSyntax.json b/data/SoftwareSyntax.json index 9bcfa6046..e04a29e49 100644 --- a/data/SoftwareSyntax.json +++ b/data/SoftwareSyntax.json @@ -51,6 +51,10 @@ "softwareId": 31, "syntaxId": 1 }, + { + "softwareId": 32, + "syntaxId": 1 + }, { "softwareId": 1, "syntaxId": 2 @@ -91,6 +95,10 @@ "softwareId": 31, "syntaxId": 2 }, + { + "softwareId": 32, + "syntaxId": 2 + }, { "softwareId": 1, "syntaxId": 3 @@ -115,6 +123,10 @@ "softwareId": 24, "syntaxId": 3 }, + { + "softwareId": 32, + "syntaxId": 3 + }, { "softwareId": 1, "syntaxId": 4 @@ -127,6 +139,10 @@ "softwareId": 5, "syntaxId": 4 }, + { + "softwareId": 32, + "syntaxId": 4 + }, { "softwareId": 1, "syntaxId": 6 @@ -139,6 +155,10 @@ "softwareId": 5, "syntaxId": 6 }, + { + "softwareId": 32, + "syntaxId": 6 + }, { "softwareId": 1, "syntaxId": 7 @@ -151,6 +171,10 @@ "softwareId": 25, "syntaxId": 7 }, + { + "softwareId": 32, + "syntaxId": 7 + }, { "softwareId": 1, "syntaxId": 8 @@ -159,6 +183,10 @@ "softwareId": 5, "syntaxId": 8 }, + { + "softwareId": 32, + "syntaxId": 8 + }, { "softwareId": 1, "syntaxId": 9 @@ -183,6 +211,10 @@ "softwareId": 5, "syntaxId": 12 }, + { + "softwareId": 32, + "syntaxId": 9 + }, { "softwareId": 1, "syntaxId": 13 @@ -195,6 +227,10 @@ "softwareId": 13, "syntaxId": 13 }, + { + "softwareId": 32, + "syntaxId": 13 + }, { "softwareId": 7, "syntaxId": 14 @@ -231,6 +267,10 @@ "softwareId": 31, "syntaxId": 16 }, + { + "softwareId": 32, + "syntaxId": 16 + }, { "softwareId": 1, "syntaxId": 17 @@ -251,6 +291,10 @@ "softwareId": 23, "syntaxId": 20 }, + { + "softwareId": 32, + "syntaxId": 17 + }, { "softwareId": 1, "syntaxId": 21 @@ -259,6 +303,10 @@ "softwareId": 5, "syntaxId": 21 }, + { + "softwareId": 32, + "syntaxId": 21 + }, { "softwareId": 4, "syntaxId": 22 @@ -310,5 +358,9 @@ { "softwareId": 31, "syntaxId": 28 + }, + { + "softwareId": 32, + "syntaxId": 28 } -] \ No newline at end of file +] diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/SoftwareIcon.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/SoftwareIcon.tsx index a8e93655c..aea450f0a 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/SoftwareIcon.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/SoftwareIcon.tsx @@ -29,7 +29,8 @@ import { img28, img29, img30, - img31 + img31, + img32 } from "./imgs"; interface IProps { @@ -80,4 +81,5 @@ const icons: { [id: number]: IIcon; } = { 29: { image: img29, imageTitle: "Unbound" }, 30: { image: img30, imageTitle: "BIND" }, 31: { image: img31, imageTitle: "AdGuard Home" }, + 32: { image: img32, imageTitle: "AdNauseam" }, }; diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/imgs/32-AdNauseam.png b/src/FilterLists.Web/ClientApp/modules/home/components/softwareIcon/imgs/32-AdNauseam.png new file mode 100644 index 0000000000000000000000000000000000000000..773f3c556bcda75b5576d8af06e9211ae2b203fb GIT binary patch literal 713 zcmV;)0yh1LP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0$xc(K~y+TwNy!H z6hRa%y(r>A!3D&lh~Pm4K?J3lu4)|@6f_=OE&&zB1(zf!XdH8h2u3Ad^q}H)3OZd~ zlZ-?U5pxqf3L*%4P!EAjEfWP1+E+b2LyuF3QS`&7KkvPM_3O{?A^$aE63^nk?kWem zD}`Dj^r{OuRefT|=XojQj!IrHhVXgBbR1FLpTaE>`DUr*Iny6Flj~BrHO2$81fq9| zQ3qy;A=S0e*PBwR9>roj8y&rD8g*!9lQT8N+0?R>CImotR*+fGjD$v zG|Zmnrq`g}73He_gcr|snMG9ntmJ2w6R}yZY9kYY?vI%2$zr&{8>gA&0&|RTY7RI_ zrY_^ekv7hgE7~xdRNo_ln$u2_smFNU&0_eGz6qwiEY?h_M=>vX+(n|Zk35)JkLULW zCaAiCVV}?H8VOy9YpU%o(x&|q#;96}E>D$NZQF~1h6An$1=xk@Q8YrH)1b>iUEBW_x60<00R%3t<|2hM+w{FDrZcgQeh?)U( zcn1S63Z{B7>j7zwGwa_Z|C>BBHW@`gL6>3lLxBff|f_brAm+MSBSNS6CJB>K5_~u?2u~(+sCV6rvtRJq~;b zMg`P;&|X3}L+HGlGjp=et3l|Wft$qA>Z1V8r28|B7muLZ{dT8HY}!M80^I!&*8%?k v^ Date: Tue, 14 May 2019 15:25:10 -0500 Subject: [PATCH 12/14] cleanup R# config --- FilterLists.sln.DotSettings | 192 +----------------------------------- 1 file changed, 4 insertions(+), 188 deletions(-) diff --git a/FilterLists.sln.DotSettings b/FilterLists.sln.DotSettings index 7309602f7..899d377ec 100644 --- a/FilterLists.sln.DotSettings +++ b/FilterLists.sln.DotSettings @@ -1,4 +1,7 @@ - + ExplicitlyExcluded True @@ -11,193 +14,6 @@ False CHOP_IF_LONG ALIGN_ALL - <?xml version="1.0" encoding="utf-16"?> -<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns"> - <TypePattern DisplayName="Non-reorderable types"> - <TypePattern.Match> - <Or> - <And> - <Kind Is="Interface" /> - <Or> - <HasAttribute Name="System.Runtime.InteropServices.InterfaceTypeAttribute" /> - <HasAttribute Name="System.Runtime.InteropServices.ComImport" /> - </Or> - </And> - <Kind Is="Struct" /> - <HasAttribute Name="JetBrains.Annotations.NoReorderAttribute" /> - <HasAttribute Name="JetBrains.Annotations.NoReorder" /> - </Or> - </TypePattern.Match> - </TypePattern> - <TypePattern DisplayName="xUnit.net Test Classes" RemoveRegions="All"> - <TypePattern.Match> - <And> - <Kind Is="Class" /> - <HasMember> - <And> - <Kind Is="Method" /> - <HasAttribute Name="Xunit.FactAttribute" Inherited="True" /> - </And> - </HasMember> - </And> - </TypePattern.Match> - <Entry DisplayName="Setup/Teardown Methods"> - <Entry.Match> - <Or> - <Kind Is="Constructor" /> - <And> - <Kind Is="Method" /> - <ImplementsInterface Name="System.IDisposable" /> - </And> - </Or> - </Entry.Match> - <Entry.SortBy> - <Kind Order="Constructor" /> - </Entry.SortBy> - </Entry> - <Entry DisplayName="All other members" /> - <Entry Priority="100" DisplayName="Test Methods"> - <Entry.Match> - <And> - <Kind Is="Method" /> - <HasAttribute Name="Xunit.FactAttribute" /> - </And> - </Entry.Match> - <Entry.SortBy> - <Name /> - </Entry.SortBy> - </Entry> - </TypePattern> - <TypePattern DisplayName="NUnit Test Fixtures" RemoveRegions="All"> - <TypePattern.Match> - <And> - <Kind Is="Class" /> - <HasAttribute Name="NUnit.Framework.TestFixtureAttribute" Inherited="True" /> - </And> - </TypePattern.Match> - <Entry DisplayName="Setup/Teardown Methods"> - <Entry.Match> - <And> - <Kind Is="Method" /> - <Or> - <HasAttribute Name="NUnit.Framework.SetUpAttribute" Inherited="True" /> - <HasAttribute Name="NUnit.Framework.TearDownAttribute" Inherited="True" /> - <HasAttribute Name="NUnit.Framework.FixtureSetUpAttribute" Inherited="True" /> - <HasAttribute Name="NUnit.Framework.FixtureTearDownAttribute" Inherited="True" /> - </Or> - </And> - </Entry.Match> - </Entry> - <Entry DisplayName="All other members" /> - <Entry Priority="100" DisplayName="Test Methods"> - <Entry.Match> - <And> - <Kind Is="Method" /> - <HasAttribute Name="NUnit.Framework.TestAttribute" /> - </And> - </Entry.Match> - <Entry.SortBy> - <Name /> - </Entry.SortBy> - </Entry> - </TypePattern> - <TypePattern DisplayName="Default Pattern"> - <Entry Priority="100" DisplayName="Public Delegates"> - <Entry.Match> - <And> - <Access Is="Public" /> - <Kind Is="Delegate" /> - </And> - </Entry.Match> - <Entry.SortBy> - <Name /> - </Entry.SortBy> - </Entry> - <Entry Priority="100" DisplayName="Public Enums"> - <Entry.Match> - <And> - <Access Is="Public" /> - <Kind Is="Enum" /> - </And> - </Entry.Match> - <Entry.SortBy> - <Name /> - </Entry.SortBy> - </Entry> - <Entry DisplayName="Static Fields and Constants"> - <Entry.Match> - <Or> - <Kind Is="Constant" /> - <And> - <Kind Is="Field" /> - <Static /> - </And> - </Or> - </Entry.Match> - <Entry.SortBy> - <Kind Order="Constant Field" /> - </Entry.SortBy> - </Entry> - <Entry DisplayName="Fields"> - <Entry.Match> - <And> - <Kind Is="Field" /> - <Not> - <Static /> - </Not> - </And> - </Entry.Match> - <Entry.SortBy> - <Readonly /> - <Access /> - </Entry.SortBy> - </Entry> - <Entry DisplayName="Constructors"> - <Entry.Match> - <Kind Is="Constructor" /> - </Entry.Match> - <Entry.SortBy> - <Static /> - </Entry.SortBy> - </Entry> - <Entry DisplayName="Properties, Indexers"> - <Entry.Match> - <Or> - <Kind Is="Property" /> - <Kind Is="Indexer" /> - </Or> - </Entry.Match> - <Entry.SortBy> - <Access /> - </Entry.SortBy> - </Entry> - <Entry Priority="100" DisplayName="Interface Implementations"> - <Entry.Match> - <And> - <Kind Is="Member" /> - <ImplementsInterface /> - </And> - </Entry.Match> - <Entry.SortBy> - <ImplementsInterface Immediate="True" /> - </Entry.SortBy> - </Entry> - <Entry DisplayName="All other members" /> - <Entry DisplayName="Nested Types"> - <Entry.Match> - <Kind Is="Type" /> - </Entry.Match> - </Entry> - </TypePattern> -</Patterns> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - True - True - True - True - True True True - True \ No newline at end of file From 8ce7ba9c6f04a9292764d8f0ee52624390bc94df Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Wed, 15 May 2019 08:29:56 -0500 Subject: [PATCH 13/14] disable R# auto-detected rules --- FilterLists.sln.DotSettings | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/FilterLists.sln.DotSettings b/FilterLists.sln.DotSettings index 899d377ec..8e4e1b2cb 100644 --- a/FilterLists.sln.DotSettings +++ b/FilterLists.sln.DotSettings @@ -1,7 +1,4 @@ - + ExplicitlyExcluded True @@ -14,6 +11,7 @@ False CHOP_IF_LONG ALIGN_ALL + False True True \ No newline at end of file From f06673828ff394916af6326f25deb27376b904eb Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Wed, 15 May 2019 08:42:17 -0500 Subject: [PATCH 14/14] resolve some FxCop warnings --- src/FilterLists.Services/Extensions/StringExtensions.cs | 2 +- tests/FilterLists.Data.Tests/FilterLists.Data.Tests.ruleset | 1 + .../FilterLists.Services.Tests.ruleset | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/FilterLists.Services/Extensions/StringExtensions.cs b/src/FilterLists.Services/Extensions/StringExtensions.cs index bc7b7b885..d48d163d7 100644 --- a/src/FilterLists.Services/Extensions/StringExtensions.cs +++ b/src/FilterLists.Services/Extensions/StringExtensions.cs @@ -12,7 +12,7 @@ public static bool IsValidHttpOrHttpsUrl(this string source) => public static int GetNthIndexOfChar(this string s, int n, char t) { if (n < 1) - throw new ArgumentOutOfRangeException(); + throw new ArgumentOutOfRangeException($"n = {n}"); var nthIndexOfChar = s.TakeWhile(c => (n -= c == t ? 1 : 0) > 0).Count(); return nthIndexOfChar == s.Length ? -1 : nthIndexOfChar; } diff --git a/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.ruleset b/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.ruleset index e4169cd7d..a3be703a8 100644 --- a/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.ruleset +++ b/tests/FilterLists.Data.Tests/FilterLists.Data.Tests.ruleset @@ -70,5 +70,6 @@ + \ No newline at end of file diff --git a/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.ruleset b/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.ruleset index e4169cd7d..a3be703a8 100644 --- a/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.ruleset +++ b/tests/FilterLists.Services.Tests/FilterLists.Services.Tests.ruleset @@ -70,5 +70,6 @@ + \ No newline at end of file