Skip to content

Commit

Permalink
fix: Added documentation as a website.
Browse files Browse the repository at this point in the history
  • Loading branch information
hennadiilu authored Mar 30, 2024
1 parent 7b67bf7 commit b07a148
Show file tree
Hide file tree
Showing 17 changed files with 174 additions and 192 deletions.
19 changes: 0 additions & 19 deletions .axoCover/settings.json

This file was deleted.

8 changes: 8 additions & 0 deletions .github/workflows/pr-net.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: "PR: .NET"

on:
pull_request:

jobs:
Checks:
uses: Heleonix/workflows/.github/workflows/pr-net.yml@main
18 changes: 18 additions & 0 deletions .github/workflows/release-net-nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Release: .NET / NuGet"

permissions:
contents: write

on:
push:
branches:
- master
paths:
- 'src/**'
- 'LICENSE'
- 'README.md'

jobs:
Release:
uses: Heleonix/workflows/.github/workflows/release-net-nuget.yml@main
secrets: inherit
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -321,5 +321,8 @@ ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog

# Visual Studio 2022 folders
Visual Studio 2022/

# Custom
Hxb-Artifacts/
Hx_Artifacts/
47 changes: 47 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<Project>
<PropertyGroup>
<Version>1.0.0</Version>
<Description>Provides performant guard functionality for methods to throw exceptions</Description>
<PackageTags>Heleonix guard throw codecontract</PackageTags>

<Authors>Heleonix - Hennadii Lutsyshyn</Authors>
<Copyright>Copyright (c) Heleonix - Hennadii Lutsyshyn</Copyright>

<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/Heleonix/Heleonix.Guard</RepositoryUrl>
<PackageProjectUrl>https://heleonix.github.io/docs/Heleonix.Guard/</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/Heleonix/docs/master/images/heleonix-logos/Heleonix-logo-128x128.jpg</PackageIconUrl>

<NoWarn>NU5048</NoWarn>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\LICENSE" Pack="true" PackagePath="/"/>
<None Include="..\..\README.md" Pack="true" PackagePath="/"/>
</ItemGroup>

<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NeutralLanguage>en-US</NeutralLanguage>
<SatelliteResourceLanguages>en-US</SatelliteResourceLanguages>
</PropertyGroup>

<ItemGroup>
<AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
</Project>
57 changes: 0 additions & 57 deletions Heleonix.Guard.Tests/Heleonix.Guard.Tests.csproj

This file was deleted.

