Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 152 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# DO NOT EDIT: root convention
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
# END DO NOT EDIT

[*.json]
resharper_comment_typo_highlighting = none
Expand All @@ -18,7 +17,46 @@ insert_final_newline = false

[*.cs]
indent_size = 4
csharp_style_pattern_local_over_anonymous_function = true : suggestion
csharp_style_unused_value_assignment_preference = discard_variable : suggestion

# DO NOT EDIT: json convention
[*.json]
indent_size = 2
indent_style = space
# END DO NOT EDIT

# DO NOT EDIT: md convention
[*.md]
indent_size = 2
indent_style = space
insert_final_newline = true
# END DO NOT EDIT

# DO NOT EDIT: ps1 convention
[*.ps1]
indent_size = tab
indent_style = tab
insert_final_newline = true
# END DO NOT EDIT

# DO NOT EDIT: yaml convention
[*.{yml,yaml}]
indent_size = 2
indent_style = space
# END DO NOT EDIT

# DO NOT EDIT: csharp convention
# generated from https://github.com/Faithlife/CodingGuidelines/blob/master/sections/csharp/editorconfig.md
[*.{csproj,props,slnx,targets}]
indent_size = 2
indent_style = space

[*.{cs,cshtml,razor}]
indent_size = tab
indent_style = tab
tab_width = 4
insert_final_newline = true
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
Expand Down Expand Up @@ -71,22 +109,31 @@ csharp_style_expression_bodied_local_functions = true : suggestion
csharp_style_expression_bodied_methods = true : suggestion
csharp_style_expression_bodied_operators = true : suggestion
csharp_style_expression_bodied_properties = true : suggestion
csharp_style_implicit_object_creation_when_type_is_apparent = true : suggestion
csharp_style_inlined_variable_declaration = true : suggestion
csharp_style_namespace_declarations = file_scoped : suggestion
csharp_style_pattern_local_over_anonymous_function = true : suggestion
csharp_style_pattern_matching_over_as_with_null_check = true : suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true : suggestion
csharp_style_prefer_extended_property_pattern = true : suggestion
csharp_style_prefer_index_operator = true : suggestion
csharp_style_prefer_local_over_anonymous_function = true : suggestion
csharp_style_prefer_not_pattern = true : suggestion
csharp_style_prefer_null_check_over_type_check = true : suggestion
csharp_style_prefer_pattern_matching = true : suggestion
csharp_style_prefer_primary_constructors = true : suggestion
csharp_style_prefer_range_operator = true : suggestion
csharp_style_prefer_switch_expression = true : suggestion
csharp_style_prefer_tuple_swap = true : warning
csharp_style_throw_expression = true : suggestion
csharp_style_unused_value_assignment_preference = discard_variable : suggestion
csharp_style_unused_value_assignment_preference = discard_variable : warning
csharp_style_unused_value_expression_statement_preference = discard_variable : none
csharp_style_var_elsewhere = true : suggestion
csharp_style_var_for_built_in_types = true : suggestion
csharp_style_var_when_type_is_apparent = true : suggestion
csharp_using_directive_placement = outside_namespace : warning
dotnet_analyzer_diagnostic.severity = warning
dotnet_code_quality_unused_parameters = all : suggestion
dotnet_diagnostic.CA1014.severity = none
dotnet_diagnostic.CA1030.severity = none
dotnet_diagnostic.CA1031.severity = suggestion
dotnet_diagnostic.CA1032.severity = suggestion
Expand All @@ -97,6 +144,8 @@ dotnet_diagnostic.CA1062.severity = suggestion
dotnet_diagnostic.CA1063.severity = none
dotnet_diagnostic.CA1303.severity = none
dotnet_diagnostic.CA1308.severity = suggestion
dotnet_diagnostic.CA1309.severity = suggestion
dotnet_diagnostic.CA1508.severity = suggestion
dotnet_diagnostic.CA1707.severity = none
dotnet_diagnostic.CA1716.severity = none
dotnet_diagnostic.CA1720.severity = suggestion
Expand All @@ -106,10 +155,100 @@ dotnet_diagnostic.CA1816.severity = none
dotnet_diagnostic.CA1819.severity = suggestion
dotnet_diagnostic.CA1822.severity = suggestion
dotnet_diagnostic.CA1826.severity = suggestion
dotnet_diagnostic.CA1848.severity = suggestion
dotnet_diagnostic.CA1861.severity = suggestion
dotnet_diagnostic.CA1873.severity = suggestion
dotnet_diagnostic.CA2000.severity = none
dotnet_diagnostic.CA2227.severity = none
dotnet_diagnostic.CA2234.severity = none
dotnet_diagnostic.CA2237.severity = none
dotnet_diagnostic.CA2254.severity = none
dotnet_diagnostic.CA5351.severity = none
dotnet_diagnostic.IDE0001.severity = warning
dotnet_diagnostic.IDE0002.severity = warning
dotnet_diagnostic.IDE0003.severity = warning
dotnet_diagnostic.IDE0004.severity = warning
dotnet_diagnostic.IDE0005.severity = warning
dotnet_diagnostic.IDE0007.severity = suggestion
dotnet_diagnostic.IDE0008.severity = suggestion
dotnet_diagnostic.IDE0009.severity = warning
dotnet_diagnostic.IDE0010.severity = suggestion
dotnet_diagnostic.IDE0011.severity = suggestion
dotnet_diagnostic.IDE0016.severity = suggestion
dotnet_diagnostic.IDE0017.severity = suggestion
dotnet_diagnostic.IDE0018.severity = suggestion
dotnet_diagnostic.IDE0019.severity = suggestion
dotnet_diagnostic.IDE0020.severity = suggestion
dotnet_diagnostic.IDE0021.severity = suggestion
dotnet_diagnostic.IDE0022.severity = suggestion
dotnet_diagnostic.IDE0023.severity = suggestion
dotnet_diagnostic.IDE0024.severity = suggestion
dotnet_diagnostic.IDE0025.severity = suggestion
dotnet_diagnostic.IDE0026.severity = suggestion
dotnet_diagnostic.IDE0027.severity = suggestion
dotnet_diagnostic.IDE0028.severity = suggestion
dotnet_diagnostic.IDE0029.severity = warning
dotnet_diagnostic.IDE0030.severity = warning
dotnet_diagnostic.IDE0031.severity = suggestion
dotnet_diagnostic.IDE0032.severity = suggestion
dotnet_diagnostic.IDE0033.severity = warning
dotnet_diagnostic.IDE0034.severity = suggestion
dotnet_diagnostic.IDE0035.severity = warning
dotnet_diagnostic.IDE0036.severity = warning
dotnet_diagnostic.IDE0037.severity = suggestion
dotnet_diagnostic.IDE0038.severity = suggestion
dotnet_diagnostic.IDE0039.severity = suggestion
dotnet_diagnostic.IDE0040.severity = warning
dotnet_diagnostic.IDE0041.severity = suggestion
dotnet_diagnostic.IDE0042.severity = suggestion
dotnet_diagnostic.IDE0044.severity = warning
dotnet_diagnostic.IDE0045.severity = suggestion
dotnet_diagnostic.IDE0046.severity = none
dotnet_diagnostic.IDE0047.severity = suggestion
dotnet_diagnostic.IDE0048.severity = suggestion
dotnet_diagnostic.IDE0049.severity = warning
dotnet_diagnostic.IDE0051.severity = warning
dotnet_diagnostic.IDE0052.severity = warning
dotnet_diagnostic.IDE0053.severity = suggestion
dotnet_diagnostic.IDE0054.severity = suggestion
dotnet_diagnostic.IDE0056.severity = suggestion
dotnet_diagnostic.IDE0057.severity = suggestion
dotnet_diagnostic.IDE0058.severity = none
dotnet_diagnostic.IDE0059.severity = warning
dotnet_diagnostic.IDE0060.severity = suggestion
dotnet_diagnostic.IDE0061.severity = suggestion
dotnet_diagnostic.IDE0062.severity = suggestion
dotnet_diagnostic.IDE0063.severity = suggestion
dotnet_diagnostic.IDE0065.severity = warning
dotnet_diagnostic.IDE0066.severity = suggestion
dotnet_diagnostic.IDE0070.severity = suggestion
dotnet_diagnostic.IDE0071.severity = suggestion
dotnet_diagnostic.IDE0072.severity = suggestion
dotnet_diagnostic.IDE0074.severity = suggestion
dotnet_diagnostic.IDE0075.severity = warning
dotnet_diagnostic.IDE0078.severity = suggestion
dotnet_diagnostic.IDE0080.severity = suggestion
dotnet_diagnostic.IDE0082.severity = warning
dotnet_diagnostic.IDE0083.severity = suggestion
dotnet_diagnostic.IDE0090.severity = suggestion
dotnet_diagnostic.IDE0100.severity = warning
dotnet_diagnostic.IDE0110.severity = warning
dotnet_diagnostic.IDE0130.severity = warning
dotnet_diagnostic.IDE0150.severity = suggestion
dotnet_diagnostic.IDE0160.severity = suggestion
dotnet_diagnostic.IDE0161.severity = suggestion
dotnet_diagnostic.IDE0170.severity = suggestion
dotnet_diagnostic.IDE0180.severity = warning
dotnet_diagnostic.IDE0290.severity = suggestion
dotnet_diagnostic.IDE0300.severity = suggestion
dotnet_diagnostic.IDE0301.severity = suggestion
dotnet_diagnostic.IDE0305.severity = suggestion
dotnet_diagnostic.IDE0306.severity = suggestion
dotnet_diagnostic.IDE0370.severity = suggestion
dotnet_diagnostic.IDE0390.severity = suggestion
dotnet_diagnostic.IDE0391.severity = suggestion
dotnet_diagnostic.IDE1005.severity = suggestion
dotnet_diagnostic.NUnit2045.severity = suggestion
dotnet_diagnostic.SA0001.severity = none
dotnet_diagnostic.SA1003.severity = none
dotnet_diagnostic.SA1008.severity = none
Expand Down Expand Up @@ -157,6 +296,8 @@ dotnet_diagnostic.SA1633.severity = none
dotnet_diagnostic.SA1642.severity = none
dotnet_diagnostic.SA1643.severity = none
dotnet_diagnostic.SX1101.severity = warning
dotnet_diagnostic.SYSLIB1045.severity = suggestion
dotnet_diagnostic.SYSLIB1054.severity = none
dotnet_naming_rule.local_functions_rule.severity = warning
dotnet_naming_rule.local_functions_rule.style = upper_camel_case_style
dotnet_naming_rule.local_functions_rule.symbols = local_functions_symbols
Expand Down Expand Up @@ -197,6 +338,7 @@ dotnet_sort_system_directives_first = true
dotnet_style_coalesce_expression = true : warning
dotnet_style_collection_initializer = true : suggestion
dotnet_style_explicit_tuple_names = true : warning
dotnet_style_namespace_match_folder = true : warning
dotnet_style_null_propagation = true : suggestion
dotnet_style_object_initializer = true : suggestion
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity : none
Expand All @@ -212,6 +354,8 @@ dotnet_style_prefer_conditional_expression_over_return = true : none
dotnet_style_prefer_inferred_anonymous_type_member_names = true : suggestion
dotnet_style_prefer_inferred_tuple_names = true : suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true : suggestion
dotnet_style_prefer_simplified_boolean_expressions = true : warning
dotnet_style_prefer_simplified_interpolation = true : suggestion
dotnet_style_qualification_for_event = false : warning
dotnet_style_qualification_for_field = false : warning
dotnet_style_qualification_for_method = false : warning
Expand All @@ -227,6 +371,7 @@ resharper_arrange_missing_parentheses_highlighting = hint
resharper_arrange_trailing_comma_in_multiline_lists_highlighting = warning
resharper_comment_typo_highlighting = none
resharper_compare_of_floats_by_equality_operator_highlighting = suggestion
resharper_convert_to_primary_constructor_highlighting = hint
resharper_csharp_align_first_arg_by_paren = false
resharper_csharp_align_linq_query = false
resharper_csharp_align_multiline_argument = false
Expand All @@ -248,6 +393,7 @@ resharper_csharp_indent_anonymous_method_block = false
resharper_csharp_indent_nested_for_stmt = true
resharper_csharp_indent_nested_foreach_stmt = true
resharper_csharp_indent_nested_while_stmt = true
resharper_csharp_indent_raw_literal_string = indent
resharper_csharp_int_align = false
resharper_csharp_keep_existing_arrangement = true
resharper_csharp_nested_ternary_style = simple_wrap
Expand All @@ -270,3 +416,4 @@ resharper_unused_auto_property_accessor_global_highlighting = none
resharper_unused_auto_property_accessor_local_highlighting = suggestion
resharper_unused_member_global_highlighting = none
resharper_unused_member_local_highlighting = suggestion
# END DO NOT EDIT
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* text=auto eol=lf

