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

Migrate Storage to new linting pattern #39298

Merged
merged 3 commits into from
Mar 20, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ what the following rules do, please see the checkstyle configuration
page at http://checkstyle.sourceforge.net/config.html -->

<module name="Checker">
<property name="haltOnException" value="false" />

<!-- Exclude module-info.java from checks, as CheckStyle does not presently support it -->
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suppressions PUBLIC "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" "https://checkstyle.org/dtds/suppressions_1_2.dtd">
<!-- This file is generated by the /eng/scripts/linting_suppression_generator.py script. -->

<suppressions>
<suppress files="com.azure.storage.blob.batch.BlobBatchOperationResponse.java" checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" />
</suppressions>
5 changes: 5 additions & 0 deletions sdk/storage/azure-storage-blob-batch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
--add-reads com.azure.storage.blob.batch=com.azure.core.http.okhttp
</javaModulesSurefireArgLine>
<parallelizeLiveTests>concurrent</parallelizeLiveTests>

<checkstyle.suppressionsLocation>checkstyle-suppressions.xml</checkstyle.suppressionsLocation>

<spotbugs.skip>false</spotbugs.skip>
<spotbugs.excludeFilterFile>spotbugs-exclude.xml</spotbugs.excludeFilterFile>
</properties>

<dependencies>
Expand Down
9 changes: 9 additions & 0 deletions sdk/storage/azure-storage-blob-batch/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>

<FindBugsFilter xmlns="https://github.com/spotbugs/filter/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
<Match>
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON" />
<Class name="com.azure.storage.blob.batch.BlobBatchAsyncClient" />
</Match>
</FindBugsFilter>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suppressions PUBLIC "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" "https://checkstyle.org/dtds/suppressions_1_2.dtd">
<!-- This file is generated by the /eng/scripts/linting_suppression_generator.py script. -->

<suppressions>
<suppress files="com.azure.storage.blob.changefeed.implementation.models.ChangefeedCursor.java" checks="JavadocMethodCheck" />
<suppress files="com.azure.storage.blob.changefeed.implementation.models.SegmentCursor.java" checks="JavadocMethodCheck" />
<suppress files="com.azure.storage.blob.changefeed.implementation.models.ShardCursor.java" checks="JavadocMethodCheck" />
<suppress files="com.azure.storage.blob.changefeed.implementation.util.DownloadUtils.java" checks="JavadocMethodCheck" />
<suppress files="com.azure.storage.blob.changefeed.implementation.util.TimeUtils.java" checks="JavadocMethodCheck" />
<suppress files="com.azure.storage.blob.changefeed.implementation.models.InternalBlobChangefeedEvent.java" checks="MissingJavadocMethodCheck" />
<suppress files="com.azure.storage.blob.changefeed.implementation.util.DownloadUtils.java" checks="MissingJavadocMethodCheck" />
<suppress files="com.azure.storage.blob.changefeed.implementation.util.DownloadUtils.java" checks="MissingJavadocTypeCheck" />
<suppress files="com.azure.storage.blob.changefeed.implementation.util.TimeUtils.java" checks="MissingJavadocTypeCheck" />
</suppressions>
5 changes: 5 additions & 0 deletions sdk/storage/azure-storage-blob-changefeed/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
--add-reads com.azure.storage.blob.changefeed=com.azure.core.http.okhttp
</javaModulesSurefireArgLine>
<parallelizeLiveTests>concurrent</parallelizeLiveTests>

<checkstyle.suppressionsLocation>checkstyle-suppressions.xml</checkstyle.suppressionsLocation>

<spotbugs.skip>false</spotbugs.skip>
<spotbugs.excludeFilterFile>spotbugs-exclude.xml</spotbugs.excludeFilterFile>
</properties>

<dependencies>
Expand Down
20 changes: 20 additions & 0 deletions sdk/storage/azure-storage-blob-changefeed/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>

