Skip to content

Commit b9d9349

Browse files
committed
Add husky to main project
1 parent 0bd288c commit b9d9349

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

build/_build.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,4 @@
1515
<PackageDownload Include="GitVersion.CommandLine" Version="[5.12.0]" />
1616
<PackageDownload Include="GitVersion.Tool" Version="[5.12.0]" />
1717
</ItemGroup>
18-
<Target Name="Husky" BeforeTargets="Restore;CollectPackageReferences" Condition="'$(HUSKY)' != 0">
19-
<Exec Command="dotnet tool restore" StandardOutputImportance="Low" StandardErrorImportance="High" />
20-
<Exec Command="dotnet husky install" StandardOutputImportance="Low" StandardErrorImportance="High" WorkingDirectory=".." />
21-
</Target>
2218
</Project>

src/DotnetDispatcher/DispatcherBase.cs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,19 @@
33

44
// ReSharper disable UnusedMember.Global
55

6-
namespace DotnetDispatcher.Core
6+
namespace DotnetDispatcher.Core;
7+
8+
public abstract class DispatcherBase
79
{
8-
public abstract class DispatcherBase
9-
{
10-
private readonly IServiceProvider _serviceProvider;
10+
private readonly IServiceProvider _serviceProvider;
1111

12-
protected DispatcherBase(IServiceProvider serviceProvider)
13-
{
14-
_serviceProvider = serviceProvider;
15-
}
12+
protected DispatcherBase(IServiceProvider serviceProvider)
13+
{
14+
_serviceProvider = serviceProvider;
15+
}
1616

17-
protected T Get<T>()
18-
{
19-
return _serviceProvider.GetRequiredService<T>();
20-
}
17+
protected T Get<T>()
18+
{
19+
return _serviceProvider.GetRequiredService<T>();
2120
}
22-
}
21+
}

src/DotnetDispatcher/DotnetDispatcher.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,10 @@
3232
<ItemGroup>
3333
<None Include="$(OutputPath)\DotnetDispatcher.Generator.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
3434
</ItemGroup>
35+
36+
<Target Name="Husky" BeforeTargets="Restore;CollectPackageReferences" Condition="'$(HUSKY)' != 0">
37+
<Exec Command="dotnet tool restore" StandardOutputImportance="Low" StandardErrorImportance="High" />
38+
<Exec Command="dotnet husky install" StandardOutputImportance="Low" StandardErrorImportance="High" WorkingDirectory="..\.." />
39+
</Target>
40+
3541
</Project>

0 commit comments

Comments
 (0)