-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add editorconfig and analyzers (#240)
* Add editorconfig and analyzers * cleanup * Cleanup * Rename enums * Disable CA1716, move to namespace continuation * Allow underscores in test names * Fix typos * Rename List to Search * CA1720 Identifiers should not contain type names * CA1309: Use ordinal StringComparison * Use array initializer * Minor cleanups * Cleanup --------- Co-authored-by: Ole Jørgen Skogstad <skogstad@softis.net>
- Loading branch information
Showing
174 changed files
with
1,069 additions
and
982 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,4 @@ | |
"value": "norwayeast" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# See also Directory.Build.Props for additional analyzer settings | ||
|
||
root = true | ||
|
||
[*] | ||
# Enforce line endings to be LF | ||
end_of_line = lf | ||
# Enforce indentation to be 4 spaces | ||
indent_style = spaces | ||
indent_size = 4 | ||
# Insert a final new line at the end of the file | ||
insert_final_newline = true | ||
|
||
[*.cs] | ||
|
||
# CA1848: Use the LoggerMessage delegates | ||
# TODO: Possible performance improvement | ||
dotnet_diagnostic.CA1848.severity = none | ||
|
||
# Identifiers should not match keywords | ||
dotnet_diagnostic.CA1716.severity = none | ||
|
||
# Style faults should be warnings | ||
dotnet_analyzer_diagnostic.category-Style.severity = warning | ||
|
||
# | ||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity | ||
|
||
# Enforce file scoped namespaces | ||
csharp_style_namespace_declarations = file_scoped:suggestion | ||
# Place 'using' directives outside of namespaces | ||
csharp_using_directive_placement = outside_namespace:true | ||
|
||
# Disabling this because of https://github.com/dotnet/roslyn/issues/41640 | ||
dotnet_diagnostic.IDE0005.severity = none | ||
# | ||
# # Disabling this because of https://github.com/dotnet/roslyn/issues/70826 | ||
# dotnet_diagnostic.IDE0028.severity = none | ||
# | ||
# # Primary constructors | ||
# dotnet_diagnostic.IDE0290.severity = none | ||
|
||
# Order 'using' directives with System.* appearing first | ||
dotnet_sort_system_directives_first = true | ||
# Suggest the use of var when the type is apparent | ||
csharp_style_var_for_built_in_types = true:suggestion | ||
csharp_style_var_when_type_is_apparent = true:suggestion | ||
csharp_style_var_elsewhere = true:suggestion | ||
# Suggest using expression bodies | ||
csharp_style_expression_bodied_methods = when_on_single_line | ||
dotnet_diagnostic.IDE0022.severity = suggestion | ||
# Don't mix non-braces and braces for ifs | ||
csharp_prefer_braces = when_multiline | ||
|
||
# "Expression body is never used" | ||
dotnet_diagnostic.IDE0058.severity = none | ||
# "'if' statement can be simplified" | ||
dotnet_diagnostic.IDE0046.severity = suggestion | ||
# "Do not declare static members on generic types" | ||
dotnet_diagnostic.CA1000.severity = none | ||
# "Instantiate argument exceptions correctly" | ||
dotnet_diagnostic.CA2208.severity = suggestion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action | ||
# More GitHub Actions for Azure: https://github.com/Azure/actions | ||
|
||
name: Build and deploy dotnet core app to Azure Function App - LatidaFunction | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
env: | ||
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root | ||
DOTNET_VERSION: '7.0.x' # set this to the dotnet version to use | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: windows-latest | ||
steps: | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
|
||
- name: 'Resolve Project Dependencies Using Dotnet' | ||
shell: pwsh | ||
run: | | ||
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}' | ||
dotnet build --configuration Release --output ./output | ||
popd | ||
- name: 'Run Azure Functions Action' | ||
uses: Azure/functions-action@v1 | ||
id: fa | ||
with: | ||
app-name: 'LatidaFunction' | ||
slot-name: 'Production' | ||
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output' | ||
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_5B804973F87844089C37A81BF22B1261 }} | ||
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action | ||
# More GitHub Actions for Azure: https://github.com/Azure/actions | ||
|
||
name: Build and deploy dotnet core app to Azure Function App - LatidaFunction | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
env: | ||
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root | ||
DOTNET_VERSION: '7.0.x' # set this to the dotnet version to use | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: windows-latest | ||
steps: | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
|
||
- name: 'Resolve Project Dependencies Using Dotnet' | ||
shell: pwsh | ||
run: | | ||
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}' | ||
dotnet build --configuration Release --output ./output | ||
popd | ||
- name: 'Run Azure Functions Action' | ||
uses: Azure/functions-action@v1 | ||
id: fa | ||
with: | ||
app-name: 'LatidaFunction' | ||
slot-name: 'Production' | ||
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output' | ||
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_5B804973F87844089C37A81BF22B1261 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> | ||
<AnalysisMode>Recommended</AnalysisMode> | ||
<EnableNETAnalyzers>true</EnableNETAnalyzers> | ||
<AnalysisLevel>latest</AnalysisLevel> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Digdir.Domain.Dialogporten.Application/Common/Extensions/Enumerable/UpdateSet.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.