Skip to content

Commit d4f68b2

Browse files
authored
Fixed code warnings (Roslyn analyzers and others) (#156)
* Not many dependencies to upgrade, but removed ref to no-longer used JunitXml.TestLogger * Fixed a lot of Roslyn analyzer and other code style warnings
1 parent f44d0a2 commit d4f68b2

File tree

76 files changed

+266
-175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+266
-175
lines changed

.editorconfig

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,3 @@ csharp_space_between_method_call_empty_parameter_list_parentheses = false
127127
csharp_preserve_single_line_statements = true
128128
csharp_preserve_single_line_blocks = true
129129
dotnet_diagnostic.CA1001.severity=warning
130-
###############################
131-
# VB Coding Conventions #
132-
###############################
133-
[*.vb]
134-
# Modifier preferences
135-
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion

grate.sln.DotSettings

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:Boolean x:Key="/Default/UserDictionary/Words/=accesstoken/@EntryIndexedValue">True</s:Boolean>
3+
<s:Boolean x:Key="/Default/UserDictionary/Words/=admincommandtimeout/@EntryIndexedValue">True</s:Boolean>
4+
<s:Boolean x:Key="/Default/UserDictionary/Words/=adminconnectionstring/@EntryIndexedValue">True</s:Boolean>
5+
<s:Boolean x:Key="/Default/UserDictionary/Words/=adminconnstring/@EntryIndexedValue">True</s:Boolean>
6+
<s:Boolean x:Key="/Default/UserDictionary/Words/=aftercreate/@EntryIndexedValue">True</s:Boolean>
7+
<s:Boolean x:Key="/Default/UserDictionary/Words/=aftermigration/@EntryIndexedValue">True</s:Boolean>
8+
<s:Boolean x:Key="/Default/UserDictionary/Words/=afterotherany/@EntryIndexedValue">True</s:Boolean>
9+
<s:Boolean x:Key="/Default/UserDictionary/Words/=alterdatabase/@EntryIndexedValue">True</s:Boolean>
10+
<s:Boolean x:Key="/Default/UserDictionary/Words/=BATCHSPLITTER/@EntryIndexedValue">True</s:Boolean>
11+
<s:Boolean x:Key="/Default/UserDictionary/Words/=beforemigration/@EntryIndexedValue">True</s:Boolean>
12+
<s:Boolean x:Key="/Default/UserDictionary/Words/=beforeup/@EntryIndexedValue">True</s:Boolean>
13+
<s:Boolean x:Key="/Default/UserDictionary/Words/=BOOYA/@EntryIndexedValue">True</s:Boolean>
14+
<s:Boolean x:Key="/Default/UserDictionary/Words/=commandtimeout/@EntryIndexedValue">True</s:Boolean>
15+
<s:Boolean x:Key="/Default/UserDictionary/Words/=confed/@EntryIndexedValue">True</s:Boolean>
16+
<s:Boolean x:Key="/Default/UserDictionary/Words/=connectionstring/@EntryIndexedValue">True</s:Boolean>
17+
<s:Boolean x:Key="/Default/UserDictionary/Words/=connstring/@EntryIndexedValue">True</s:Boolean>
18+
<s:Boolean x:Key="/Default/UserDictionary/Words/=crubb/@EntryIndexedValue">True</s:Boolean>
19+
<s:Boolean x:Key="/Default/UserDictionary/Words/=DAATAA/@EntryIndexedValue">True</s:Boolean>
20+
<s:Boolean x:Key="/Default/UserDictionary/Words/=databasetype/@EntryIndexedValue">True</s:Boolean>
21+
<s:Boolean x:Key="/Default/UserDictionary/Words/=DATADATADATABASE/@EntryIndexedValue">True</s:Boolean>
22+
<s:Boolean x:Key="/Default/UserDictionary/Words/=datname/@EntryIndexedValue">True</s:Boolean>
23+
<s:Boolean x:Key="/Default/UserDictionary/Words/=disabletokenreplacement/@EntryIndexedValue">True</s:Boolean>
24+
<s:Boolean x:Key="/Default/UserDictionary/Words/=disabletokens/@EntryIndexedValue">True</s:Boolean>
25+
<s:Boolean x:Key="/Default/UserDictionary/Words/=donotstorescriptsruntext/@EntryIndexedValue">True</s:Boolean>
26+
<s:Boolean x:Key="/Default/UserDictionary/Words/=dryrun/@EntryIndexedValue">True</s:Boolean>
27+
<s:Boolean x:Key="/Default/UserDictionary/Words/=firstafterup/@EntryIndexedValue">True</s:Boolean>
28+
<s:Boolean x:Key="/Default/UserDictionary/Words/=FOOFOO/@EntryIndexedValue">True</s:Boolean>
29+
<s:Boolean x:Key="/Default/UserDictionary/Words/=forceanytimescripts/@EntryIndexedValue">True</s:Boolean>
30+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Jajaj/@EntryIndexedValue">True</s:Boolean>
31+
<s:Boolean x:Key="/Default/UserDictionary/Words/=jalla/@EntryIndexedValue">True</s:Boolean>
32+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Lotsastuff/@EntryIndexedValue">True</s:Boolean>
33+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Monomonojono/@EntryIndexedValue">True</s:Boolean>
34+
<s:Boolean x:Key="/Default/UserDictionary/Words/=mssqllocaldb/@EntryIndexedValue">True</s:Boolean>
35+
<s:Boolean x:Key="/Default/UserDictionary/Words/=mycustomtoken/@EntryIndexedValue">True</s:Boolean>
36+
<s:Boolean x:Key="/Default/UserDictionary/Words/=myvalue/@EntryIndexedValue">True</s:Boolean>
37+
<s:Boolean x:Key="/Default/UserDictionary/Words/=NEWDATABASE/@EntryIndexedValue">True</s:Boolean>
38+
<s:Boolean x:Key="/Default/UserDictionary/Words/=nextval/@EntryIndexedValue">True</s:Boolean>
39+
<s:Boolean x:Key="/Default/UserDictionary/Words/=ntext/@EntryIndexedValue">True</s:Boolean>
40+
<s:Boolean x:Key="/Default/UserDictionary/Words/=oracleinanutshell/@EntryIndexedValue">True</s:Boolean>
41+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Postgre/@EntryIndexedValue">True</s:Boolean>
42+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Roundhous/@EntryIndexedValue">True</s:Boolean>
43+
<s:Boolean x:Key="/Default/UserDictionary/Words/=runallanytimescripts/@EntryIndexedValue">True</s:Boolean>
44+
<s:Boolean x:Key="/Default/UserDictionary/Words/=schemaname/@EntryIndexedValue">True</s:Boolean>
45+
<s:Boolean x:Key="/Default/UserDictionary/Words/=somename/@EntryIndexedValue">True</s:Boolean>
46+
<s:Boolean x:Key="/Default/UserDictionary/Words/=SOMEOTHERDATABASE/@EntryIndexedValue">True</s:Boolean>
47+
<s:Boolean x:Key="/Default/UserDictionary/Words/=sprocs/@EntryIndexedValue">True</s:Boolean>
48+
<s:Boolean x:Key="/Default/UserDictionary/Words/=sqlfilesdirectory/@EntryIndexedValue">True</s:Boolean>
49+
<s:Boolean x:Key="/Default/UserDictionary/Words/=sysdatabases/@EntryIndexedValue">True</s:Boolean>
50+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Trianglehous/@EntryIndexedValue">True</s:Boolean>
51+
<s:Boolean x:Key="/Default/UserDictionary/Words/=usertokens/@EntryIndexedValue">True</s:Boolean>
52+
<s:Boolean x:Key="/Default/UserDictionary/Words/=warnandignoreononetimescriptchanges/@EntryIndexedValue">True</s:Boolean>
53+
<s:Boolean x:Key="/Default/UserDictionary/Words/=warnononetimescriptchanges/@EntryIndexedValue">True</s:Boolean>
54+
<s:Boolean x:Key="/Default/UserDictionary/Words/=_00D8yenbryn/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

grate.unittests/Basic/CommandLineParsing.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public async Task SqlFilesDirectory(string argName)
5252
var commandline = argName + database;
5353
var cfg = await ParseGrateConfiguration(commandline);
5454

55-
cfg?.SqlFilesDirectory?.ToString().Should().Be(database);
55+
cfg?.SqlFilesDirectory.ToString().Should().Be(database);
5656
}
5757

