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

[Nullability Annotations to Java Classes] Update wordPressLintVersion to 2.0.0 #19434

Merged
merged 2 commits into from
Oct 25, 2023
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 build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ ext {

// other
androidDesugarVersion = '1.1.8'
wordPressLintVersion = '1.1.0'
wordPressLintVersion = '2.0.0'
}

allprojects {
Expand Down
12 changes: 12 additions & 0 deletions config/lint/lint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@
<ignore path="**/generated/source/kapt/**/org/wordpress/android/push/Hilt_GCMMessageService.java" />
</issue>
<issue id="GradleDependency" severity="ignore" /> <!-- Dependabot will take care of this -->
<issue id="MissingNullAnnotationOnField">
<ignore path="**/generated/**" />
</issue>
<issue id="MissingNullAnnotationOnConstructorParameter">
<ignore path="**/generated/**" />
</issue>
<issue id="MissingNullAnnotationOnMethodParameter">
<ignore path="**/generated/**" />
</issue>
<issue id="MissingNullAnnotationOnMethodReturnType">
<ignore path="**/generated/**" />
</issue>
Comment on lines +25 to +36
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to add this config as a part of wordPressLintVersion? I think that we never really want to lint generated code in any way.

Copy link
Contributor Author

@ParaskP7 ParaskP7 Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question @wzieba ! 💯

TL:DR: We had a looooong discussion about that and ended-up merging this Lint rule without it, you could check this last comment on it, and all the relevant comments further up, I think you'll get the idea and the why behind this decision.

Hmmm... I didn't think of that, which is the fact that having checkGeneratedSources = true might be causing all this, very interesting! 🤔

Let me know if that makes sense to you too. 😄

<!-- SECURITY -->
<issue id="TrustAllX509TrustManager">
<!-- EDITOR -->
Expand Down
Loading