Skip to content

Commit 276c88b

Browse files
authored
Migrate Storage to new linting pattern (#39298)
Migrate Storage to new linting pattern
1 parent c2cf551 commit 276c88b

File tree

40 files changed

+814
-2
lines changed

40 files changed

+814
-2
lines changed

eng/code-quality-reports/src/main/resources/checkstyle/checkstyle.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ what the following rules do, please see the checkstyle configuration
99
page at http://checkstyle.sourceforge.net/config.html -->
1010

1111
<module name="Checker">
12+
<property name="haltOnException" value="false" />
13+
1214
<!-- Exclude module-info.java from checks, as CheckStyle does not presently support it -->
1315
<module name="BeforeExecutionExclusionFileFilter">
1416
<property name="fileNamePattern" value="module\-info\.java$"/>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE suppressions PUBLIC "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" "https://checkstyle.org/dtds/suppressions_1_2.dtd">
3+
<!-- This file is generated by the /eng/scripts/linting_suppression_generator.py script. -->
4+
5+
<suppressions>
6+
<suppress files="com.azure.storage.blob.batch.BlobBatchOperationResponse.java" checks="com.azure.tools.checkstyle.checks.ThrowFromClientLoggerCheck" />
7+
</suppressions>

sdk/storage/azure-storage-blob-batch/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@
4242
--add-reads com.azure.storage.blob.batch=com.azure.core.http.okhttp
4343
</javaModulesSurefireArgLine>
4444
<parallelizeLiveTests>concurrent</parallelizeLiveTests>
45+
46+
<checkstyle.suppressionsLocation>checkstyle-suppressions.xml</checkstyle.suppressionsLocation>
47+
48+
<spotbugs.skip>false</spotbugs.skip>
49+
<spotbugs.excludeFilterFile>spotbugs-exclude.xml</spotbugs.excludeFilterFile>
4550
</properties>
4651

4752
<dependencies>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<FindBugsFilter xmlns="https://github.com/spotbugs/filter/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
5+
<Match>
6+
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON" />
7+
<Class name="com.azure.storage.blob.batch.BlobBatchAsyncClient" />
8+
</Match>
9+
</FindBugsFilter>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE suppressions PUBLIC "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" "https://checkstyle.org/dtds/suppressions_1_2.dtd">
3+
<!-- This file is generated by the /eng/scripts/linting_suppression_generator.py script. -->
4+
5+
<suppressions>
6+
<suppress files="com.azure.storage.blob.changefeed.implementation.models.ChangefeedCursor.java" checks="JavadocMethodCheck" />
7+
<suppress files="com.azure.storage.blob.changefeed.implementation.models.SegmentCursor.java" checks="JavadocMethodCheck" />
8+
<suppress files="com.azure.storage.blob.changefeed.implementation.models.ShardCursor.java" checks="JavadocMethodCheck" />
9+
<suppress files="com.azure.storage.blob.changefeed.implementation.util.DownloadUtils.java" checks="JavadocMethodCheck" />
10+
<suppress files="com.azure.storage.blob.changefeed.implementation.util.TimeUtils.java" checks="JavadocMethodCheck" />
11+
<suppress files="com.azure.storage.blob.changefeed.implementation.models.InternalBlobChangefeedEvent.java" checks="MissingJavadocMethodCheck" />
12+
<suppress files="com.azure.storage.blob.changefeed.implementation.util.DownloadUtils.java" checks="MissingJavadocMethodCheck" />
13+
<suppress files="com.azure.storage.blob.changefeed.implementation.util.DownloadUtils.java" checks="MissingJavadocTypeCheck" />
14+
<suppress files="com.azure.storage.blob.changefeed.implementation.util.TimeUtils.java" checks="MissingJavadocTypeCheck" />
15+
</suppressions>

sdk/storage/azure-storage-blob-changefeed/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
--add-reads com.azure.storage.blob.changefeed=com.azure.core.http.okhttp
5050
</javaModulesSurefireArgLine>
5151
<parallelizeLiveTests>concurrent</parallelizeLiveTests>
52+
53+
<checkstyle.suppressionsLocation>checkstyle-suppressions.xml</checkstyle.suppressionsLocation>
54+
55+
<spotbugs.skip>false</spotbugs.skip>
56+
<spotbugs.excludeFilterFile>spotbugs-exclude.xml</spotbugs.excludeFilterFile>
5257
</properties>
5358

5459
<dependencies>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<FindBugsFilter xmlns="https://github.com/spotbugs/filter/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
5+
<Match>
6+
<Bug pattern="CT_CONSTRUCTOR_THROW" />
7+
<Class name="com.azure.storage.blob.changefeed.Changefeed" />
8+
</Match>
9+
<Match>
10+
<Bug pattern="EI_EXPOSE_REP" />
11+
<Or>
12+
<Class name="com.azure.storage.blob.changefeed.BlobChangefeedPagedResponse" />
13+
<Class name="com.azure.storage.blob.changefeed.implementation.models.SegmentCursor" />
14+
</Or>
15+
</Match>
16+
<Match>
17+
<Bug pattern="EI_EXPOSE_REP2" />
18+
<Class name="com.azure.storage.blob.changefeed.implementation.models.SegmentCursor" />
19+
</Match>
20+
</FindBugsFilter>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
/**
5+
* Package containing implementation models for Blob Changefeed.
6+
*/
7+
package com.azure.storage.blob.changefeed.implementation.models;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
/**
5+
* Package containing utility classes for Blob Changefeed.
6+
*/
7+
package com.azure.storage.blob.changefeed.implementation.util;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE suppressions PUBLIC "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" "https://checkstyle.org/dtds/suppressions_1_2.dtd">
3+
<!-- This file is generated by the /eng/scripts/linting_suppression_generator.py script. -->
4+
5+
<suppressions>
6+
<suppress files="com.azure.storage.blob.specialized.cryptography.EncryptedBlobAsyncClient.java" checks="com.azure.tools.checkstyle.checks.ServiceClientCheck" />
7+
<suppress files="com.azure.storage.blob.specialized.cryptography.EncryptedBlobClient.java" checks="com.azure.tools.checkstyle.checks.ServiceClientCheck" />
8+
</suppressions>

0 commit comments

Comments
 (0)