Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to a new analyzer package #6946

Merged
merged 5 commits into from
Jul 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<ItemGroup>
<PackageReference Update="ApprovalTests" Version="3.0.22" />
<PackageReference Update="ApprovalUtilities" Version="3.0.22" />
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20190711.4" />
<PackageReference Update="Azure.Core" Version="1.0.0-preview.6" />
<PackageReference Update="BenchmarkDotNet" Version="0.11.5" />
<PackageReference Update="FsCheck.Xunit" Version="2.14.0" />
Expand Down Expand Up @@ -102,6 +101,7 @@
</ItemGroup>
<!-- Track 2 specific versions -->
<ItemGroup Condition="'$(IsClientLibrary)' == 'true'">
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20190716.1" />
<PackageReference Update="System.Memory" Version="4.5.3" />
<PackageReference Update="Microsoft.Bcl.AsyncInterfaces" Version="1.0.0-preview6.19259.10" />
<PackageReference Update="System.Text.Json" Version="4.6.0-preview6.19259.10" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public partial class ConfigurationClient
private readonly Uri _baseUri;
private readonly HttpPipeline _pipeline;


/// <summary>
/// Protected constructor to allow mocking
/// </summary>
Expand Down Expand Up @@ -304,7 +303,6 @@ public virtual async Task<Response<ConfigurationSetting>> UpdateAsync(string key
return await UpdateAsync(new ConfigurationSetting(key, value, label), cancellationToken).ConfigureAwait(false);
}


