-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/code analysis #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gjkaal
wants to merge
6
commits into
main
Choose a base branch
from
feature/code-analysis
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
77d5b26
Use build.props and packages, some rework
gjkaal ae26b8d
formatting
gjkaal d9fe8d5
Merge branch 'main' into feature/code-analysis
gjkaal 44f1b68
Code review changes and fixes
gjkaal c71b5e8
Merge branch 'main' into feature/code-analysis
gjkaal 791c43f
Simplify and remove trailing whitespace
gjkaal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project> | ||
| <PropertyGroup> | ||
| <WarningLevel>6</WarningLevel> | ||
| <WarningsAsErrors></WarningsAsErrors> | ||
| <NoWarn>CS1591;CA5349</NoWarn> | ||
| <Nullable>disable</Nullable> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
| <CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors> | ||
| <RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild> | ||
| <EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild> | ||
| <RunAnalyzersDuringLiveAnalysis>true</RunAnalyzersDuringLiveAnalysis> | ||
| <EnableNETAnalyzers>true</EnableNETAnalyzers> | ||
| <AnalysisLevel>latest</AnalysisLevel> | ||
| <AnalysisMode>All</AnalysisMode> | ||
| <GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
| <Authors>4DotNet</Authors> | ||
| <Title>Whack-A-Mole Core Library</Title> | ||
| <Company>4Dotnet Whack-A-Mole Team</Company> | ||
| <Copyright>(c) 2024 - rights reserved</Copyright> | ||
| <Product>WAM.Core</Product> | ||
| <ProductName>Whack-a-mole core</ProductName> | ||
| <ProductVersion>1.0.0</ProductVersion> | ||
| <LangVersion>12</LangVersion> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup Label ="Dotnet build visibility"> | ||
| <CompilerVisibleProperty Include="RootNamespace" /> | ||
| <CompilerVisibleProperty Include="ProjectDir" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup Label="Analyzers"> | ||
| <PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" /> | ||
| <PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" /> | ||
| <PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" /> | ||
| <PackageReference Include="Roslynator.Analyzers" /> | ||
| <PackageReference Include="Roslynator.CodeAnalysis.Analyzers" /> | ||
| <PackageReference Include="Roslynator.Formatting.Analyzers" /> | ||
| <PackageReference Include="SonarAnalyzer.CSharp" /> | ||
| <PackageReference Include="AsyncFixer" /> | ||
| <PackageReference Include="Microsoft.EntityFrameworkCore.Analyzers" /> | ||
| <PackageReference Include="Microsoft.Azure.Functions.Analyzers" /> | ||
| <PackageReference Include="Microsoft.AspNetCore.Components.Analyzers" /> | ||
| </ItemGroup> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| <Project> | ||
| <PropertyGroup> | ||
| <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
| <CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <PackageVersion Include="Azure.Identity" Version="1.10.4" /> | ||
| <PackageVersion Include="Azure.Messaging.WebPubSub" Version="1.3.0" /> | ||
| <PackageVersion Include="HexMaster.RedisCache" Version="0.1.6" /> | ||
| <PackageVersion Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" /> | ||
| <PackageVersion Include="Microsoft.Azure.AppConfiguration.AspNetCore" Version="7.0.0" /> | ||
| <PackageVersion Include="Microsoft.Extensions.Azure" Version="1.7.1" /> | ||
| <PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" /> | ||
| <PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" /> | ||
| <PackageVersion Include="Microsoft.Extensions.Options" Version="8.0.1" /> | ||
| <PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" /> | ||
| <PackageVersion Include="Newtonsoft.Json" Version="13.0.3" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup Label="Analyzers"> | ||
| <PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0"> | ||
| <PrivateAssets>all</PrivateAssets> | ||
| <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
| </PackageVersion> | ||
| <PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.8.14"> | ||
| <PrivateAssets>all</PrivateAssets> | ||
| <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
| </PackageVersion> | ||
| <PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.8.0"> | ||
| <PrivateAssets>all</PrivateAssets> | ||
| <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
| </PackageVersion> | ||
| <PackageVersion Include="Roslynator.Analyzers" Version="4.9.0"> | ||
| <PrivateAssets>all</PrivateAssets> | ||
| <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
| </PackageVersion> | ||
| <PackageVersion Include="Roslynator.CodeAnalysis.Analyzers" Version="4.9.0"> | ||
| <PrivateAssets>all</PrivateAssets> | ||
| <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
| </PackageVersion> | ||
| <PackageVersion Include="Roslynator.Formatting.Analyzers" Version="4.9.0"> | ||
| <PrivateAssets>all</PrivateAssets> | ||
| <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
| </PackageVersion> | ||
| <PackageVersion Include="SonarAnalyzer.CSharp" Version="9.17.0.82934"> | ||
| <PrivateAssets>all</PrivateAssets> | ||
| <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
| </PackageVersion> | ||
| <PackageVersion Include="AsyncFixer" Version="1.6.0"> | ||
| <PrivateAssets>all</PrivateAssets> | ||
| <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
| </PackageVersion> | ||
| <PackageVersion Include="Microsoft.EntityFrameworkCore.Analyzers" Version="8.0.1"> | ||
| <PrivateAssets>all</PrivateAssets> | ||
| <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
| </PackageVersion> | ||
| <PackageVersion Include="Microsoft.Azure.Functions.Analyzers" Version="1.0.0"> | ||
| <PrivateAssets>all</PrivateAssets> | ||
| <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
| </PackageVersion> | ||
| <PackageVersion Include="Microsoft.AspNetCore.Components.Analyzers" Version="8.0.1"> | ||
| <PrivateAssets>all</PrivateAssets> | ||
| <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
| </PackageVersion> | ||
| </ItemGroup> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,17 @@ | ||
| namespace Wam.Core.ExtensionMethods; | ||
| using System.Security.Cryptography; | ||
| namespace Wam.Core.ExtensionMethods; | ||
|
|
||
| public static class StringExtensions | ||
| { | ||
| private const string Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; | ||
| private static readonly Random Random; | ||
|
|
||
| public static string GenerateGameCode(int length = 6) | ||
| { | ||
| var result = new string( | ||
| Enumerable.Repeat(Chars, length) | ||
| .Select(s => s[Random.Next(s.Length)]) | ||
| .ToArray()); | ||
| Enumerable | ||
| .Repeat(Chars, length) | ||
| .Select(s => s[RandomNumberGenerator.GetInt32(s.Length)]) | ||
| .ToArray()); | ||
| return result; | ||
| } | ||
|
|
||
| static StringExtensions() | ||
| { | ||
| Random = new Random(); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.