5858
[TestCase("-o ")]
@@ -66,7 +66,7 @@ public async Task OutputPath(string argName)
6666
var commandline = argName + database;
6767
var cfg = await ParseGrateConfiguration(commandline);
6868

69-
cfg?.OutputPath?.ToString().Should().Be(database);
69+
cfg?.OutputPath.ToString().Should().Be(database);
7070
}
7171

7272
[TestCase("--version=")]
@@ -250,7 +250,7 @@ public async Task UserTokens(string args, int expectedCount)
250250
public async Task TestDatabaseType(string args, DatabaseType expected)
251251
{
252252
var cfg = await ParseGrateConfiguration(args);
253-
cfg?.DatabaseType.Should().Equals(expected);
253+
cfg?.DatabaseType.Should().Be(expected);
254254
}
255255

256256

@@ -264,4 +264,4 @@ public async Task TestDatabaseType(string args, DatabaseType expected)
264264
await cmd.InvokeAsync(new InvocationContext(p));
265265
return cfg;
266266
}
267-
}
267+
}

grate.unittests/Basic/GrateConfiguration_.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace grate.unittests.Basic;
88

99
[TestFixture]
1010
[Category("Basic")]
11+
// ReSharper disable once InconsistentNaming
1112
public class GrateConfiguration_
1213
{
1314
[Test]
@@ -42,4 +43,4 @@ public void Doesnt_include_comma_in_drop_folder()
4243
dropFolder.Should().NotContain(",");
4344
}
4445