41 changes: 25 additions & 16 deletions Heleonix.Guard.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,53 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32901.215
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heleonix.Guard", "Heleonix.Guard\Heleonix.Guard.csproj", "{B744C864-3D66-4CCA-82DD-E9BD2B92036F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{821F4DCA-092C-422A-AF03-522FDCFF5065}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
Directory.Build.props = Directory.Build.props
LICENSE = LICENSE
README.md = README.md
stylecop.json = stylecop.json
SharedPackageInfo.props = SharedPackageInfo.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heleonix.Guard.Tests", "Heleonix.Guard.Tests\Heleonix.Guard.Tests.csproj", "{B35408E2-D592-4157-997A-21611F54D54D}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{412A5D12-9FA9-4FC3-B9CC-5B7042B3DED6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{EAC2C115-3FA8-481B-9A34-F9058125539E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heleonix.Guard", "src\Heleonix.Guard\Heleonix.Guard.csproj", "{1AC77BB5-CD6B-4009-9663-24E259DA34EF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sources", "Sources", "{412A5D12-9FA9-4FC3-B9CC-5B7042B3DED6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Heleonix.Guard.Tests", "test\Heleonix.Guard.Tests\Heleonix.Guard.Tests.csproj", "{E67AD807-BA0A-4D3F-BFD6-0482730581FE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{EAC2C115-3FA8-481B-9A34-F9058125539E}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{BA7910C8-0995-44B3-883C-ED7BA3CE6DAB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{BBFEADAC-4EBA-4622-B51D-27EC613EDB30}"
ProjectSection(SolutionItems) = preProject
.github\workflows\pr-net.yml = .github\workflows\pr-net.yml
.github\workflows\release-net-nuget.yml = .github\workflows\release-net-nuget.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B744C864-3D66-4CCA-82DD-E9BD2B92036F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B744C864-3D66-4CCA-82DD-E9BD2B92036F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B744C864-3D66-4CCA-82DD-E9BD2B92036F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B744C864-3D66-4CCA-82DD-E9BD2B92036F}.Release|Any CPU.Build.0 = Release|Any CPU
{B35408E2-D592-4157-997A-21611F54D54D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B35408E2-D592-4157-997A-21611F54D54D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B35408E2-D592-4157-997A-21611F54D54D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B35408E2-D592-4157-997A-21611F54D54D}.Release|Any CPU.Build.0 = Release|Any CPU
{1AC77BB5-CD6B-4009-9663-24E259DA34EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1AC77BB5-CD6B-4009-9663-24E259DA34EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1AC77BB5-CD6B-4009-9663-24E259DA34EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1AC77BB5-CD6B-4009-9663-24E259DA34EF}.Release|Any CPU.Build.0 = Release|Any CPU
{E67AD807-BA0A-4D3F-BFD6-0482730581FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E67AD807-BA0A-4D3F-BFD6-0482730581FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E67AD807-BA0A-4D3F-BFD6-0482730581FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E67AD807-BA0A-4D3F-BFD6-0482730581FE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{B744C864-3D66-4CCA-82DD-E9BD2B92036F} = {412A5D12-9FA9-4FC3-B9CC-5B7042B3DED6}
{B35408E2-D592-4157-997A-21611F54D54D} = {EAC2C115-3FA8-481B-9A34-F9058125539E}
{1AC77BB5-CD6B-4009-9663-24E259DA34EF} = {412A5D12-9FA9-4FC3-B9CC-5B7042B3DED6}
{E67AD807-BA0A-4D3F-BFD6-0482730581FE} = {EAC2C115-3FA8-481B-9A34-F9058125539E}
{BBFEADAC-4EBA-4622-B51D-27EC613EDB30} = {BA7910C8-0995-44B3-883C-ED7BA3CE6DAB}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {573294B1-A3DA-448C-82D2-32CBD25BDE69}
Expand Down
53 changes: 0 additions & 53 deletions Heleonix.Guard/Heleonix.Guard.csproj

This file was deleted.

9 changes: 0 additions & 9 deletions Heleonix.Guard/Properties/AssemblyProperties.cs

This file was deleted.

25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Heleonix.Guard

[![Release: .NET / NuGet](https://github.com/Heleonix/Heleonix.Guard/actions/workflows/release-net-nuget.yml/badge.svg)](https://github.com/Heleonix/Heleonix.Guard/actions/workflows/release-net-nuget.yml)

Provides performant guard functionality for methods to throw exceptions

## Install

https://www.nuget.org/packages/Heleonix.Guard

## Documentation

See [Heleonix.Guard](https://heleonix.github.io/docs/Heleonix.Guard)

## Example

```csharp
Expand Down Expand Up @@ -72,3 +78,22 @@ and then use it, for example, as below:
```csharp
Throw.MyCustomException(when: param1.IsZero() || param2.IsNullOrEmpty() || paramN.IsNull(), "some message");
```

## Contribution Guideline

1. [Create a fork](https://github.com/Heleonix/Heleonix.Guard/fork) from the main repository
2. Implement whatever is needed
3. [Create a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).
Make sure the assigned [Checks](https://github.com/Heleonix/Heleonix.Guard/actions/workflows/pr-net.yml) pass successfully.
4. [Request review](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review) from the code owner
5. Once approved, merge your Pull Request via [Squash and merge](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-commits)

> **IMPORTANT**
> While merging, enter a [Conventional Commits](https://www.conventionalcommits.org/) commit message.
> This commit message will be used in automatically generated [Github Release Notes](https://github.com/Heleonix/Heleonix.Guard/releases)
> and [NuGet Release Notes](https://www.nuget.org/packages/Heleonix.Guard/#releasenotes-body-tab)
5. Monitor the [Release: .NET / NuGet](https://github.com/Heleonix/Heleonix.Guard/actions/workflows/release-net-nuget.yml)
GitHub workflow to make sure your changes are delivered successfully
5. In case of any issues, please contact [heleonix.sln@gmail.com](mailto:heleonix.sln@gmail.com)
5.
33 changes: 0 additions & 33 deletions SharedPackageInfo.props

This file was deleted.

File renamed without changes.
19 changes: 19 additions & 0 deletions src/Heleonix.Guard/Heleonix.Guard.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="$(AssemblyName).Tests" />
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
<PackageReference Include="codecracker.CSharp" Version="1.1.0" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
<PackageReference Include="SecurityCodeScan.VS2019" Version="5.6.7" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.23.0.88079" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
</ItemGroup>
</Project>
File renamed without changes.
Loading

0 comments on commit b07a148

Please sign in to comment.