Skip to content

Fix one of the Android Studio warnings #5996

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

Closed
nicolas-raoul opened this issue Dec 5, 2024 · 7 comments · Fixed by #6271 or #6283
Closed

Fix one of the Android Studio warnings #5996

nicolas-raoul opened this issue Dec 5, 2024 · 7 comments · Fixed by #6271 or #6283

Comments

@nicolas-raoul
Copy link
Member

This task is designed as a small, useful task to onboard new users to the codebase who are unsure about what to work on.

Important

Unique constraint to this issue
Multiple pull requests from the same author will not be accepted, unless the refactoring is part of a larger piece of work

Tip

You do not need to be assigned this issue to work on it

Android Studio flags a number of warnings in the project.

If a file which contains these warnings is committed, then Android Studio will warn the author. If the warning was not introduced by the author's commit, then the author is unnecessarily slowed down by having to confirm that they did not introduce more warnings into the codebase (which inevitably leads them to disabling the warning, as they're low value).

The list of warnings can be obtained via:

  • Code -> Inspect Code

Screenshot 2023-02-16 at 21 38 16

The aim of this task is to introduce new contributors to the code with an 'easy' first issue to resolve.

  1. Run Code -> Inspect Code on the solution (it will be slow)
  2. Select one file which has warnings (under the Kotlin header is easiest.- many of the Java warnings are not flagged by the IDE)
  3. Fix all the errors, warnings + weak warnings in the file, automatically if this is offered by the IDE, or manually otherwise.
  4. Produce a Pull Request

(Note to core team: Once this issue has been all completed, we can use CI to run Android Studio in headless mode to ensure that the codebase gets to, and stays at 0 warnings.)

@KYash03
Copy link

KYash03 commented Dec 6, 2024

Hey, I worked on this. Here's my PR

Would appreciate some feedback. Thank you!

@savsch
Copy link
Contributor

savsch commented Dec 12, 2024

I worked on LocationPickerActivity.kt #6026

Would like clarification on whether renaming a package (to fix the weak warning "Package name part should not start with an uppercase") falls under the scope of this issue or not.

@nicolas-raoul
Copy link
Member Author

@savsch Yes fixing package case-related warnings is in scope, thanks! 🙂

nicolas-raoul added a commit that referenced this issue Dec 13, 2024
#6026)

* Replace deprecated zoomLevel with zoomLevelDouble

* Replace deprecated Html.fromHtml call

* LocationPickerActivity: Replace deprecated methods with androidx

* LocationPickerActivity: Reformatted overlong lines

* Renamed package LocationPicker to locationpicker

---------

Co-authored-by: Nicolas Raoul <[email protected]>
@Prinuel
Copy link
Contributor

Prinuel commented Mar 28, 2025

Hello, i an new here, and i will like to jump on this, but for clarity, one is expected to correct the errors in only one file?, can i correct errors in more than one file?

@nicolas-raoul
Copy link
Member Author

@Prinuel Maybe do it for 1 file first, and if it goes well you can do for as many as you want. 🙂

@Prinuel
Copy link
Contributor

Prinuel commented Mar 28, 2025

Alrighty.... thanks

@savsch
Copy link
Contributor

savsch commented Apr 3, 2025

@nicolas-raoul this issue seems to have been closed accidentally, possibly due to being linked to #6271.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
@nicolas-raoul @Prinuel @KYash03 @savsch and others