Skip to content

Commit

Permalink
Merge template/faithlife-build.
Browse files Browse the repository at this point in the history
  • Loading branch information
ejball committed Apr 27, 2023
2 parents a225d29 + 50b3f16 commit 51d092a
Show file tree
Hide file tree
Showing 11 changed files with 136 additions and 24 deletions.
101 changes: 98 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ resharper_string_literal_typo_highlighting = none
insert_final_newline = false

[*.cs]
indent_size = 4
indent_size = tab
indent_style = tab
tab_width = 4
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
Expand Down Expand Up @@ -71,22 +72,30 @@ 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_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 +106,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 +117,89 @@ 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.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.IDE1005.severity = suggestion
dotnet_diagnostic.SA0001.severity = none
dotnet_diagnostic.SA1003.severity = none
dotnet_diagnostic.SA1008.severity = none
Expand Down Expand Up @@ -157,6 +247,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 +289,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 +305,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 Down
14 changes: 3 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@ name: Build
on:
workflow_dispatch:
push:
paths-ignore:
- '*.md'
- 'docs/**'
branches:
- 'master'
tags-ignore:
- '**'
pull_request:
paths-ignore:
- '*.md'
- 'docs/**'
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
defaults:
run:
Expand All @@ -26,14 +20,12 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up .NET 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Check out code
uses: actions/checkout@v3
- name: Restore
run: .\build.ps1 restore
- name: Build
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish Docs
on:
workflow_dispatch:
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
defaults:
run:
shell: pwsh
jobs:
publish-docs:
runs-on: windows-latest
steps:
- name: Set up .NET 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Check out code
uses: actions/checkout@v3
- name: Publish Docs
env:
BUILD_BOT_PASSWORD: ${{ secrets.BUILD_BOT_PASSWORD }}
run: .\build.ps1 publish --no-test --trigger publish-docs
5 changes: 3 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);NU5105;CA1014;CA1508;CA1852</NoWarn>
<NoWarn>$(NoWarn);1591;1998;NU5105</NoWarn>
<DebugType>embedded</DebugType>
<GitHubOrganization>Faithlife</GitHubOrganization>
<RepositoryName>Parsing</RepositoryName>
Expand All @@ -20,6 +20,7 @@
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
</PropertyGroup>
Expand All @@ -30,7 +31,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Faithlife.Analyzers" Version="1.3.1" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
<PackageReference Include="Faithlife.Analyzers" Version="1.4.0" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright 2022 Faithlife
Copyright 2023 Faithlife

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ A simple library for constructing parsers in C#.

[![Build](https://github.com/Faithlife/Parsing/workflows/Build/badge.svg)](https://github.com/Faithlife/Parsing/actions?query=workflow%3ABuild) [![NuGet](https://img.shields.io/nuget/v/Faithlife.Parsing.svg)](https://www.nuget.org/packages/Faithlife.Parsing)

[Documentation](https://faithlife.github.io/Parsing/) | [Release Notes](ReleaseNotes.md) | [Contributing](CONTRIBUTING.md)
[Documentation](https://faithlife.github.io/Parsing/) | [Release Notes](https://github.com/Faithlife/Parsing/blob/master/ReleaseNotes.md) | [Contributing](https://github.com/Faithlife/Parsing/blob/master/CONTRIBUTING.md)
2 changes: 1 addition & 1 deletion src/Faithlife.Parsing/Faithlife.Parsing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

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

</Project>
3 changes: 0 additions & 3 deletions src/Faithlife.Parsing/README.md

This file was deleted.

2 changes: 2 additions & 0 deletions tools/Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
GitLogin = gitLogin,
GitAuthor = new GitAuthorInfo("Faithlife Build Bot", "[email protected]"),
SourceCodeUrl = "https://github.com/Faithlife/Parsing/tree/master/src",
GitBranchName = "docs",
TargetDirectory = "",
},
PackageSettings = new DotNetPackageSettings
{
Expand Down
3 changes: 2 additions & 1 deletion tools/Build/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<NoWarn>$(NoWarn);CA1852</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Faithlife.Build" Version="5.16.1" />
<PackageReference Include="Faithlife.Build" Version="5.17.2" />
</ItemGroup>

</Project>
3 changes: 2 additions & 1 deletion tools/XmlDocGen/XmlDocGen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<NoWarn>$(NoWarn);CA1852</NoWarn>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Faithlife.Parsing\Faithlife.Parsing.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="XmlDocMarkdown.Core" Version="2.8.0" />
<PackageReference Include="XmlDocMarkdown.Core" Version="2.9.0" />
</ItemGroup>

</Project>

0 comments on commit 51d092a

Please sign in to comment.