/// <summary>
/// Updates an existing <see cref="ConfigurationSetting"/> in the configuration store.
/// </summary>
Expand Down
1 change: 0 additions & 1 deletion sdk/core/Azure.Core/src/Shared/HashCodeBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ private static void Initialize(out uint v1, out uint v2, out uint v3, out uint v
public static uint RotateLeft(uint value, int offset)
=> (value << offset) | (value >> (64 - offset));


[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static uint Round(uint hash, uint input)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ public class IssuerBase
public DateTimeOffset Created { get; set; }
public DateTimeOffset Updated { get; set; }
public bool Enabled { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ internal override void WriteProperties(Utf8JsonWriter json)
}
if (N != null)
{

json.WriteString(NPropertyNameBytes, Base64Url.Encode(N));
}
if (E != null)
Expand Down
2 changes: 1 addition & 1 deletion sdk/keyvault/Azure.Security.KeyVault.Keys/src/KeyBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ protected void ParseId(string id)
}

internal override void WriteProperties(Utf8JsonWriter json) { }

internal override void ReadProperties(JsonElement json)
{
foreach(JsonProperty prop in json.EnumerateObject())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ public class KeyClientOptions : ClientOptions
{
/// <summary>
/// The latest service version supported by this client library.
/// For more information, see
/// For more information, see
/// <see href="https://docs.microsoft.com/en-us/rest/api/keyvault/key-vault-versions"/>
/// </summary>
internal const ServiceVersion LatestVersion = ServiceVersion.V7_0;

/// <summary>
/// The versions of Azure Key Vault supported by this client
/// library.
/// library.
/// </summary>
public enum ServiceVersion
{
Expand All @@ -35,7 +35,7 @@ public enum ServiceVersion

/// <summary>
/// Gets the <see cref="ServiceVersion"/> of the service API used when
/// making requests. For more information, see
/// making requests. For more information, see
/// <see href="https://docs.microsoft.com/en-us/rest/api/keyvault/key-vault-versions"/>
/// </summary>
public ServiceVersion Version { get; }
Expand All @@ -46,13 +46,13 @@ public enum ServiceVersion
/// </summary>
/// <param name="version">
/// The <see cref="ServiceVersion"/> of the service API used when
/// making requests.
/// making requests.
/// </param>
public KeyClientOptions(ServiceVersion version = ServiceVersion.V7_0)
{
this.Version = version;
}

internal string GetVersionString()
{
var version = string.Empty;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,5 @@ internal override void WriteProperties(Utf8JsonWriter json)
}

internal override void ReadProperties(JsonElement json) { }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,20 @@ public class RsaKeyCreateOptions : KeyCreateOptions
/// </summary>
public int? KeySize { get; set; }

/// <summary>
/// <summary>
/// Determines whether or not a hardware key (HSM) is used for creation.
/// </summary>
///
/// <value><c>true</c> to use a hardware key; <c>false</c> to use a software key</value>
public bool Hsm { get; private set; }


/// <summary>
/// Initializes a new instance of the RsaKeyCreateOptions class.
/// </summary>
/// <param name="name">The name of the key.</param>
/// <param name="hsm">Whether to import as a hardware key (HSM) or software key.</param>
/// <param name="keySize">Key size in bits.</param>
public RsaKeyCreateOptions(string name, bool hsm, int? keySize = null)
public RsaKeyCreateOptions(string name, bool hsm, int? keySize = null)
{
Name = name;
Hsm = hsm;
Expand Down
3 changes: 1 addition & 2 deletions sdk/keyvault/Azure.Security.KeyVault.Secrets/src/Page.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ internal override void ReadProperties(JsonElement json)
i++;
}
}

}

if (json.TryGetProperty("nextLink", out JsonElement nextLink))
Expand All @@ -68,7 +67,7 @@ internal override void ReadProperties(JsonElement json)

internal override void WriteProperties(ref Utf8JsonWriter json)
{
// serialization is not needed this type is only in responses
// serialization is not needed this type is only in responses
throw new NotImplementedException();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public SecretBase(string name)
/// Secret identifier.
/// </summary>
public Uri Id => _identifier.Id;

/// <summary>
/// Vault base URL.
/// </summary>
Expand Down Expand Up @@ -64,7 +64,7 @@ public SecretBase(string name)
public bool? Managed { get; private set; }

/// <summary>
/// If this is a secret backing a KV certificate, then this field specifies
/// If this is a secret backing a KV certificate, then this field specifies
/// the corresponding key backing the KV certificate.
/// </summary>
public string KeyId { get; private set; }
Expand Down
38 changes: 19 additions & 19 deletions sdk/storage/Azure.Storage.Blobs/src/AppendBlobClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ namespace Azure.Storage.Blobs.Specialized
/// <summary>
/// The <see cref="AppendBlobClient"/> allows you to manipulate Azure
/// Storage append blobs.
///
///
/// An append blob is comprised of blocks and is optimized for append
/// operations. When you modify an append blob, blocks are added to the
/// end of the blob only, via the <see cref="AppendBlockAsync"/>
/// operation. Updating or deleting of existing blocks is not supported.
/// Unlike a block blob, an append blob does not expose its block IDs.
///
///
/// Each block in an append blob can be a different size, up to a maximum
/// of 4 MB, and an append blob can include up to 50,000 blocks. The
/// maximum size of an append blob is therefore slightly more than 195 GB
Expand Down Expand Up @@ -56,12 +56,12 @@ protected AppendBlobClient()
/// <summary>
/// Initializes a new instance of the <see cref="AppendBlobClient"/>
/// class.
/// </summary>
/// </summary>
/// <param name="connectionString">
/// A connection string includes the authentication information
/// required for your application to access data in an Azure Storage
/// account at runtime.
///
///
/// For more information, <see href="https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string"/>.
/// </param>
/// <param name="containerName">
Expand All @@ -78,12 +78,12 @@ public AppendBlobClient(string connectionString, string containerName, string bl
/// <summary>
/// Initializes a new instance of the <see cref="AppendBlobClient"/>
/// class.
/// </summary>
/// </summary>
/// <param name="connectionString">
/// A connection string includes the authentication information
/// required for your application to access data in an Azure Storage
/// account at runtime.
///
///
/// For more information, <see href="https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string"/>.
/// </param>
/// <param name="containerName">
Expand Down Expand Up @@ -187,7 +187,7 @@ internal AppendBlobClient(Uri blobUri, HttpPipeline pipeline)
/// Initializes a new instance of the <see cref="AppendBlobClient"/>
/// class with an identical <see cref="Uri"/> source but the specified
/// <paramref name="snapshot"/> timestamp.
///
///
/// For more information, see <see href="https://docs.microsoft.com/en-us/rest/api/storageservices/creating-a-snapshot-of-a-blob" />.
/// </summary>
/// <param name="snapshot">The snapshot identifier.</param>
Expand All @@ -208,7 +208,7 @@ internal AppendBlobClient(Uri blobUri, HttpPipeline pipeline)
/// append blob. The content of any existing blob is overwritten with
/// the newly initialized append blob. To add content to the append
/// blob, call the <see cref="AppendBlock"/> operation.
///
///
/// For more information, see <see href="https://docs.microsoft.com/rest/api/storageservices/put-blob" />.
/// </summary>
/// <param name="httpHeaders">
Expand Down Expand Up @@ -252,7 +252,7 @@ public virtual Response<BlobContentInfo> Create(
/// append blob. The content of any existing blob is overwritten with
/// the newly initialized append blob. To add content to the append
/// blob, call the <see cref="AppendBlockAsync"/> operation.
///
///
/// For more information, see <see href="https://docs.microsoft.com/rest/api/storageservices/put-blob" />.
/// </summary>
/// <param name="httpHeaders">
Expand Down Expand Up @@ -296,7 +296,7 @@ await this.CreateInternal(
/// append blob. The content of any existing blob is overwritten with
/// the newly initialized append blob. To add content to the append
/// blob, call the <see cref="AppendBlockAsync"/> operation.
///
///
/// For more information, see <see href="https://docs.microsoft.com/rest/api/storageservices/put-blob" />.
/// </summary>
/// <param name="httpHeaders">
Expand Down Expand Up @@ -382,7 +382,7 @@ private async Task<Response<BlobContentInfo>> CreateInternal(
/// to the end of the existing append blob. The <see cref="AppendBlock"/>
/// operation is only permitted if the blob was created as an append
/// blob.
///
///
/// For more information, see <see href="https://docs.microsoft.com/rest/api/storageservices/append-block" />.
/// </summary>
/// <param name="content">
Expand Down Expand Up @@ -438,7 +438,7 @@ public virtual Response<BlobAppendInfo> AppendBlock(
/// to the end of the existing append blob. The <see cref="AppendBlockAsync"/>
/// operation is only permitted if the blob was created as an append
/// blob.
///
///
/// For more information, see <see href="https://docs.microsoft.com/rest/api/storageservices/append-block" />.
/// </summary>
/// <param name="content">
Expand Down Expand Up @@ -494,7 +494,7 @@ await this.AppendBlockInternal(
/// to the end of the existing append blob. The <see cref="AppendBlockInternal"/>
/// operation is only permitted if the blob was created as an append
/// blob.
///
///
/// For more information, see <see href="https://docs.microsoft.com/rest/api/storageservices/append-block" />.
/// </summary>
/// <param name="content">
Expand Down Expand Up @@ -534,8 +534,8 @@ await this.AppendBlockInternal(
/// </remarks>
private async Task<Response<BlobAppendInfo>> AppendBlockInternal(
Stream content,
byte[] transactionalContentHash,
AppendBlobAccessConditions? accessConditions,
byte[] transactionalContentHash,
AppendBlobAccessConditions? accessConditions,
IProgress<StorageProgress> progressHandler,
bool async,
CancellationToken cancellationToken)
Expand Down Expand Up @@ -572,7 +572,7 @@ private async Task<Response<BlobAppendInfo>> AppendBlockInternal(
ifModifiedSince: accessConditions?.HttpAccessConditions?.IfModifiedSince,
ifUnmodifiedSince: accessConditions?.HttpAccessConditions?.IfUnmodifiedSince,
ifMatch: accessConditions?.HttpAccessConditions?.IfMatch,
ifNoneMatch: accessConditions?.HttpAccessConditions?.IfNoneMatch,
ifNoneMatch: accessConditions?.HttpAccessConditions?.IfNoneMatch,
async: async,
cancellationToken: cancellationToken);
},
Expand All @@ -599,7 +599,7 @@ private async Task<Response<BlobAppendInfo>> AppendBlockInternal(
/// to the end of the existing append blob. The
/// <see cref="AppendBlockFromUri"/> operation is only permitted
/// if the blob was created as an append blob.
///
///
/// For more information, see <see href="https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url" />.
/// </summary>
/// <param name="sourceUri">
Expand Down Expand Up @@ -668,7 +668,7 @@ public virtual Response<BlobAppendInfo> AppendBlockFromUri(
/// to the end of the existing append blob. The
/// <see cref="AppendBlockFromUriAsync"/> operation is only permitted
/// if the blob was created as an append blob.
///
///
/// For more information, see <see href="https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url" />.
/// </summary>
/// <param name="sourceUri">
Expand Down Expand Up @@ -737,7 +737,7 @@ await this.AppendBlockFromUriInternal(
/// to the end of the existing append blob. The
/// <see cref="AppendBlockFromUriInternal"/> operation is only permitted
/// if the blob was created as an append blob.
///
///
/// For more information, see <see href="https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url" />.
/// </summary>
/// <param name="sourceUri">
Expand Down
10 changes: 5 additions & 5 deletions sdk/storage/Azure.Storage.Blobs/src/BlobUriBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
namespace Azure.Storage.Blobs
{
/// <summary>
/// The <see cref="BlobUriBuilder"/> class provides a convenient way to
/// The <see cref="BlobUriBuilder"/> class provides a convenient way to
/// modify the contents of a <see cref="Uri"/> instance to point to
/// different Azure Storage resources like an account, container, or blob.
///
///
/// For more information, see <see href="https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata" />.
/// </summary>
internal struct BlobUriBuilder : IEquatable<BlobUriBuilder>
Expand Down Expand Up @@ -83,7 +83,7 @@ internal struct BlobUriBuilder : IEquatable<BlobUriBuilder>

/// <summary>
/// Initializes a new instance of the <see cref="BlobUriBuilder"/>
/// class with the specified <see cref="Uri"/>.
/// class with the specified <see cref="Uri"/>.
/// </summary>
/// <param name="uri">
/// The <see cref="Uri"/> to a storage resource.
Expand Down Expand Up @@ -120,7 +120,7 @@ public BlobUriBuilder(Uri uri)
// Slash not found; path has account name & no container name
if (accountEndIndex == -1)
{
this.AccountName = path;
this.AccountName = path;
startIndex = path.Length;
}
else
Expand Down Expand Up @@ -173,7 +173,7 @@ public BlobUriBuilder(Uri uri)
/// <summary>
/// Construct a <see cref="Uri"/> representing the
/// <see cref="BlobUriBuilder"/>'s fields. The <see cref="Uri.Query"/>
/// property contains the SAS, snapshot, and unparsed query parameters.
/// property contains the SAS, snapshot, and unparsed query parameters.
/// </summary>
/// <returns>The constructed <see cref="Uri"/>.</returns>
public Uri ToUri()
Expand Down
Loading