Revert "[FxCop] Telemetry.csproj" (#6690)

* Revert "marking all warnings (#6642)"

This reverts commit b0f0940534.

* Added warning comment
This commit is contained in:
Arjun Balgovind 2020-09-17 14:02:25 -07:00 committed by GitHub
parent b5cc24fcff
commit f19bad3761
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 17 deletions

View file

@ -14,8 +14,6 @@ namespace Microsoft.PowerToys.Telemetry.Events
[EventData]
public class EventBase
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1707:Identifiers should not contain underscores", Justification = "Part of telem, can't adjust")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "Part of telem, can't adjust")]
public bool UTCReplace_AppSessionGuid => true;
private string _version;
@ -33,12 +31,11 @@ namespace Microsoft.PowerToys.Telemetry.Events
}
}
private static string GetVersionFromAssembly()
private string GetVersionFromAssembly()
{
// For consistency this should be formatted the same way as
// https://github.com/microsoft/PowerToys/blob/710f92d99965109fd788d85ebf8b6b9e0ba1524a/src/common/common.cpp#L635
var version = Assembly.GetExecutingAssembly()?.GetName()?.Version ?? new Version();
return $"v{version.Major}.{version.Minor}.{version.Build}";
}
}

View file

@ -6,7 +6,6 @@ namespace Microsoft.PowerToys.Telemetry.Events
{
public interface IEvent
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1707:Identifiers should not contain underscores", Justification = "Part of telem, can't adjust")]
PartA_PrivTags PartA_PrivTags { get; }
}
}

View file

@ -32,12 +32,6 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\..\codeAnalysis\GlobalSuppressions.cs">
<Link>GlobalSuppressions.cs</Link>

View file

@ -4,15 +4,12 @@
using System.Diagnostics.Tracing;
// WARNING: THIS FILE GETS REPLACED ON THE BUILD FARM
namespace Microsoft.PowerToys.Telemetry
{
/// <summary>
/// Privacy Tag values
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1028:Enum Storage should be Int32", Justification = "Part of telem, can't adjust")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1069:Enums values should not be duplicated", Justification = "Part of telem, gets overwritten by build farm")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1707:Identifiers should not contain underscores", Justification = "Part of telem, can't adjust")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1717:Only FlagsAttribute enums should have plural names", Justification = "Part of telem, can't adjust")]
public enum PartA_PrivTags
: ulong
{
@ -50,8 +47,12 @@ namespace Microsoft.PowerToys.Telemetry
/// Initializes a new instance of the <see cref="TelemetryBase"/> class.
/// </summary>
/// <param name="eventSourceName">.</param>
public TelemetryBase(string eventSourceName)
: base(eventSourceName, EventSourceSettings.EtwSelfDescribingEventFormat, PowerToysTelemetryTraits)
public TelemetryBase(
string eventSourceName)
: base(
eventSourceName,
EventSourceSettings.EtwSelfDescribingEventFormat,
PowerToysTelemetryTraits)
{
return;
}