Skip to content

Commit

Permalink
Merge pull request #74 from Stravaig-Projects/#72-fix-errors-and-warn…
Browse files Browse the repository at this point in the history
…ings-issued-by-rid

#72 Fix errors and warnings issued by Rider
  • Loading branch information
colinangusmackay committed Jan 9, 2021
2 parents 859275c + f1dfdf4 commit ca8e0fb
Show file tree
Hide file tree
Showing 77 changed files with 583 additions and 722 deletions.
3 changes: 2 additions & 1 deletion release-notes/wip-release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ Date: ???

### Miscellaneous

* #60: Make build and release process consistent with other Stravaig Projects.
* #60: Make build and release process consistent with other Stravaig Projects.
* #72: Fix errors and warnings issued by Rider.
157 changes: 8 additions & 149 deletions src/.idea/.idea.Gedcom/.idea/contentModel.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/.idea/.idea.Gedcom/.idea/riderModule.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 11 additions & 6 deletions src/Gedcom.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stravaig.FamilyTreeGenerato
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stravaig.FamilyTree.Common", "Stravaig.FamilyTree.Common\Stravaig.FamilyTree.Common.csproj", "{80CCDAB9-284D-44F9-8A9F-69F916C34E58}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stravaig.FamilyTree.Blazor", "Stravaig.FamilyTree.Blazor\Stravaig.FamilyTree.Blazor.csproj", "{91F859EF-8954-4602-8FBB-D8DAB7A22AA2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stravaig.FamilyTree.Standardiser", "Stravaig.FamilyTree.Standardiser\Stravaig.FamilyTree.Standardiser.csproj", "{DB98E280-0598-41B5-B864-72385BD08519}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stravaig.FamilyTree.Standardiser.UnitTests", "Stravaig.FamilyTree.Standardiser.UnitTests\Stravaig.FamilyTree.Standardiser.UnitTests.csproj", "{376ADE5A-8203-4B50-A15E-9F33E703B36D}"
Expand All @@ -23,6 +21,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{CB5236BE
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stravaig.Gedcom.PowerShell", "Stravaig.Gedcom.PowerShell\Stravaig.Gedcom.PowerShell.csproj", "{EB81C74C-8593-4760-9080-D34A562041EC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "__Build_and_Deploy", "__Build_and_Deploy", "{51FEE412-DC7C-4B18-9357-D9CB4BA80449}"
ProjectSection(SolutionItems) = preProject
..\.github\workflows\build-gedcom-package.yml = ..\.github\workflows\build-gedcom-package.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "__Documentation", "__Documentation", "{FE3C1BE4-99FF-4487-B6CF-71E5F30E936B}"
ProjectSection(SolutionItems) = preProject
..\release-notes\full-release-notes.md = ..\release-notes\full-release-notes.md
..\release-notes\wip-release-notes.md = ..\release-notes\wip-release-notes.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -49,10 +58,6 @@ Global
{80CCDAB9-284D-44F9-8A9F-69F916C34E58}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80CCDAB9-284D-44F9-8A9F-69F916C34E58}.Release|Any CPU.ActiveCfg = Release|Any CPU
{80CCDAB9-284D-44F9-8A9F-69F916C34E58}.Release|Any CPU.Build.0 = Release|Any CPU
{91F859EF-8954-4602-8FBB-D8DAB7A22AA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91F859EF-8954-4602-8FBB-D8DAB7A22AA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91F859EF-8954-4602-8FBB-D8DAB7A22AA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91F859EF-8954-4602-8FBB-D8DAB7A22AA2}.Release|Any CPU.Build.0 = Release|Any CPU
{DB98E280-0598-41B5-B864-72385BD08519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DB98E280-0598-41B5-B864-72385BD08519}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB98E280-0598-41B5-B864-72385BD08519}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
2 changes: 2 additions & 0 deletions src/Gedcom.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=Namer/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Naturalisation/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Organiser/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Paramore/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Serialiser/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Standardiser/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Stravaig/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
6 changes: 1 addition & 5 deletions src/Stravaig.FamilyTree.Blazor/Program.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Text;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Stravaig.FamilyTree.Blazor.Services;
using Stravaig.FamilyTreeGenerator.Requests.Handlers.Services;
using Stravaig.FamilyTree.Common.Humaniser;

namespace Stravaig.FamilyTree.Blazor
{
Expand Down
2 changes: 1 addition & 1 deletion src/Stravaig.FamilyTree.Blazor/Shared/Relationship.razor
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@using Stravaig.FamilyTreeGenerator.Requests.Handlers.Services
@using Stravaig.FamilyTree.Common.Humaniser
@RelationshipName
@code {
[Parameter]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
@using Stravaig.FamilyTree.Blazor.Shared.Date
@using Stravaig.FamilyTree.Blazor.Shared.Timeline
@using Stravaig.FamilyTree.Common.Footnotes
@using Stravaig.FamilyTreeGenerator.Requests.Handlers.Services
@using Stravaig.FamilyTree.Blazor.Services

<h1>@Subject.NameWithoutMarker</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Stravaig.FamilyTree.Common.Extensions
{
// ReSharper disable once InconsistentNaming
// It is named after the interface it is extending.
public static class IEnumerableGedcomIndividualRecordExtensions
{
public static IEnumerable<GedcomIndividualRecord> OrderByStandardSort(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Stravaig.Gedcom.Model;

namespace Stravaig.FamilyTreeGenerator.Requests.Handlers.Services
namespace Stravaig.FamilyTree.Common.Humaniser
{
public class EnglishLanguageRelationshipRenderer : IRelationshipRenderer
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Stravaig.Gedcom.Model;

namespace Stravaig.FamilyTreeGenerator.Requests.Handlers.Services
namespace Stravaig.FamilyTree.Common.Humaniser
{
public interface IRelationshipRenderer
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Globalization;
using System.IO;
using NUnit.Framework;
using Shouldly;

Expand Down
4 changes: 0 additions & 4 deletions src/Stravaig.FamilyTree.Standardiser/Application.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Microsoft.Extensions.Logging;
using Stravaig.FamilyTree.Standardiser.Extensions;
using Stravaig.Gedcom;
Expand Down
2 changes: 1 addition & 1 deletion src/Stravaig.FamilyTree.Standardiser/CommandLineOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public string DestinationFile
set
{
var absolutePath = Path.GetFullPath(value);
_destinationFile = value;
_destinationFile = absolutePath;
}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/Stravaig.FamilyTree.Standardiser/FileNamer.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.IO;
using System.Text.RegularExpressions;
using System.Xml;

namespace Stravaig.FamilyTree.Standardiser
{
Expand Down
4 changes: 2 additions & 2 deletions src/Stravaig.FamilyTree.Standardiser/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ private static ServiceProvider BuildServiceProvider(CommandLineOptions options)

private static void AddApplicationServices(ServiceCollection services, CommandLineOptions options)
{
services.AddSingleton<CommandLineOptions>(options);
services.AddSingleton<GedcomDatabase>(p=>
services.AddSingleton(options);
services.AddSingleton(p=>
{
CommandLineOptions opts = p.GetRequiredService<CommandLineOptions>();
return GetDatabase(opts.SourceFile);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Text;
using Stravaig.Gedcom.Model;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using Stravaig.Gedcom.Extensions;
Expand All @@ -11,7 +10,7 @@ namespace Stravaig.FamilyTreeGenerator.Extensions
{
public static class StringExtensions
{
private const char ellipsis = (char) 0x2026; // …
private const char Ellipsis = (char) 0x2026; // …
public static string MakeFileNameSafe(this string target)
{
if (target == null)
Expand All @@ -36,7 +35,7 @@ public static string MakeFileNameSafe(this string target)
result = result.Replace("--", "-");
} while (result.Length < len);
if (len > 100)
result = result.Substring(0, 99) + ellipsis;
result = result.Substring(0, 99) + Ellipsis;
return result;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.IO;
using System.IO.Compression;
using Stravaig.Gedcom.Extensions;

namespace Stravaig.FamilyTreeGenerator.Extensions
Expand Down
Loading

0 comments on commit ca8e0fb

Please sign in to comment.