Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wickedmachinator committed Jan 17, 2024
1 parent 915fe7d commit 3771b59
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ dotnet_diagnostic.RCS1194.severity = none
# RCS1163: Unused parameter.
dotnet_diagnostic.RCS1163.severity = silent

# RCS1097: Remove redundant 'ToString' call
dotnet_diagnostic.RCS1097.severity = silent

# RCS1239: Use 'for' statement instead of 'while' statement.
dotnet_diagnostic.RCS1239.severity = silent
csharp_style_prefer_primary_constructors = true:suggestion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ private class TableWithOrder
}
}


[EditorBrowsable(EditorBrowsableState.Never)]
public static class ResilientSqlScopeFluent
{
Expand Down
1 change: 0 additions & 1 deletion EtLast.AdoNet/Mutators/MergeToSql/MergeToSqlMutator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ private void ExecuteStatements()
_command = null;
_statements.Clear();
}

}

[EditorBrowsable(EditorBrowsableState.Never)]
Expand Down
1 change: 0 additions & 1 deletion EtLast.Hosting/Logging/EtlContextIoToFileLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ public override Stream OnFileOpened(string path, Stream underlyingStream, Encodi
writer.Flush();
underlyingStream.Flush();
}

}

return base.OnFileOpened(path, underlyingStream, encoding);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ protected override IEnumerable<IRow> EvaluateImpl(Stopwatch netTimeStopwatch)
}

foreach (var row in groupRows)
(row as IRow).SetOwner(null);
(row as IRow)?.SetOwner(null);

foreach (var aggregate in aggregates)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ protected override IEnumerable<IRow> EvaluateImpl(Stopwatch netTimeStopwatch)
}

foreach (var groupRow in groupRows)
(groupRow as IRow).SetOwner(null);
(groupRow as IRow)?.SetOwner(null);

groupRows.Clear();

Expand Down Expand Up @@ -175,7 +175,7 @@ protected override IEnumerable<IRow> EvaluateImpl(Stopwatch netTimeStopwatch)
}

foreach (var groupRow in groupRows)
(groupRow as IRow).SetOwner(null);
(groupRow as IRow)?.SetOwner(null);

groupRows.Clear();

Expand Down
4 changes: 2 additions & 2 deletions EtLast/Processes/Abstracts/AbstractProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ protected void BeginExecution(ICaller caller, FlowState flowState, bool overwrit
.ToHashSet();

var properties = GetType().GetProperties(BindingFlags.Instance | BindingFlags.SetProperty | BindingFlags.Public)
.Where(p => p.SetMethod != null && p.SetMethod.IsPrivate != true && !baseProperties.Contains(p.Name) && p.GetIndexParameters().Length == 0)
.Where(p => p.SetMethod?.IsPrivate == false && !baseProperties.Contains(p.Name) && p.GetIndexParameters().Length == 0)
.ToList();

foreach (var property in properties)
Expand Down Expand Up @@ -178,7 +178,7 @@ public void ValidateParameterAnnotations()
public static void ValidateParameterAnnotations(IProcess process, object instance)
{
var properties = instance.GetType().GetProperties(BindingFlags.Instance | BindingFlags.SetProperty | BindingFlags.Public)
.Where(p => p.SetMethod != null && p.SetMethod.IsPrivate != true && p.GetIndexParameters().Length == 0)
.Where(p => p.SetMethod?.IsPrivate == false && p.GetIndexParameters().Length == 0)
.ToList();

foreach (var property in properties)
Expand Down
1 change: 0 additions & 1 deletion EtLast/Processes/Delimited/WriteToDelimitedMutator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ private class SinkEntry
public required MemoryStream Buffer { get; init; }
public int RowCount = 0;
}

}

[EditorBrowsable(EditorBrowsableState.Never)]
Expand Down
1 change: 1 addition & 0 deletions EtLast/Processes/Json/JsonArrayReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ protected override IEnumerable<IRow> Produce()
}

var entry = enumerator.Current;
entryIndex++;

resultCount++;
initialValues[ColumnName] = entry;
Expand Down
2 changes: 1 addition & 1 deletion EtLast/Rows/Row.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
public sealed class Row(IEtlContext context, IProcess process, long id, IEnumerable<KeyValuePair<string, object>> initialValues) : IRow
{
public IProcess Owner { get; private set; } = process;
public long Id { get; private set; } = id;
public long Id { get; } = id;

public IEnumerable<KeyValuePair<string, object>> Values => _values;
public int ValueCount => _values.Count;
Expand Down
1 change: 0 additions & 1 deletion EtLast/TypeConverters/DoubleConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,4 @@ public static class DoubleConverterFluent
public static ReaderColumn AsDouble(this ReaderColumn column) => column.WithTypeConverter(new DoubleConverter());
public static TextReaderColumn AsDouble(this TextReaderColumn column) => column.WithTypeConverter(new DoubleConverter());
public static IConvertMutatorBuilder_NullStrategy ToDouble(this IConvertMutatorBuilder_WithTypeConverter builder) => builder.WithTypeConverter(new DoubleConverter());

}
1 change: 0 additions & 1 deletion Tests/EtLast.Tests.Unit/Tests/Rows/RowTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public void KeyCaseIgnored()
Assert.AreEqual(new DateTime(2020, 02, 20, 12, 12, 0, 666), result);
}


[TestMethod]
public void SingleNullColumnResultsNullKey()
{
Expand Down

0 comments on commit 3771b59

Please sign in to comment.