From 05ec77ed28124aa7f941ad128e837f4f88985e9f Mon Sep 17 00:00:00 2001 From: Guilherme Branco Stracini Date: Thu, 18 Jul 2024 00:45:04 +0100 Subject: [PATCH] Initial commit --- .config/dotnet-tools.json | 12 + .csharpierrc.yaml | 1 + .deepsource.toml | 11 + .githooks/pre-commit | 16 + .github/dependabot.yml | 30 ++ .github/workflows/build.yml | 36 ++ .github/workflows/deep-source.yml | 33 ++ .github/workflows/infisical-secrets-check.yml | 112 +++++ .github/workflows/linter.yml | 24 ++ .github/workflows/size-label.yml | 17 + .gitignore | 398 ++++++++++++++++++ .wakatime-project | 1 + CODE_OF_CONDUCT.md | 128 ++++++ LICENSE | 21 + POCTemplate.sln | 36 ++ README.md | 9 + Src/POCTemplate/POCTemplate.csproj | 10 + Src/POCTemplate/Program.cs | 10 + .../POCTemplate.Tests.csproj | 34 ++ Tests/POCTemplate.Tests/UnitTest1.cs | 18 + _cofing.yml | 4 + 21 files changed, 961 insertions(+) create mode 100644 .config/dotnet-tools.json create mode 100644 .csharpierrc.yaml create mode 100644 .deepsource.toml create mode 100644 .githooks/pre-commit create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/deep-source.yml create mode 100644 .github/workflows/infisical-secrets-check.yml create mode 100644 .github/workflows/linter.yml create mode 100644 .github/workflows/size-label.yml create mode 100644 .gitignore create mode 100644 .wakatime-project create mode 100644 CODE_OF_CONDUCT.md create mode 100644 LICENSE create mode 100644 POCTemplate.sln create mode 100644 README.md create mode 100644 Src/POCTemplate/POCTemplate.csproj create mode 100644 Src/POCTemplate/Program.cs create mode 100644 Tests/POCTemplate.Tests/POCTemplate.Tests.csproj create mode 100644 Tests/POCTemplate.Tests/UnitTest1.cs create mode 100644 _cofing.yml diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000..b0f5df2 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "csharpier": { + "version": "0.28.2", + "commands": [ + "dotnet-csharpier" + ] + } + } + } \ No newline at end of file diff --git a/.csharpierrc.yaml b/.csharpierrc.yaml new file mode 100644 index 0000000..08d362d --- /dev/null +++ b/.csharpierrc.yaml @@ -0,0 +1 @@ +endOfLine: auto diff --git a/.deepsource.toml b/.deepsource.toml new file mode 100644 index 0000000..696c59c --- /dev/null +++ b/.deepsource.toml @@ -0,0 +1,11 @@ +version = 1 + +[[analyzers]] +name = "test-coverage" +enabled = true + +[[analyzers]] +name = "secrets" + +[[analyzers]] +name = "csharp" diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100644 index 0000000..1e35e43 --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +LC_ALL=C + +local_branch="$(git rev-parse --abbrev-ref HEAD)" + +valid_branch_regex="^(dependabot|feature|fix|docs|style|refactor|perf|hotfix|test|chore|create)(\/[a-zA-Z0-9._-]+)+$" + +message="There is something wrong with your branch name. Branch names in this project must adhere to this contract: $valid_branch_regex. Your commit will be rejected. You should rename your branch to a valid name and try again." + +if [[ ! $local_branch =~ $valid_branch_regex ]] +then + echo "$message" + exit 1 +fi + +dotnet tool restore && dotnet csharpier . --check \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8747709 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,30 @@ +version: 2 + +updates: +- package-ecosystem: "nuget" + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 50 + assignees: + - "guibranco" + reviewers: + - "guibranco" + labels: + - "nuget" + - ".NET" + - "packages" + - "dependencies" + +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: weekly + open-pull-requests-limit: 50 + assignees: + - "guibranco" + reviewers: + - "guibranco" + labels: + - "github-actions" + - "dependencies" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b10cb82 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build + +on: + push: + branches: + - '*' + - '*/*' + - '**' + - '!main' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + + - name: Build solution + run: dotnet build -c Debug + + - name: Run tests + run: dotnet test -c Debug --no-build --no-restore diff --git a/.github/workflows/deep-source.yml b/.github/workflows/deep-source.yml new file mode 100644 index 0000000..32d9cd8 --- /dev/null +++ b/.github/workflows/deep-source.yml @@ -0,0 +1,33 @@ +name: Deep Source + +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] + +jobs: + DeepSource: + name: Deep Source Coverage report + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Install DeepSource scanner + run: curl https://deepsource.io/cli | sh + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '7.0.x' + + - name: Build and analyze + env: + DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} + run: | + dotnet build -c Debug --verbosity minimal + dotnet test -c Debug --verbosity minimal --no-build --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat="cobertura" + ./bin/deepsource report --analyzer test-coverage --key csharp --value-file ./Tests/POCTemplate.Tests/coverage.cobertura.xml diff --git a/.github/workflows/infisical-secrets-check.yml b/.github/workflows/infisical-secrets-check.yml new file mode 100644 index 0000000..a298aad --- /dev/null +++ b/.github/workflows/infisical-secrets-check.yml @@ -0,0 +1,112 @@ +name: Infisical secrets check + +on: + workflow_dispatch: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + + secrets-scan: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set Infisical package source + shell: bash + run: curl -1sLf 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.deb.sh' | sudo -E bash + + - name: Install tools + shell: bash + run: | + sudo apt-get update && sudo apt-get install -y infisical + pip install csvkit + npm install -g csv-to-markdown-table + + - name: Run scan + shell: bash + run: infisical scan --redact -f csv -r secrets-result-raw.csv 2>&1 | tee >(sed -r 's/\x1b\[[0-9;]*m//g' >secrets-result.log) + + - name: Generate report + shell: bash + if: failure() + run: | + if [[ -s secrets-result-raw.csv ]]; then + csvformat -M $'\r' secrets-result-raw.csv | sed -e ':a' -e 'N;$!ba' -e 's/\n/\\n/g' | tr '\r' '\n' | head -n 11 >secrets-result.csv + csv-to-markdown-table --delim , --headers secrets-result.md + fi + + - name: Upload artifacts secrets-result.log + uses: actions/upload-artifact@v4 + if: always() + with: + name: report-log + path: secrets-result.log + + - name: Upload artifacts secrets-result.csv + uses: actions/upload-artifact@v4 + if: failure() + with: + name: report-csv + path: secrets-result.csv + + - name: Upload artifacts secrets-result.md + uses: actions/upload-artifact@v4 + if: failure() + with: + name: report-md + path: secrets-result.md + + - name: Read secrets-result.log + uses: guibranco/github-file-reader-action-v2@v2.2.599 + if: always() + id: log + with: + path: secrets-result.log + + - name: Read secrets-result.md + uses: guibranco/github-file-reader-action-v2@v2.2.599 + if: failure() + id: report + with: + path: secrets-result.md + + - name: Update PR with comment + uses: mshick/add-pr-comment@v2 + if: always() + with: + refresh-message-position: true + message-id: 'secrets-result' + message: | + **Infisical secrets check:** :white_check_mark: No secrets leaked! + + **Scan results:** + ``` + ${{ steps.log.outputs.contents }} + ``` + message-failure: | + **Infisical secrets check:** :rotating_light: Secrets leaked! + + **Scan results:** + ``` + ${{ steps.log.outputs.contents }} + ``` + +
+ 🔎 Detected secrets in your GIT history + + ${{ steps.report.outputs.contents }} + +
+ message-cancelled: | + **Infisical secrets check:** :o: Secrets check cancelled! diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..9aeb30b --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,24 @@ +name: Linter check + +on: + workflow_dispatch: + pull_request: + +jobs: + linter-check: + runs-on: ubuntu-latest + steps: + + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + + - name: Dotnet restore + run: dotnet tool restore + + - name: CSharpier format check + run: | + dotnet csharpier . --check + echo "run 'dotnet build' to fix the formatting of the code automatically" diff --git a/.github/workflows/size-label.yml b/.github/workflows/size-label.yml new file mode 100644 index 0000000..3626b3c --- /dev/null +++ b/.github/workflows/size-label.yml @@ -0,0 +1,17 @@ +name: Label based on PR size + +on: + workflow_dispatch: + pull_request: + +jobs: + size-label: + permissions: write-all + runs-on: ubuntu-latest + + steps: + + - name: size-label + uses: "pascalgn/size-label-action@v0.5.2" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8a30d25 --- /dev/null +++ b/.gitignore @@ -0,0 +1,398 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml diff --git a/.wakatime-project b/.wakatime-project new file mode 100644 index 0000000..590c14b --- /dev/null +++ b/.wakatime-project @@ -0,0 +1 @@ +POC .NET template \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..f62c95b --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +code-of-conduct@straccini.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..10a8568 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Guilherme Branco Stracini + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/POCTemplate.sln b/POCTemplate.sln new file mode 100644 index 0000000..5eebf2d --- /dev/null +++ b/POCTemplate.sln @@ -0,0 +1,36 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Src", "Src", "{CCFE3371-AE28-446A-B8D1-8D1027A2D23B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "POCTemplate", "Src\POCTemplate\POCTemplate.csproj", "{5E214FC8-0D9B-4DD7-B952-DA994D094EC4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{279F38EF-A29A-48E2-9201-BA9D5BACAF5B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "POCTemplate.Tests", "Tests\POCTemplate.Tests\POCTemplate.Tests.csproj", "{43CA48B4-6FC2-425E-82AF-19B643029326}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5E214FC8-0D9B-4DD7-B952-DA994D094EC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5E214FC8-0D9B-4DD7-B952-DA994D094EC4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5E214FC8-0D9B-4DD7-B952-DA994D094EC4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5E214FC8-0D9B-4DD7-B952-DA994D094EC4}.Release|Any CPU.Build.0 = Release|Any CPU + {43CA48B4-6FC2-425E-82AF-19B643029326}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {43CA48B4-6FC2-425E-82AF-19B643029326}.Debug|Any CPU.Build.0 = Debug|Any CPU + {43CA48B4-6FC2-425E-82AF-19B643029326}.Release|Any CPU.ActiveCfg = Release|Any CPU + {43CA48B4-6FC2-425E-82AF-19B643029326}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {5E214FC8-0D9B-4DD7-B952-DA994D094EC4} = {CCFE3371-AE28-446A-B8D1-8D1027A2D23B} + {43CA48B4-6FC2-425E-82AF-19B643029326} = {279F38EF-A29A-48E2-9201-BA9D5BACAF5B} + EndGlobalSection +EndGlobal diff --git a/README.md b/README.md new file mode 100644 index 0000000..b175c83 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# PoC .NET template + +A template repository for .NET PoC (Proof of Concept) + +--- + +- Create a new repository using this one as a template (click the green button at the top right of this page). +- Edit [README.md](README.md) file to align with your PoC. +- Change the solution and projects to suit your investigation/test/concept. diff --git a/Src/POCTemplate/POCTemplate.csproj b/Src/POCTemplate/POCTemplate.csproj new file mode 100644 index 0000000..2150e37 --- /dev/null +++ b/Src/POCTemplate/POCTemplate.csproj @@ -0,0 +1,10 @@ + + + + Exe + net8.0 + enable + enable + + + diff --git a/Src/POCTemplate/Program.cs b/Src/POCTemplate/Program.cs new file mode 100644 index 0000000..a01014d --- /dev/null +++ b/Src/POCTemplate/Program.cs @@ -0,0 +1,10 @@ +namespace POCTemplate; + +internal static class Program +{ + public static void Main() + { + // This is a placeholder for the main entry point of the application. + Console.WriteLine("Hello, World!"); + } +} diff --git a/Tests/POCTemplate.Tests/POCTemplate.Tests.csproj b/Tests/POCTemplate.Tests/POCTemplate.Tests.csproj new file mode 100644 index 0000000..25b1502 --- /dev/null +++ b/Tests/POCTemplate.Tests/POCTemplate.Tests.csproj @@ -0,0 +1,34 @@ + + + + net8.0 + enable + enable + + false + true + + + + + runtime; build; native; contentfiles; analyzers + all + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + diff --git a/Tests/POCTemplate.Tests/UnitTest1.cs b/Tests/POCTemplate.Tests/UnitTest1.cs new file mode 100644 index 0000000..9e1df13 --- /dev/null +++ b/Tests/POCTemplate.Tests/UnitTest1.cs @@ -0,0 +1,18 @@ +using FluentAssertions; + +namespace POCTemplate.Tests; + +public class UnitTest1 +{ + [Fact] + public void Test1() + { + // Arrange + const bool expected = true; + + // Act + + // Assert + expected.Should().BeTrue(); + } +} diff --git a/_cofing.yml b/_cofing.yml new file mode 100644 index 0000000..f3b9ae4 --- /dev/null +++ b/_cofing.yml @@ -0,0 +1,4 @@ +theme: jekyll-theme-cayman +title: PoC .NET - template +description: 🔬 Proof of Concept template repository for .NET +show_downloads: true \ No newline at end of file