45-
}
46+
}

grate.unittests/Basic/Infrastructure/GrateEnvironment_.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ namespace grate.unittests.Basic.Infrastructure;
77

88
[TestFixture]
99
[Category("Basic")]
10+
// ReSharper disable once InconsistentNaming
1011
public class GrateEnvironment_
1112
{
1213
[Test]

grate.unittests/Basic/Infrastructure/HashGenerator_.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ namespace grate.unittests.Basic.Infrastructure;
55

66
[TestFixture]
77
[Category("Basic")]
8+
// ReSharper disable once InconsistentNaming
89
public class HashGenerator_
910
{
1011
[Test]
@@ -16,4 +17,4 @@ public void Generates_the_correct_hash()
1617
var hashGen = new HashGenerator();
1718
Assert.AreEqual(expected_hash, hashGen.Hash(text_to_hash));
1819
}
19-
}
20+
}

grate.unittests/Basic/Infrastructure/SqlServer/Statement_Splitting/BatchSplitterReplacer_.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ public void go_with_space()
4444
[Test]
4545
public void go_with_tab()
4646
{
47-
string sql_to_match = @" GO" + string.Format("\t");
48-
string expected_scrubbed = @" " + Batch_terminator_replacement_string + string.Format("\t");
47+
string sql_to_match = @" GO" + "\t";
48+
string expected_scrubbed = @" " + Batch_terminator_replacement_string + "\t";
4949
TestContext.WriteLine(sql_to_match);
5050
string sql_statement_scrubbed = Replacer.Replace(sql_to_match);
5151
Assert.AreEqual(expected_scrubbed, sql_statement_scrubbed);
@@ -362,9 +362,9 @@ public void go_with_double_dash_comment_and_space_starting_line_and_symbols_afte
362362
[Test]
363363
public void go_with_double_dash_comment_and_tab_starting_line()
364364
{
365-
string sql_to_match = @"--" + string.Format("\t") + @"GO
365+
string sql_to_match = "--" + "\t" + @"GO
366366
";
367-
string expected_scrubbed = @"--" + string.Format("\t") + @"GO
367+
string expected_scrubbed = @"--" + "\t" + @"GO
368368
";
369369
TestContext.WriteLine(sql_to_match);
370370
string sql_statement_scrubbed = Replacer.Replace(sql_to_match);
@@ -374,9 +374,9 @@ public void go_with_double_dash_comment_and_tab_starting_line()
374374
[Test]
375375
public void go_with_double_dash_comment_and_tab_starting_line_and_words_after_go()
376376
{
377-
string sql_to_match = @"--" + string.Format("\t") + @"GO " + Words_to_check + @"
377+
string sql_to_match = @"--" + "\t" + @"GO " + Words_to_check + @"
378378
";
379-
string expected_scrubbed = @"--" + string.Format("\t") + @"GO " + Words_to_check + @"
379+
string expected_scrubbed = @"--" + "\t" + @"GO " + Words_to_check + @"
380380
";
381381
TestContext.WriteLine(sql_to_match);
382382
string sql_statement_scrubbed = Replacer.Replace(sql_to_match);
@@ -386,9 +386,9 @@ public void go_with_double_dash_comment_and_tab_starting_line_and_words_after_go
386386
[Test]
387387
public void go_with_double_dash_comment_and_tab_starting_line_and_symbols_after_go()
388388
{
389-
string sql_to_match = @"--" + string.Format("\t") + @"GO " + Symbols_to_check + @"
389+
string sql_to_match = @"--" + "\t" + @"GO " + Symbols_to_check + @"
390390
";
391-
string expected_scrubbed = @"--" + string.Format("\t") + @"GO " + Symbols_to_check + @"
391+
string expected_scrubbed = @"--" + "\t" + @"GO " + Symbols_to_check + @"
392392
";
393393
TestContext.WriteLine(sql_to_match);
394394
string sql_statement_scrubbed = Replacer.Replace(sql_to_match);
@@ -583,4 +583,4 @@ public void go_inside_of_comments_with_symbols_after_on_different_lines()
583583
}
584584
}
585585

586-
}
586+
}

