Skip to content

Commit cf8fb6a

Browse files
committed
Revamp structure, apply oss template, cleanup projects/imports
1 parent 9061bfc commit cf8fb6a

File tree

145 files changed

+1161
-267
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+1161
-267
lines changed

.editorconfig

+96-16
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,109 @@
1-
; EditorConfig to support per-solution formatting.
2-
; Use the EditorConfig VS add-in to make this work.
3-
; http://editorconfig.org/
1+
# EditorConfig is awesome:http://EditorConfig.org
42

5-
; This is the default for the codeline.
3+
# top-most EditorConfig file
64
root = true
75

6+
# Don't use tabs for indentation.
87
[*]
9-
end_of_line = CRLF
8+
indent_style = space
9+
# (Please don't specify an indent_size here; that has too many unintended consequences.)
1010

11-
[*.{cs,txt,md}]
12-
indent_style = tab
11+
# Code files
12+
[*.{cs,csx,vb,vbx}]
1313
indent_size = 4
1414

15-
[*.{sln,proj,csproj,fsproj,vbproj,props,targets,xml,xdoc,config,nuspec}]
16-
indent_style = tab
15+
# Xml project files
16+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,msbuildproj,props,targets}]
1717
indent_size = 2
1818

19-
[*.Designer.cs]
20-
indent_style = space
21-
indent_size = 4
19+
# Xml config files
20+
[*.{ruleset,config,nuspec,resx,vsixmanifest,vsct}]
21+
indent_size = 2
2222

23-
[*.resx]
24-
indent_style = space
23+
# YAML files
24+
[*.{yaml,yml}]
2525
indent_size = 2
2626

27-
[appveyor.yml]
28-
indent_style = space
27+
# JSON files
28+
[*.json]
2929
indent_size = 2
30+
31+
# Dotnet code style settings:
32+
[*.{cs,vb}]
33+
# Sort using and Import directives with System.* appearing first
34+
dotnet_sort_system_directives_first = true
35+
# Avoid "this." and "Me." if not necessary
36+
dotnet_style_qualification_for_field = false:suggestion
37+
dotnet_style_qualification_for_property = false:suggestion
38+
dotnet_style_qualification_for_method = false:suggestion
39+
dotnet_style_qualification_for_event = false:suggestion
40+
41+
# Use language keywords instead of framework type names for type references
42+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
43+
dotnet_style_predefined_type_for_member_access = true:suggestion
44+
45+
# Suggest more modern language features when available
46+
dotnet_style_object_initializer = true:suggestion
47+
dotnet_style_collection_initializer = true:suggestion
48+
dotnet_style_coalesce_expression = true:suggestion
49+
dotnet_style_null_propagation = true:suggestion
50+
dotnet_style_explicit_tuple_names = true:suggestion
51+
52+
# CSharp code style settings:
53+
54+
# IDE0040: Add accessibility modifiers
55+
dotnet_style_require_accessibility_modifiers = omit_if_default:error
56+
57+
# IDE0040: Add accessibility modifiers
58+
dotnet_diagnostic.IDE0040.severity = error
59+
60+
[*.cs]
61+
# Top-level files are definitely OK
62+
csharp_using_directive_placement = outside_namespace:silent
63+
csharp_style_namespace_declarations = block_scoped:silent
64+
csharp_prefer_simple_using_statement = true:suggestion
65+
csharp_prefer_braces = true:silent
66+
67+
# Prefer "var" everywhere
68+
csharp_style_var_for_built_in_types = true:suggestion
69+
csharp_style_var_when_type_is_apparent = true:suggestion
70+
csharp_style_var_elsewhere = true:suggestion
71+
72+
# Prefer method-like constructs to have an expression-body
73+
csharp_style_expression_bodied_methods = true:none
74+
csharp_style_expression_bodied_constructors = true:none
75+
csharp_style_expression_bodied_operators = true:none
76+
77+
# Prefer property-like constructs to have an expression-body
78+
csharp_style_expression_bodied_properties = true:none
79+
csharp_style_expression_bodied_indexers = true:none
80+
csharp_style_expression_bodied_accessors = true:none
81+
82+
# Suggest more modern language features when available
83+
csharp_style_pattern_matching_over_is_with_cast_check = true:error
84+
csharp_style_pattern_matching_over_as_with_null_check = true:error
85+
csharp_style_inlined_variable_declaration = true:suggestion
86+
csharp_style_throw_expression = true:suggestion
87+
csharp_style_conditional_delegate_call = true:suggestion
88+
89+
# Newline settings
90+
csharp_new_line_before_open_brace = all
91+
csharp_new_line_before_else = true
92+
csharp_new_line_before_catch = true
93+
csharp_new_line_before_finally = true
94+
csharp_new_line_before_members_in_object_initializers = true
95+
csharp_new_line_before_members_in_anonymous_types = true
96+
97+
# Test settings
98+
[**/*Tests*/**{.cs,.vb}]
99+
# xUnit1013: Public method should be marked as test. Allows using records as test classes
100+
dotnet_diagnostic.xUnit1013.severity = none
101+
102+
# CS9113: Parameter is unread (usually, ITestOutputHelper)
103+
dotnet_diagnostic.CS9113.severity = none
104+
105+
# Default severity for analyzer diagnostics with category 'Style'
106+
dotnet_analyzer_diagnostic.category-Style.severity = none
107+
108+
# VSTHRD200: Use "Async" suffix for async methods
109+
dotnet_diagnostic.VSTHRD200.severity = none

