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

Add @Multipart/@Part Retrofit lint updates #320

Merged
merged 3 commits into from
Oct 14, 2024

Conversation

ryan-moore-slack
Copy link
Contributor

@ryan-moore-slack ryan-moore-slack commented Oct 9, 2024

Summary

This PR updates the RetrofitUsageDetector to include support for @Multipart annotated methods and @Part annotated parameters per Retrofit doc. Added test cases for new lints and success path.

Requirements (place an x in each [ ])

The following point can be removed after setting up CI (such as Travis) with coverage reports (such as Codecov)

  • [x ] I've written tests to cover the new code and functionality included in this PR.

The following point can be removed after setting up a CLA reporting tool such as cla-assistant.io

@@ -55,18 +55,25 @@ class RetrofitUsageDetector : Detector(), SourceCodeScanner {
val annotationsByFqcn = node.uAnnotations.associateBy { it.qualifiedName }

val isFormUrlEncoded = FQCN_FORM_ENCODED in annotationsByFqcn
val isMultipart = FQCN_MULTIPART in annotationsByFqcn
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit before you merge: move this down to the line before the if statement that uses it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolved in 6161a32

@ryan-moore-slack ryan-moore-slack added this pull request to the merge queue Oct 14, 2024
Merged via the queue into main with commit 3344c3a Oct 14, 2024
3 checks passed
@ryan-moore-slack ryan-moore-slack deleted the ryanmoore/retrofit-multipart-updates branch October 14, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants