dotnet-format check (#958)

* dotnet-format check

updating name

updating order

Update dotnet-format.yml

updating job name

Updating files based on dotnet-format

updating sanitycheck

updating os

* updating workflows

* adding path to editorconfig

Co-authored-by: Mikel Blanchard <mblanchard@macrosssoftware.com>
This commit is contained in:
Eddy Nakamura 2020-07-31 22:46:08 -03:00 committed by GitHub
parent a3e6b0364f
commit c68061fa0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 49 additions and 21 deletions

27
.github/workflows/dotnet-format.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: dotnet format
on:
pull_request:
branches: [ master ]
paths:
- '**.cs'
- '.editorconfig'
jobs:
check-format:
runs-on: windows-latest
steps:
- name: check out code
uses: actions/checkout@v2
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Install format tool
run: dotnet tool install -g dotnet-format
- name: dotnet format
run: dotnet-format --folder --check

View File

@ -23,4 +23,4 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Run sql docker-compose.integration
run: docker-compose --file=test/OpenTelemetry.Instrumentation.SqlClient.Tests/docker-compose.integration.yml --project-directory=. up --exit-code-from=sql_integration_tests --build
run: docker-compose --file=test/OpenTelemetry.Instrumentation.SqlClient.Tests/docker-compose.integration.yml --project-directory=. up --exit-code-from=sql_integration_tests --build

View File

@ -106,12 +106,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ISSUE_TEMPLATE", "ISSUE_TEM
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{E69578EB-B456-4062-A645-877CD964528B}"
ProjectSection(SolutionItems) = preProject
.github\workflows\docs.yml = .github\workflows\docs.yml
.github\workflows\docfx.yml = .github\workflows\docfx.yml
.github\workflows\dotnet-core-cov.yml = .github\workflows\dotnet-core-cov.yml
.github\workflows\dotnet-core-linux.yml = .github\workflows\dotnet-core-linux.yml
.github\workflows\dotnet-core-win.yml = .github\workflows\dotnet-core-win.yml
.github\workflows\dotnet-core.yml = .github\workflows\dotnet-core.yml
.github\workflows\dotnet-format.yml = .github\workflows\dotnet-format.yml
.github\workflows\integration.yml = .github\workflows\integration.yml
.github\workflows\markdownlint.yml = .github\workflows\markdownlint.yml
.github\workflows\sanitycheck.yml = .github\workflows\sanitycheck.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C1542297-8763-4DF4-957C-489ED771C21D}"
@ -153,15 +156,14 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{7C87CAF9-79D7-4C26-9FFB-F3F1FB6911F1}"
ProjectSection(SolutionItems) = preProject
docs\logs\building-your-own-exporter.md = docs\logs\building-your-own-exporter.md
docs\logs\getting-started.md = docs\logs\getting-started.md
docs\logs\logging-correlation.md = docs\logs\logging-correlation.md
docs\trace\building-your-own-exporter.md = docs\trace\building-your-own-exporter.md
docs\metrics\building-your-own-exporter.md = docs\metrics\building-your-own-exporter.md
docs\metrics\getting-started.md = docs\metrics\getting-started.md
docs\trace\building-your-own-exporter.md = docs\trace\building-your-own-exporter.md
docs\trace\building-your-own-instrumentation-library.md = docs\trace\building-your-own-instrumentation-library.md
docs\trace\building-your-own-sampler.md = docs\trace\building-your-own-sampler.md
docs\logs\getting-started.md = docs\logs\getting-started.md
docs\metrics\getting-started.md = docs\metrics\getting-started.md
docs\trace\getting-started.md = docs\trace\getting-started.md
docs\logs\logging-correlation.md = docs\logs\logging-correlation.md
EndProjectSection
EndProject
Global

View File

@ -4,9 +4,8 @@ using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.Threading.Tasks;
using System.Web.Http;
using Examples.AspNet.Models;
namespace Examples.AspNet.Controllers

View File

@ -2,8 +2,8 @@
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using Microsoft.AspNetCore.Mvc;
using Examples.AspNetCore.Models;
using Microsoft.AspNetCore.Mvc;
namespace Examples.AspNetCore.Controllers
{

View File

@ -1,4 +1,4 @@
// <copyright file="DistributedContext.cs" company="OpenTelemetry Authors">
// <copyright file="DistributedContext.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,4 +1,4 @@
// <copyright file="DistributedContextBuilder.cs" company="OpenTelemetry Authors">
// <copyright file="DistributedContextBuilder.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,4 +1,4 @@
// <copyright file="ActivitySpanIdConverter.cs" company="OpenTelemetry Authors">
// <copyright file="ActivitySpanIdConverter.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,4 +1,4 @@
// <copyright file="ActivityTraceIdConverter.cs" company="OpenTelemetry Authors">
// <copyright file="ActivityTraceIdConverter.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,4 +1,4 @@
// <copyright file="AssemblyInfo.cs" company="OpenTelemetry Authors">
// <copyright file="AssemblyInfo.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,4 +1,4 @@
// <copyright file="TimestampHelpers.cs" company="OpenTelemetry Authors">
// <copyright file="TimestampHelpers.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,4 +1,4 @@
// <copyright file="BoundCounterMetricSdkBase.cs" company="OpenTelemetry Authors">
// <copyright file="BoundCounterMetricSdkBase.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,4 +1,4 @@
// <copyright file="BoundMeasureMetricSdkBase.cs" company="OpenTelemetry Authors">
// <copyright file="BoundMeasureMetricSdkBase.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,4 +1,4 @@
// <copyright file="CounterMetricSdkBase.cs" company="OpenTelemetry Authors">
// <copyright file="CounterMetricSdkBase.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -105,7 +105,7 @@ namespace OpenTelemetry.Shims.OpenTracing.Tests
// parameter validation
Assert.Throws<ArgumentNullException>(() => shim.GetBaggageItem(null));
// TODO - Method not implemented
// TODO - Method not implemented
}
[Fact]

View File

@ -37,13 +37,13 @@ namespace TestApp.AspNetCore._3._1.Controllers
// POST api/values
[HttpPost]
public void Post([FromBody]string value)
public void Post([FromBody] string value)
{
}
// PUT api/values/5
[HttpPut("{id}")]
public void Put(int id, [FromBody]string value)
public void Put(int id, [FromBody] string value)
{
}