Skip to content

Commit

Permalink
Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
martijn00 committed Aug 28, 2023
1 parent 18eed4a commit c421ddb
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,6 @@ csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_style_var_for_built_in_types = true:silent
csharp_style_var_when_type_is_apparent = true:silent
csharp_style_var_elsewhere = true:silent
csharp_style_var_elsewhere = true:silent
csharp_style_prefer_primary_constructors = true:suggestion
csharp_space_around_binary_operators = before_and_after
67 changes: 60 additions & 7 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
# This file is understood by git 1.7.2+.
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto eol=lf

# Check out the following as ln always for osx/linux/cygwin
*.sh text eol=lf

# Windows specific files should always be crlf on checkout
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Check out the following as ln always for osx/linux/cygwin
*.sh text eol=lf

# Opt in the following types to always normalize line endings
# on checkin and always use native endings on checkout.
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
*.config text
*.cs text diff=csharp
*.csproj text
Expand All @@ -24,10 +32,55 @@
*.xaml text
*.xml text

# Binary files
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
*.bmp binary
*.jpeg binary
*.jpg binary
*.nupkg binary
*.png binary
*.sdf binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
2 changes: 1 addition & 1 deletion DSTV.Net.Test/DSTV.Net.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
2 changes: 2 additions & 0 deletions DSTV.Net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DSTV.Net", "DSTV.Net\DSTV.N
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{EAC305B1-31C8-491E-ADF2-246DA316EB5A}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitattributes = .gitattributes
.github\workflows\BUILD_TEST_DSTV_NET.yml = .github\workflows\BUILD_TEST_DSTV_NET.yml
Directory.Build.props = Directory.Build.props
.github\workflows\PUBLISH_PACKAGES.yml = .github\workflows\PUBLISH_PACKAGES.yml
Expand Down
2 changes: 1 addition & 1 deletion DSTV.Net/Extensions/TextReaderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ internal static async Task<int> ParseInteger(this TextReader reader, ReaderConte
/// <summary>
/// Parses an enum of type <see cref="TEnum" />
/// </summary>
/// <typeparam name="TEnum"></typeparam>
/// <typeparam name="TEnum">The type of the Enum which needs to be parsed</typeparam>
/// <param name="reader">An instance of a <see cref="TextReader" /> containing the DSTV source data</param>
/// <param name="context">The active reader context</param>
/// <returns>The integer read or an exception</returns>
Expand Down
6 changes: 5 additions & 1 deletion DSTV.Net/Implementations/BodyReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ namespace DSTV.Net.Implementations;

internal static class BodyReader
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "MA0051:Method is too long", Justification = "<Pending>")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "MA0051:Method is too long", Justification = "Should be cleaned up later")]
public static async Task<IEnumerable<DstvElement>> GetElementsAsync(ReaderContext readerContext)
{
var outputList = new List<DstvElement>();
var elemMap = await GetElementMapAsync(readerContext).ConfigureAwait(false);
// holes & slots
var holeBlocks = elemMap.GetValueOrDefault(ContourType.BO);
if (holeBlocks != null)
{
foreach (var holeNote in holeBlocks.SelectMany(holeList => holeList))
{
try
{
outputList.Add(DstvHole.CreateHole(holeNote));
Expand All @@ -24,6 +26,8 @@ public static async Task<IEnumerable<DstvElement>> GetElementsAsync(ReaderContex
{
Console.WriteLine(dStVParseException);
}
}
}

// outer contours
var outerBorders = elemMap.GetValueOrDefault(ContourType.AK);
Expand Down
2 changes: 1 addition & 1 deletion DSTV.Net/Implementations/HeaderReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ internal sealed class HeaderReader
private const char Space = ' ';
private const char Comment = '*';

[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "MA0051:Method is too long", Justification = "<Pending>")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "MA0051:Method is too long", Justification = "Should be cleaned up later")]
internal static async Task<DstvHeader> ParseAsync(ReaderContext context)
{
var reader = context.Source;
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Meziantou.Analyzer" Version="2.0.58">
<PackageReference Include="Meziantou.Analyzer" Version="2.0.62">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit c421ddb

Please sign in to comment.