.gitattributes

+24-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,24 @@
1-
# Auto detect text files and perform LF normalization
2-
* text=auto
1+
# sln, csproj files (and friends) are always CRLF, even on linux
2+
*.sln text eol=crlf
3+
*.proj text eol=crlf
4+
*.csproj text eol=crlf
5+
6+
# These are windows specific files which we may as well ensure are
7+
# always crlf on checkout
8+
*.bat text eol=crlf
9+
*.cmd text eol=crlf
10+
11+
# Opt in known filetypes to always normalize line endings on checkin
12+
# and always use native endings on checkout
13+
*.c text
14+
*.config text
15+
*.h text
16+
*.cs text
17+
*.md text
18+
*.tt text
19+
*.txt text
20+
21+
# Some must always be checked out as lf so enforce that for those files
22+
# If these are not lf then bash/cygwin on windows will not be able to
23+
# excute the files
24+
*.sh text eol=lf

.github/dependabot.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Please see the documentation for all configuration options:
2+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: nuget
7+
directory: /
8+
schedule:
9+
interval: daily
10+
groups:
11+
Azure:
12+
patterns:
13+
- "Azure*"
14+
- "Microsoft.Azure*"
15+
System:
16+
patterns:
17+
- "System*"
18+
Extensions:
19+
patterns:
20+
- "Microsoft.Extensions*"
21+
Web:
22+
patterns:
23+
- "Microsoft.AspNetCore*"
24+
Tests:
25+
patterns:
26+
- "Microsoft.NET.Tests*"
27+
- "xunit*"
28+
- "coverlet*"
29+
ThisAssembly:
30+
patterns:
31+
- "ThisAssembly*"
32+
ProtoBuf:
33+
patterns:
34+
- "protobuf-*"

.github/release.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- bydesign
5+
- dependencies
6+
- duplicate
7+
- question
8+
- invalid
9+
- wontfix
10+
- need info
11+
- docs
12+
- techdebt
13+
authors:
14+
- devlooped-bot
15+
- dependabot
16+
- github-actions
17+
categories:
18+
- title: ✨ Implemented enhancements
19+
labels:
20+
- enhancement
21+
- title: 🐛 Fixed bugs
22+
labels:
23+
- bug
24+
- title: 📝 Documentation updates
25+
labels:
26+
- docs
27+
- title: 🔨 Other
28+
labels:
29+
- '*'
30+
exclude:
31+
labels:
32+
- dependencies