<FindBugsFilter xmlns="https://github.com/spotbugs/filter/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
<Class name="com.azure.storage.blob.changefeed.Changefeed" />
</Match>
<Match>
<Bug pattern="EI_EXPOSE_REP" />
<Or>
<Class name="com.azure.storage.blob.changefeed.BlobChangefeedPagedResponse" />
<Class name="com.azure.storage.blob.changefeed.implementation.models.SegmentCursor" />
</Or>
</Match>
<Match>
<Bug pattern="EI_EXPOSE_REP2" />
<Class name="com.azure.storage.blob.changefeed.implementation.models.SegmentCursor" />
</Match>
</FindBugsFilter>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

/**
* Package containing implementation models for Blob Changefeed.
*/
package com.azure.storage.blob.changefeed.implementation.models;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

/**
* Package containing utility classes for Blob Changefeed.
*/
package com.azure.storage.blob.changefeed.implementation.util;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suppressions PUBLIC "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" "https://checkstyle.org/dtds/suppressions_1_2.dtd">
<!-- This file is generated by the /eng/scripts/linting_suppression_generator.py script. -->

<suppressions>
<suppress files="com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.java" checks="com.azure.tools.checkstyle.checks.ServiceClientCheck" />
<suppress files="com.azure.storage.blob.specialized.cryptography.EncryptedBlobClient.java" checks="com.azure.tools.checkstyle.checks.ServiceClientCheck" />
</suppressions>
5 changes: 5 additions & 0 deletions sdk/storage/azure-storage-blob-cryptography/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@
--add-reads com.azure.storage.blob.cryptography=com.azure.core.http.okhttp
</javaModulesSurefireArgLine>
<parallelizeLiveTests>concurrent</parallelizeLiveTests>

<checkstyle.suppressionsLocation>checkstyle-suppressions.xml</checkstyle.suppressionsLocation>

<spotbugs.skip>false</spotbugs.skip>
<spotbugs.excludeFilterFile>spotbugs-exclude.xml</spotbugs.excludeFilterFile>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>

<FindBugsFilter xmlns="https://github.com/spotbugs/filter/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
<Class name="com.azure.storage.blob.specialized.cryptography.EncryptorV1" />
</Match>
<Match>
<Bug pattern="EI_EXPOSE_REP2" />
<Class name="com.azure.storage.blob.specialized.cryptography.EncryptedBlobClientBuilder" />
</Match>
</FindBugsFilter>
19 changes: 19 additions & 0 deletions sdk/storage/azure-storage-blob-nio/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suppressions PUBLIC "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" "https://checkstyle.org/dtds/suppressions_1_2.dtd">
<!-- This file is generated by the /eng/scripts/linting_suppression_generator.py script. -->

<suppressions>
<suppress files="com.azure.storage.blob.nio.AzureFileSystemProvider.java" checks="com.azure.tools.checkstyle.checks.GoodLoggingCheck" />
<suppress files="com.azure.storage.blob.nio.AzureBasicFileAttributeView.java" checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" />
<suppress files="com.azure.storage.blob.nio.AzureBlobFileAttributeView.java" checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" />
<suppress files="com.azure.storage.blob.nio.AzureDirectoryStream.java" checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" />
<suppress files="com.azure.storage.blob.nio.AzureFileStore.java" checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" />
<suppress files="com.azure.storage.blob.nio.AzureFileSystem.java" checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" />
<suppress files="com.azure.storage.blob.nio.AzureFileSystemProvider.java" checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" />
<suppress files="com.azure.storage.blob.nio.AzurePath.java" checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" />
<suppress files="com.azure.storage.blob.nio.AzureResource.java" checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" />
<suppress files="com.azure.storage.blob.nio.AzureSeekableByteChannel.java" checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" />
<suppress files="com.azure.storage.blob.nio.NioBlobInputStream.java" checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" />
<suppress files="com.azure.storage.blob.nio.NioBlobOutputStream.java" checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" />
<suppress files="com.azure.storage.blob.nio.AzureFileSystemProvider.java" checks="com.azure.tools.checkstyle.checks.UseCaughtExceptionCauseCheck" />
</suppressions>
5 changes: 5 additions & 0 deletions sdk/storage/azure-storage-blob-nio/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
--add-reads com.azure.storage.blob.nio=com.azure.core.http.okhttp
</javaModulesSurefireArgLine>
<parallelizeLiveTests>concurrent</parallelizeLiveTests>