grate.unittests/Basic/Infrastructure/TokenReplacerTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public void EnsureConfigMakesItToTokens()
5454
}
5555

5656
[Test]
57-
public void EnsureDBMakesItToTokens()
57+
public void EnsureDbMakesItToTokens()
5858
{
5959
var config = new GrateConfiguration()
6060
{
@@ -84,4 +84,4 @@ public void EnsureUserTokenParserWorks()
8484
// ensure a back-compat scenario throws rather than quietly do the wrong thing.
8585
Assert.Throws<ArgumentOutOfRangeException>(() => TokenProvider.ParseUserToken("token1=value1;token2=value2"));
8686
}
87-
}
87+
}

grate.unittests/Generic/GenericDatabase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ protected virtual async Task CreateDatabase(string db)
9696
try
9797
{
9898
await using var conn = Context.CreateAdminDbConnection();
99-
conn.Open();
99+
await conn.OpenAsync();
100100
await using var cmd = conn.CreateCommand();
101101
cmd.CommandText = Context.Syntax.CreateDatabase(db, TestConfig.Password(Context.ConnectionString(db)));
102102
await cmd.ExecuteNonQueryAsync();
@@ -146,4 +146,4 @@ private GrateConfiguration GetConfiguration(string databaseName, bool createData
146146
DatabaseType = Context.DatabaseType
147147
};
148148
}
149-
}
149+
}

grate.unittests/Generic/Running_MigrationScripts/Anytime_scripts.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace grate.unittests.Generic.Running_MigrationScripts;
1212

1313
[TestFixture]
14+
// ReSharper disable once InconsistentNaming
1415
public abstract class Anytime_scripts : MigrationsScriptsBase
1516
{
1617
[Test]
@@ -180,4 +181,4 @@ public async Task Are_run_more_than_once_when_unchanged_but_flag_set()
180181

181182
scripts.Should().HaveCount(2);
182183
}
183-
}
184+
}

grate.unittests/Generic/Running_MigrationScripts/DropDatabase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ public async Task Ensure_database_gets_dropped()
4444
scripts = (await conn.QueryAsync<string>(sql)).ToArray();
4545
}
4646

47-
scripts.Should().HaveCount(1); // only one script because the databse was dropped after the first migration...
47+
scripts.Should().HaveCount(1); // only one script because the database was dropped after the first migration...
4848
}
49-
}
49+
}

grate.unittests/Generic/Running_MigrationScripts/Environment_scripts.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace grate.unittests.Generic.Running_MigrationScripts;
1111

1212
[TestFixture]
13+
// ReSharper disable once InconsistentNaming
1314
public abstract class Environment_scripts : MigrationsScriptsBase
1415
{
1516
[Test]
@@ -118,4 +119,4 @@ public async Task Non_environment_scripts_are_always_run()
118119

119120
scripts.Should().HaveCount(1);
120121
}
121-
}
122+
}

grate.unittests/Generic/Running_MigrationScripts/Everytime_scripts.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace grate.unittests.Generic.Running_MigrationScripts;
1212

1313
[TestFixture]
14+
// ReSharper disable once InconsistentNaming
1415
public abstract class Everytime_scripts : MigrationsScriptsBase
1516
{
1617
[Test]
@@ -142,4 +143,4 @@ private void CreateOtherEveryTimeScriptFile(MigrationsFolder? folder)
142143
WriteSql(path, "1_jalla.everytime.and.always.sql", dummySql);
143144
}
144145

145-
}
146+
}

grate.unittests/Generic/Running_MigrationScripts/Failing_Scripts.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
namespace grate.unittests.Generic.Running_MigrationScripts;
1313

1414
[TestFixture]
15+
// ReSharper disable once InconsistentNaming
1516
public abstract class Failing_Scripts : MigrationsScriptsBase
1617
{
17-
protected abstract string ExpextedErrorMessageForInvalidSql { get; }
18+
protected abstract string ExpectedErrorMessageForInvalidSql { get; }
1819

1920
[Test]
2021
public async Task Aborts_the_run_giving_an_error_message()
@@ -29,7 +30,7 @@ public async Task Aborts_the_run_giving_an_error_message()
2930
await using (migrator = Context.GetMigrator(db, knownFolders))
3031
{
3132
var ex = Assert.ThrowsAsync(Context.DbExceptionType, migrator.Migrate);
32-
ex?.Message.Should().Be(ExpextedErrorMessageForInvalidSql);
33+
ex?.Message.Should().Be(ExpectedErrorMessageForInvalidSql);
3334
}
3435
}
3536