.github/workflows/build.yml

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Builds and runs tests in all three supported OSes
2+
# Pushes CI feed if secrets.SLEET_CONNECTION is provided
3+
4+
name: build
5+
on:
6+
workflow_dispatch:
7+
push:
8+
branches: [ main, dev, 'dev/*', 'feature/*', 'rel/*' ]
9+
paths-ignore:
10+
- changelog.md
11+
- code-of-conduct.md
12+
- security.md
13+
- support.md
14+
- readme.md
15+
pull_request:
16+
types: [opened, synchronize, reopened]
17+
18+
env:
19+
DOTNET_NOLOGO: true
20+
VersionPrefix: 42.42.${{ github.run_number }}
21+
VersionLabel: ${{ github.ref }}
22+
23+
defaults:
24+
run:
25+
shell: bash
26+
27+
jobs:
28+
os-matrix:
29+
runs-on: ubuntu-latest
30+
outputs:
31+
matrix: ${{ steps.lookup.outputs.matrix }}
32+
steps:
33+
- name: 🤘 checkout
34+
uses: actions/checkout@v2
35+
36+
- name: 🔎 lookup
37+
id: lookup
38+
shell: pwsh
39+
run: |
40+
$path = './.github/workflows/os-matrix.json'
41+
$os = if (test-path $path) { cat $path } else { '["ubuntu-latest"]' }
42+
echo "matrix=$os" >> $env:GITHUB_OUTPUT
43+
44+
build:
45+
needs: os-matrix
46+
name: build-${{ matrix.os }}
47+
runs-on: ${{ matrix.os }}
48+
strategy:
49+
matrix:
50+
os: ${{ fromJSON(needs.os-matrix.outputs.matrix) }}
51+
steps:
52+
- name: 🤘 checkout
53+
uses: actions/checkout@v2
54+
with:
55+
submodules: recursive
56+
fetch-depth: 0
57+
58+
- name: 🙏 build
59+
run: dotnet build -m:1
60+
61+
- name: ⚙ GNU grep
62+
if: matrix.os == 'macOS-latest'
63+
run: |
64+
brew install grep
65+
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> .bash_profile
66+
67+
- name: 🧪 test
68+
uses: ./.github/workflows/test
69+
70+
- name: 📦 pack
71+
run: dotnet pack -m:1
72+
73+
# Only push CI package to sleet feed if building on ubuntu (fastest)
74+
- name: 🚀 sleet
75+
env:
76+
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }}
77+
if: env.SLEET_CONNECTION != ''
78+
run: |
79+
dotnet tool install -g --version 4.0.18 sleet
80+
sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found"
81+
82+
dotnet-format:
83+
runs-on: ubuntu-latest
84+
steps:
85+
- name: 🤘 checkout
86+
uses: actions/checkout@v2
87+
with:
88+
submodules: recursive
89+
fetch-depth: 0
90+
91+
- name: ✓ ensure format
92+
run: |
93+
dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget
94+
dotnet format style --verify-no-changes -v:diag --exclude ~/.nuget

.github/workflows/changelog.config

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
usernames-as-github-logins=true
2+
issues_wo_labels=true
3+
pr_wo_labels=true
4+
exclude-labels=bydesign,dependencies,duplicate,question,invalid,wontfix,need info,docs
5+
enhancement-label=:sparkles: Implemented enhancements:
6+
bugs-label=:bug: Fixed bugs:
7+
issues-label=:hammer: Other:
8+
pr-label=:twisted_rightwards_arrows: Merged:
9+
unreleased=false

.github/workflows/changelog.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: changelog
2+
on:
3+
workflow_dispatch:
4+
release:
5+
types: [released]
6+
7+
jobs:
8+
changelog:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: 🤖 defaults
12+
uses: devlooped/actions-bot@v1
13+
with:
14+
name: ${{ secrets.BOT_NAME }}
15+
email: ${{ secrets.BOT_EMAIL }}
16+
gh_token: ${{ secrets.GH_TOKEN }}
17+
github_token: ${{ secrets.GITHUB_TOKEN }}
18+
19+
- name: 🤘 checkout
20+
uses: actions/checkout@v2
21+
with:
22+
fetch-depth: 0
23+
ref: main
24+
token: ${{ env.GH_TOKEN }}
25+
26+
- name: ⚙ ruby
27+
uses: ruby/setup-ruby@v1
28+
with:
29+
ruby-version: 3.0.3
30+
31+
- name: ⚙ changelog
32+
run: |
33+
gem install github_changelog_generator
34+
github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token $GH_TOKEN --o changelog.md --config-file .github/workflows/changelog.config
35+
36+
- name: 🚀 changelog
37+
run: |
38+
git add changelog.md
39+
(git commit -m "🖉 Update changelog with ${GITHUB_REF#refs/*/}" && git push) || echo "Done"

0 commit comments

Comments
 (0)