<checkstyle.suppressionsLocation>checkstyle-suppressions.xml</checkstyle.suppressionsLocation>

<spotbugs.skip>false</spotbugs.skip>
<spotbugs.excludeFilterFile>spotbugs-exclude.xml</spotbugs.excludeFilterFile>
</properties>

<dependencies>
Expand Down
20 changes: 20 additions & 0 deletions sdk/storage/azure-storage-blob-nio/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>

<FindBugsFilter xmlns="https://github.com/spotbugs/filter/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
<Class name="com.azure.storage.blob.nio.AzureDirectoryStream$AzureDirectoryIterator" />
</Match>
<Match>
<Bug pattern="EI_EXPOSE_REP" />
<Or>
<Class name="com.azure.storage.blob.nio.AzureDirectoryStream" />
<Class name="com.azure.storage.blob.nio.AzureFileSystem" />
</Or>
</Match>
<Match>
<Bug pattern="NP_BOOLEAN_RETURN_NULL" />
<Class name="com.azure.storage.blob.nio.AzureBlobFileAttributes" />
</Match>
</FindBugsFilter>
42 changes: 42 additions & 0 deletions sdk/storage/azure-storage-blob/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suppressions PUBLIC "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" "https://checkstyle.org/dtds/suppressions_1_2.dtd">
<!-- This file is generated by the /eng/scripts/linting_suppression_generator.py script. -->

