Skip to content

Commit

Permalink
code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Dec 2, 2023
1 parent 0f1d028 commit 23878cc
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
3 changes: 3 additions & 0 deletions starsky/starsky.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<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">
<s:Boolean x:Key="/Default/CodeEditing/ContextActionTable/DisabledContextActions/=JetBrains_002EReSharper_002EIntentions_002EContextActions_002ECommentSelectionAction/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeEditing/ContextActionTable/DisabledContextActions/=JetBrains_002EReSharper_002EIntentions_002ECSharp_002EContextActions_002EComments_002EDeleteCommentAction/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeEditing/ContextActionTable/DisabledContextActions/=JetBrains_002EReSharper_002EIntentions_002ERazor_002EContextActions_002EComments_002EDeleteCommentAction/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=accountmanagement/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=databasetelemetry/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=exiftool/@EntryIndexedValue">True</s:Boolean>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void FeaturesViewTest()
fakeIMoveToTrashService, new AppSettings());

// Act
var result = appSettingsFeaturesController.FeaturesView() as JsonResult;;
var result = appSettingsFeaturesController.FeaturesView() as JsonResult;
var json = result?.Value as EnvFeaturesViewModel;
Assert.IsNotNull(json);

Expand Down
9 changes: 3 additions & 6 deletions starsky/starskytest/FakeMocks/AppSettingsReflection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@ public static void Modify(AppSettings inputObject, string methodGetName = "get_D
foreach ( var property in type.GetProperties(BindingFlags.Public
| BindingFlags.Instance | BindingFlags.DeclaredOnly)) {
var getMethod = property.GetGetMethod(false);
if (getMethod.GetBaseDefinition() == getMethod) {
if ( methodGetName == getMethod.Name )
{
property.SetValue(inputObject, value, null);
}
}
if ( getMethod?.GetBaseDefinition() != getMethod ) continue;
if ( methodGetName != getMethod?.Name ) continue;
property.SetValue(inputObject, value, null);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ public void AppSettingsProviderTest_SqLiteFullPathStarskyCliTest()
public void AppSettingsProviderTest_SQLite_ExpectException()
{
_appSettings.DatabaseType = AppSettings.DatabaseTypeList.Sqlite;
var datasource = _appSettings.SqLiteFullPath(string.Empty, null);
// should give exception
_appSettings.SqLiteFullPath(string.Empty, null);
}

[TestMethod]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void CreateZip_Creates_Valid_Zip_File()
File.Delete(path);
}

using var archive = ZipFile.OpenRead(result);
var archive = ZipFile.OpenRead(result);
Assert.AreEqual(filePaths.Count, archive.Entries.Count);

for (var i = 0; i < filePaths.Count; i++)
Expand Down

0 comments on commit 23878cc

Please sign in to comment.