Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
lekman committed Aug 11, 2023
1 parent 07d8140 commit b627776
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ dotnet_diagnostic.SA1503.severity = None
dotnet_diagnostic.SA1636.severity = None
dotnet_diagnostic.SA1640.severity = None

# Allow new() constructor simplification
dotnet_diagnostic.SA1000.severity = None

##
## SonarAnalyzers.CSharp
##
Expand Down
10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recommendations": [
"ms-dotnettools.csharp",
"streetsidesoftware.code-spell-checker",
"davidanson.vscode-markdownlint",
"josefpihrt-vscode.roslynator",
"sonarsource.sonarlint-vscode",
"editorconfig.editorconfig"
]
}
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@
"reporttypes",
"targetdir",
"Xunit"
]
],
"editor.formatOnSave": true,
"prettier.documentSelectors": ["**/*.cs"]
}
17 changes: 17 additions & 0 deletions AzureLiquid.Preview/PreviewProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,19 @@ namespace AzureLiquid.Preview
/// </summary>
public class PreviewProcess
{
/// <summary>
/// Handles writing console output to private persisted log.
/// </summary>
private readonly StringWriter _writer = new();

/// <summary>
/// Detects file system changes to the content file.
/// </summary>
private FileSystemWatcher? _contentWatcher;

/// <summary>
/// Detects file system changes to the template file.
/// </summary>
private FileSystemWatcher? _templateWatcher;

private readonly StringWriter _writer = new();

Check failure on line 31 in AzureLiquid.Preview/PreviewProcess.cs

View workflow job for this annotation

GitHub Actions / Unit Tests / Build and Test

The type 'PreviewProcess' already contains a definition for '_writer'

Check failure on line 31 in AzureLiquid.Preview/PreviewProcess.cs

View workflow job for this annotation

GitHub Actions / Unit Tests / Build and Test

The type 'PreviewProcess' already contains a definition for '_writer'
Expand Down Expand Up @@ -45,6 +56,12 @@ public PreviewProcess()
/// </value>
public string Content { get; set; }

/// <summary>
/// Gets the console output from the last render.
/// </summary>
/// <returns>The console output.</returns>
public string Log => _writer.ToString();

/// <summary>
/// Gets or sets the output.
/// </summary>
Expand Down
5 changes: 5 additions & 0 deletions AzureLiquid.Tests/AzureLiquid.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="Roslynator.Analyzers" Version="4.4.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Roslynator.Core" Version="4.4.0" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.7.0.75501">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down

0 comments on commit b627776

Please sign in to comment.