<suppressions>
<suppress files="com.azure.storage.blob.implementation.accesshelpers.BlobDownloadAsyncResponseConstructorProxy.java" checks="JavadocMethodCheck" />
<suppress files="com.azure.storage.blob.implementation.util.BlobSasImplUtil.java" checks="JavadocMethodCheck" />
<suppress files="com.azure.storage.blob.implementation.util.BuilderHelper.java" checks="JavadocMethodCheck" />
<suppress files="com.azure.storage.blob.implementation.util.ModelHelper.java" checks="JavadocMethodCheck" />
<suppress files="com.azure.storage.blob.implementation.AppendBlobsImpl.java" checks="MissingJavadocMethodCheck" />
<suppress files="com.azure.storage.blob.implementation.BlobsImpl.java" checks="MissingJavadocMethodCheck" />
<suppress files="com.azure.storage.blob.implementation.BlockBlobsImpl.java" checks="MissingJavadocMethodCheck" />
<suppress files="com.azure.storage.blob.implementation.ContainersImpl.java" checks="MissingJavadocMethodCheck" />
<suppress files="com.azure.storage.blob.implementation.PageBlobsImpl.java" checks="MissingJavadocMethodCheck" />
<suppress files="com.azure.storage.blob.implementation.ServicesImpl.java" checks="MissingJavadocMethodCheck" />
<suppress files="com.azure.storage.blob.implementation.models.PageListHelper.java" checks="MissingJavadocMethodCheck" />
<suppress files="com.azure.storage.blob.implementation.util.BuilderHelper.java" checks="MissingJavadocMethodCheck" />
<suppress files="com.azure.storage.blob.implementation.util.ChunkedDownloadUtils.java" checks="MissingJavadocMethodCheck" />
<suppress files="com.azure.storage.blob.implementation.util.ModelHelper.java" checks="MissingJavadocMethodCheck" />
<suppress files="com.azure.storage.blob.implementation.models.PageListHelper.java" checks="MissingJavadocTypeCheck" />
<suppress files="com.azure.storage.blob.implementation.util.BlobRequestConditionProperty.java" checks="MissingJavadocTypeCheck" />
<suppress files="com.azure.storage.blob.implementation.util.CustomHierarchicalListingDeserializer.java" checks="MissingJavadocTypeCheck" />
<suppress files="com.azure.storage.blob.implementation.BlobsImpl.java" checks="com.azure.tools.checkstyle.checks.DenyListedWordsCheck" />
<suppress files="com.azure.storage.blob.implementation.BlockBlobsImpl.java" checks="com.azure.tools.checkstyle.checks.DenyListedWordsCheck" />
<suppress files="com.azure.storage.blob.implementation.PageBlobsImpl.java" checks="com.azure.tools.checkstyle.checks.DenyListedWordsCheck" />
<suppress files="com.azure.storage.blob.implementation.models.BlobsAbortCopyFromURLHeaders.java" checks="com.azure.tools.checkstyle.checks.DenyListedWordsCheck" />
<suppress files="com.azure.storage.blob.implementation.models.BlobsCopyFromURLHeaders.java" checks="com.azure.tools.checkstyle.checks.DenyListedWordsCheck" />
<suppress files="com.azure.storage.blob.implementation.models.BlobsStartCopyFromURLHeaders.java" checks="com.azure.tools.checkstyle.checks.DenyListedWordsCheck" />
<suppress files="com.azure.storage.blob.implementation.models.BlockBlobsStageBlockFromURLHeaders.java" checks="com.azure.tools.checkstyle.checks.DenyListedWordsCheck" />
<suppress files="com.azure.storage.blob.implementation.models.PageBlobsUploadPagesFromURLHeaders.java" checks="com.azure.tools.checkstyle.checks.DenyListedWordsCheck" />
<suppress files="com.azure.storage.blob.implementation.util.BlobSasImplUtil.java" checks="com.azure.tools.checkstyle.checks.EnforceFinalFieldsCheck" />
<suppress files="com.azure.storage.blob.specialized.BlobOutputStream.java" checks="com.azure.tools.checkstyle.checks.EnforceFinalFieldsCheck" />
<suppress files="com.azure.storage.blob.implementation.util.BlobUserAgentModificationPolicy.java" checks="com.azure.tools.checkstyle.checks.HttpPipelinePolicyCheck" />
<suppress files="com.azure.storage.blob.implementation.util.BlobSasImplUtil.java" checks="com.azure.tools.checkstyle.checks.JavaDocFormatting" />
<suppress files="com.azure.storage.blob.implementation.util.BuilderHelper.java" checks="com.azure.tools.checkstyle.checks.JavadocThrowsChecks" />
<suppress files="com.azure.storage.blob.implementation.util.ModelHelper.java" checks="com.azure.tools.checkstyle.checks.JavadocThrowsChecks" />
<suppress files="com.azure.storage.blob.implementation.AzureBlobStorageImplBuilder.java" checks="com.azure.tools.checkstyle.checks.ServiceClientBuilderCheck" />
<suppress files="com.azure.storage.blob.BlobClient.java" checks="com.azure.tools.checkstyle.checks.ServiceClientCheck" />
<suppress files="com.azure.storage.blob.specialized.BlobLeaseAsyncClient.java" checks="com.azure.tools.checkstyle.checks.ServiceClientCheck" />
<suppress files="com.azure.storage.blob.specialized.BlobInputStream.java" checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" />
<suppress files="com.azure.storage.blob.specialized.BlobOutputStream.java" checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" />
</suppressions>
5 changes: 5 additions & 0 deletions sdk/storage/azure-storage-blob/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
</javaModulesSurefireArgLine>
<graalvm.disable>false</graalvm.disable>
<parallelizeLiveTests>concurrent</parallelizeLiveTests>

<checkstyle.suppressionsLocation>checkstyle-suppressions.xml</checkstyle.suppressionsLocation>

<spotbugs.skip>false</spotbugs.skip>
<spotbugs.excludeFilterFile>spotbugs-exclude.xml</spotbugs.excludeFilterFile>
</properties>

<dependencies>
Expand Down
Loading
Loading