Skip to content

Commit 53eff17

Browse files
authored
Remove Linting Rules That No Longer Apply (Azure#20037)
1 parent f7a3b48 commit 53eff17

File tree

3 files changed

+3
-76
lines changed

3 files changed

+3
-76
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ the main ServiceBusClientBuilder. -->
229229
<suppress checks="com.azure.tools.checkstyle.checks.GoodLoggingCheck" files="ClientLogger.java"/>
230230
<suppress checks="com.azure.tools.checkstyle.checks.GoodLoggingCheck" files="DefaultLogger.java"/>
231231

232-
<!-- Azure Core Test -->
233-
<suppress checks="com.azure.tools.checkstyle.checks.GoodLoggingCheck" files=".*[/\\]core[/\\]test[/\\].*\.java"/>
234232
<!-- Requires static access to logger to report errors while loading i18n messages (from within a static initializer )-->
235233
<suppress checks="com.azure.tools.checkstyle.checks.GoodLoggingCheck" files="Messages.java"/>
236234

@@ -323,10 +321,6 @@ the main ServiceBusClientBuilder. -->
323321
<suppress checks="."
324322
files=".*[/\\]azure-quantum-jobs[/\\]src[/\\]main[/\\]java[/\\]"/>
325323

326-
<!-- Suppress external dependency check for jacksonwrapper overriding deserialize method -->
327-
<suppress checks="com.azure.tools.checkstyle.checks.ExternalDependencyExposedCheck"
328-
files="com.azure.core.implementation.serializer.jsonwrapper.jacksonwrapper.JacksonDeserializer.java"/>
329-
330324
<!-- Suppress ConfigurationCredentialsPolicy for HttpPipelinePolicyCheck.
331325
This suppression need to be deleted after AzConfig using AAD credential.
332326
Issue Link: https://github.com/Azure/azure-sdk-for-java/issues/5131 -->
@@ -538,4 +532,7 @@ the main ServiceBusClientBuilder. -->
538532
files=".*[/\\]azure[/\\]security[/\\]attestation[/\\]AttestationClientBuilder.java"/>
539533
<suppress checks="WhitespaceAround|ThrowFromClientLogger"
540534
files="com.azure.security.attestation.models.*\.java"/>
535+
536+
<suppress checks="com.azure.tools.checkstyle.checks.GoodLoggingCheck"
537+
files="com.azure.core.test.AzureTestWatcher.java"/>
541538
</suppressions>

eng/code-quality-reports/src/main/resources/revapi/revapi.json

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,6 @@
5757
"exampleUseChainInNewApi": ".*com\\.azure\\.core\\.util\\.serializer\\.JacksonAdapter.*",
5858
"justification": "We allow this in com.azure.core.util.serializer.JacksonAdapter."
5959
},
60-
{
61-
"regex": true,
62-
"code": "java\\.missing\\.(oldSuperType|newSuperType)",
63-
"new": "class com\\.azure\\.core\\.http\\.rest\\.((PagedFlux<T extends java\\.lang\\.Object>)|(PagedFluxBase<T extends java\\.lang\\.Object.*>)).*",
64-
"justification": "azure.core 1.3.0 will introduce a new base type for GAed PagedFlux. Since the base type is not in azure.core <= 1.2.0, revapi is reporting it. This entry should be removed after 1.3.0 release."
65-
},
66-
{
67-
"code": "java.method.addedToInterface",
68-
"new": "method com.azure.core.util.IterableStream<T> com.azure.core.util.paging.ContinuablePage<C, T>::getElements() @ com.azure.core.http.rest.PagedResponse<T>",
69-
"justification": "Exposed through revapi transitive dependency checking. azure.core 1.3.0 will introduce a new base type for GAed PagedFlux. Since the base type is not in azure.core <= 1.2.0, revapi is reporting it. This entry should be removed after 1.3.0 release."
70-
},
71-
{
72-
"code": "java.method.parameterTypeChanged",
73-
"new": "parameter java.lang.Iterable<P> com.azure.core.util.paging.ContinuablePagedIterable<C, T, P extends com.azure.core.util.paging.ContinuablePage<C extends java.lang.Object, T extends java.lang.Object>>::iterableByPage(===int===) @ com.azure.core.http.rest.PagedIterableBase<T, P extends com.azure.core.http.rest.PagedResponse<T extends java.lang.Object>>",
74-
"justification": "A new overload which shares the same number of parameters was introduced, confusing revapi. azure.core 1.3.0 will introduce a new base type for GAed PagedIterable. Since the base type is not in azure.core <= 1.2.0, revapi is reporting it. This entry should be removed after 1.3.0 release."
75-
},
7660
{
7761
"regex": true,
7862
"code": "java.class.nonPublicPartOfAPI",
@@ -91,21 +75,6 @@
9175
"new": "(class|enum|interface) org\\.conscrypt\\..*",
9276
"justification": "skip check for third party files."
9377
},
94-
{
95-
"code": "java.method.parameterTypeChanged",
96-
"new": "parameter java.lang.Iterable<P> com.azure.core.util.paging.ContinuablePagedIterable<C, T, P extends com.azure.core.util.paging.ContinuablePage<C extends java.lang.Object, T extends java.lang.Object>>::iterableByPage(===int===) @ com.azure.core.http.rest.PagedIterable<T>",
97-
"justification": "A new overload which shares the same number of parameters was introduced, confusing revapi. azure.core 1.3.0 will introduce a new base type for GAed PagedIterable. Since the base type is not in azure.core <= 1.2.0, revapi is reporting it. This entry should be removed after 1.3.0 release."
98-
},
99-
{
100-
"code": "java.method.parameterTypeChanged",
101-
"new": "parameter java.util.stream.Stream<P> com.azure.core.util.paging.ContinuablePagedIterable<C, T, P extends com.azure.core.util.paging.ContinuablePage<C extends java.lang.Object, T extends java.lang.Object>>::streamByPage(===int===) @ com.azure.core.http.rest.PagedIterableBase<T, P extends com.azure.core.http.rest.PagedResponse<T extends java.lang.Object>>",
102-
"justification": "A new overload which shares the same number of parameters was introduced, confusing revapi. azure.core 1.3.0 will introduce a new base type for GAed PagedIterable. Since the base type is not in azure.core <= 1.2.0, revapi is reporting it. This entry should be removed after 1.3.0 release."
103-
},
104-
{
105-
"code": "java.method.parameterTypeChanged",
106-
"new": "parameter java.util.stream.Stream<P> com.azure.core.util.paging.ContinuablePagedIterable<C, T, P extends com.azure.core.util.paging.ContinuablePage<C extends java.lang.Object, T extends java.lang.Object>>::streamByPage(===int===) @ com.azure.core.http.rest.PagedIterable<T>",
107-
"justification": "A new overload which shares the same number of parameters was introduced, confusing revapi. azure.core 1.3.0 will introduce a new base type for GAed PagedIterable. Since the base type is not in azure.core <= 1.2.0, revapi is reporting it. This entry should be removed after 1.3.0 release."
108-
},
10978
{
11079
"regex": true,
11180
"code": "java\\.class\\.(noLongerInheritsFromClass|nonFinalClassInheritsFromNewClass)",

eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,6 @@
319319
<Or>
320320
<Class name="com.azure.core.http.HttpPipelineNextPolicy"/>
321321
<Class name="com.azure.core.http.HttpRequest"/>
322-
<Class
323-
name="~com\.azure\.core\.auth\.credentials\.(MSIConfigurationForAppService|MSIConfigurationForVirtualMachine)"/>
324322
</Or>
325323
<Bug pattern="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE"/>
326324
</Match>
@@ -351,37 +349,6 @@
351349
<Bug pattern="BC_UNCONFIRMED_CAST"/>
352350
</Match>
353351

354-
<!-- These fields are designed to be not written. They are for deserializing. -->
355-
<Match>
356-
<Class name="com.azure.core.auth.credentials.AzureCliSubscription$UserInfo"/>
357-
<Bug pattern="UWF_UNWRITTEN_FIELD"/>
358-
</Match>
359-
360-
<!-- These fields are designed to be not read. They are for deserializing. -->
361-
<Match>
362-
<Class name="com.azure.core.auth.credentials.AzureCliToken"/>
363-
<Bug pattern="URF_UNREAD_FIELD"/>
364-
</Match>
365-
366-
<!-- These fields are designed to be not used. They are for deserializing. -->
367-
<Match>
368-
<Class name="~com\.azure\.core\.auth\.credentials\.(AzureCliToken|AzureCliSubscription)"/>
369-
<Bug pattern="UUF_UNUSED_FIELD"/>
370-
</Match>
371-
372-
<!-- These fields are designed to be anonymous and not static. They are for letting the jackson serializer know what
373-
type to use. -->
374-
<Match>
375-
<Class name="com.azure.core.auth.credentials.AzureCliCredentials"/>
376-
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
377-
</Match>
378-
379-
<!-- These fields has checked null and initialized in the constructor. -->
380-
<Match>
381-
<Class name="com.azure.core.auth.credentials.AzureCliCredentials"/>
382-
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
383-
</Match>
384-
385352
<!-- The fields are checked for null in the build method and throw exceptions if values for fields are not specified. -->
386353
<Match>
387354
<Class name="com.azure.identity.InteractiveBrowserCredentialBuilder"/>
@@ -719,12 +686,6 @@
719686
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
720687
</Match>
721688

722-
<!-- Initial implementation of JacksonDeserializer is using an inline class-->
723-
<Match>
724-
<Class name="com.azure.core.implementation.serializer.jsonwrapper.jacksonwrapper.JacksonDeserializer"/>
725-
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
726-
</Match>
727-
728689
<!-- Implementation name confusing with public API name and non-public API -->
729690
<Match>
730691
<Or>

0 commit comments

Comments
 (0)