[repo] dotnet format ci follow-up (#5012)
Co-authored-by: Utkarsh Umesan Pillai <66651184+utpilla@users.noreply.github.com>
This commit is contained in:
parent
defaffa91f
commit
c8f939e60b
|
|
@ -10,12 +10,17 @@ name: dotnet format
|
|||
on:
|
||||
pull_request:
|
||||
branches: [ 'main*' ]
|
||||
paths-ignore:
|
||||
- '**.cs'
|
||||
- '.editorconfig'
|
||||
paths:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
check-format:
|
||||
check-format-stable:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- run: 'echo "No build required"'
|
||||
|
||||
check-format-experimental:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ on:
|
|||
- '.editorconfig'
|
||||
|
||||
jobs:
|
||||
check-format:
|
||||
check-format-stable:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
|
|
@ -23,5 +23,28 @@ jobs:
|
|||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v3
|
||||
|
||||
- name: dotnet restore
|
||||
run: dotnet restore
|
||||
|
||||
- name: dotnet format
|
||||
run: dotnet format OpenTelemetry.sln --verify-no-changes
|
||||
run: dotnet format OpenTelemetry.sln --no-restore --verify-no-changes
|
||||
env:
|
||||
ExposeExperimentalFeatures: false
|
||||
|
||||
check-format-experimental:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v3
|
||||
|
||||
- name: dotnet restore
|
||||
run: dotnet restore
|
||||
|
||||
- name: dotnet format
|
||||
run: dotnet format OpenTelemetry.sln --no-restore --verify-no-changes
|
||||
env:
|
||||
ExposeExperimentalFeatures: true
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace OpenTelemetry.Logs;
|
|||
#if EXPOSE_EXPERIMENTAL_FEATURES
|
||||
public
|
||||
#else
|
||||
internal
|
||||
internal
|
||||
#endif
|
||||
static class OpenTelemetryDependencyInjectionLoggerProviderBuilderExtensions
|
||||
{
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace OpenTelemetry.Logs;
|
|||
#if EXPOSE_EXPERIMENTAL_FEATURES
|
||||
public
|
||||
#else
|
||||
internal
|
||||
internal
|
||||
#endif
|
||||
static class OpenTelemetryDependencyInjectionLoggingServiceCollectionExtensions
|
||||
{
|
||||
|
|
|
|||
|
|
@ -57,9 +57,6 @@ public class W3CTraceContextTests : IDisposable
|
|||
var builder = WebApplication.CreateBuilder();
|
||||
using var app = builder.Build();
|
||||
|
||||
// disabling due to failing dotnet-format
|
||||
// TODO: investigate why dotnet-format fails.
|
||||
#pragma warning disable SA1008 // Opening parenthesis should be spaced correctly
|
||||
app.MapPost("/", async ([FromBody] Data[] data) =>
|
||||
{
|
||||
var result = string.Empty;
|
||||
|
|
@ -84,7 +81,6 @@ public class W3CTraceContextTests : IDisposable
|
|||
|
||||
return result;
|
||||
});
|
||||
#pragma warning restore SA1008 // Opening parenthesis should be spaced correctly
|
||||
|
||||
app.RunAsync();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue