From bffd71fea5a53886f41557c8a44269fc55d7c2cd Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Thu, 7 Dec 2023 18:23:42 +0100 Subject: [PATCH] Use csharpier in the ci --- .github/workflows/coding-style.yml | 16 ++++++++-------- back/.editorconfig | 10 ++++------ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/coding-style.yml b/.github/workflows/coding-style.yml index fd07b739..697ea2cd 100644 --- a/.github/workflows/coding-style.yml +++ b/.github/workflows/coding-style.yml @@ -5,16 +5,16 @@ jobs: back: name: "Lint Back" runs-on: ubuntu-latest + defaults: + run: + working-directory: ./back steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 7.0.x - - - name: Build the app - run: cd back && dotnet build -p:CheckCodingStyle=true -p:TreatWarningsAsErrors=true '-p:SkipTranscoder=true' + - name: Check coding style + run: | + dotnet tool restore + dotnet csharpier . --check front: name: "Lint Front" diff --git a/back/.editorconfig b/back/.editorconfig index 0a9550cc..12a6f984 100644 --- a/back/.editorconfig +++ b/back/.editorconfig @@ -11,13 +11,11 @@ smart_tab = true [*.cs] csharp_prefer_braces = false -dotnet_diagnostic.IDE0130.severity = none -dotnet_diagnostic.IDE0058.severity = none dotnet_diagnostic.IDE0046.severity = none -dotnet_diagnostic.CA1305.severity = none -dotnet_diagnostic.CA1848.severity = none -dotnet_diagnostic.CA2007.severity = none -dotnet_diagnostic.CA1716.severity = none +dotnet_diagnostic.IDE0055.severity = none +dotnet_diagnostic.IDE0058.severity = none +dotnet_diagnostic.IDE0130.severity = none + # Sort using and Import directives with System.* appearing first dotnet_sort_system_directives_first = true csharp_using_directive_placement = outside_namespace:warning