@@ -106,4 +107,4 @@ private static void CreateInvalidSql(MigrationsFolder? folder)
106107
var path = MakeSurePathExists(folder);
107108
WriteSql(path, "2_failing.sql", dummySql);
108109
}
109-
}
110+
}

grate.unittests/Generic/Running_MigrationScripts/One_time_scripts.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace grate.unittests.Generic.Running_MigrationScripts;
1212

1313
[TestFixture]
14+
// ReSharper disable once InconsistentNaming
1415
public abstract class One_time_scripts: MigrationsScriptsBase
1516
{
1617
[Test]
@@ -127,7 +128,7 @@ public async Task Ignores_and_warns_if_changed_between_runs_and_flag_set()
127128
GrateMigrator? migrator;
128129

129130
var knownFolders = KnownFolders.In(CreateRandomTempDirectory());
130-
var path = knownFolders?.Up?.Path ?? throw new Exception("Config Fail");
131+
var path = knownFolders.Up?.Path ?? throw new Exception("Config Fail");
131132

132133
WriteSql(path, "token.sql", CreateView1);
133134

@@ -148,15 +149,14 @@ public async Task Ignores_and_warns_if_changed_between_runs_and_flag_set()
148149
await migrator.Migrate(); // no exceptions this time
149150
}
150151

151-
string[] scripts;
152152
string sql = $"SELECT text_of_script FROM {Context.Syntax.TableWithSchema("grate", "ScriptsRun")} order by id";
153153

154154
await using var conn = Context.CreateDbConnection(db);
155-
scripts = (await conn.QueryAsync<string>(sql)).ToArray();
155+
var scripts = await conn.QueryAsync<string>(sql);
156156
var result = (await conn.QueryAsync<string>("select col from grate")).Single();
157157

158158

159159
scripts.Should().HaveCount(2); //script marked as run twice
160160
result.Should().Be("1"); // but still the first version of the view
161161
}
162-
}
162+
}

grate.unittests/Generic/Running_MigrationScripts/Order_Of_Scripts.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace grate.unittests.Generic.Running_MigrationScripts;
1313

1414
[TestFixture]
15+
// ReSharper disable once InconsistentNaming
1516
public abstract class Order_Of_Scripts: MigrationsScriptsBase
1617
{
1718
[Test()]
@@ -96,4 +97,4 @@ private GrateMigrator GetMigrator(string databaseName, bool createDatabase)
9697
return Context.GetMigrator(config);
9798

9899
}
99-
}
100+
}

grate.unittests/Generic/Running_MigrationScripts/TokenScripts.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public async Task EnsureTokensAreReplaced()
2121
var db = TestConfig.RandomDatabase().ToUpper();
2222

2323
var knownFolders = KnownFolders.In(CreateRandomTempDirectory());
24-
var path = knownFolders?.Views?.Path ?? throw new Exception("Config Fail");
24+
var path = knownFolders.Views?.Path ?? throw new Exception("Config Fail");
2525
WriteSql(path, "token.sql", CreateDatabaseName);
2626

2727
await using (var migrator = Context.GetMigrator(db, knownFolders))
@@ -42,7 +42,7 @@ public async Task EnsureUserTokensAreReplaced()
4242
var db = TestConfig.RandomDatabase();
4343

4444
var knownFolders = KnownFolders.In(CreateRandomTempDirectory());
45-
var path = knownFolders?.Views?.Path ?? throw new Exception("Config Fail");
45+
var path = knownFolders.Views?.Path ?? throw new Exception("Config Fail");
4646
WriteSql(path, "token.sql", CreateViewMyCustomToken);
4747

4848
var config = Context.GetConfiguration(db, knownFolders) with
@@ -61,4 +61,4 @@ public async Task EnsureUserTokensAreReplaced()
6161
actual.Should().Be("token1");
6262

6363
}
64-
}
64+
}

grate.unittests/Generic/Running_MigrationScripts/Versioning_The_Database.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
namespace grate.unittests.Generic.Running_MigrationScripts;
1010

1111
[TestFixture]
12+
// ReSharper disable once InconsistentNaming
1213
public abstract class Versioning_The_Database : MigrationsScriptsBase
1314
{
1415
[Test]
@@ -37,4 +38,4 @@ public async Task Returns_The_New_Version_Id()
3738
}
3839
}
3940
}
40-
}
41+
}

0 commit comments

Comments
 (0)