# DO NOT EDIT: csharp convention
*.cs text diff=csharp
*.csproj text merge=union
*.sln text merge=union
# END DO NOT EDIT
11 changes: 11 additions & 0 deletions .github/conventions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
conventions:
- path: Faithlife/CodingGuidelines/conventions/dotnet-common
- path: Faithlife/CodingGuidelines/conventions/nuget-config
- path: Faithlife/CodingGuidelines/conventions/gitignore-common
- path: Faithlife/CodingGuidelines/conventions/gitignore-dotnet
- path: Faithlife/CodingGuidelines/conventions/gitignore-ide
- path: Faithlife/CodingGuidelines/conventions/dotnet-common-contributing
- path: Faithlife/CodingGuidelines/conventions/dotnet-common-props
- path: Faithlife/CodingGuidelines/conventions/license-mit
settings:
copyright-holder: Ed Ball
19 changes: 19 additions & 0 deletions .github/lsp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"lspServers": {
"csharp": {
"command": "dnx",
"args": [
"--yes",
"--prerelease",
"roslyn-language-server",
"--",
"--stdio",
"--autoLoadProjects"
],
"fileExtensions": {
".cs": "csharp",
".cshtml": "csharp"
}
}
}
}
40 changes: 40 additions & 0 deletions .github/workflows/apply-repo-conventions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Apply Repository Conventions

on:
schedule:
- cron: '31 9 * * 1-5'
workflow_dispatch:

permissions: {}

jobs:
apply:
name: Apply
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
# full history needed for git merge-base in repo-conventions tool
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "ejball-bot"
git config user.email "ejball-bot@users.noreply.github.com"

- name: Install .NET
uses: actions/setup-dotnet@v5

- name: Install APM
uses: microsoft/apm-action@v1
with:
setup-only: true

- name: Apply repository conventions
env:
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
run: |
dnx -y repo-conventions apply --open-pr
50 changes: 0 additions & 50 deletions .github/workflows/build.yaml

This file was deleted.

Loading
Loading