Open JayWoodroffe opened 4 months ago
I ran Lint as a static analysis tool. Some of the reported problems are obsolete layout params, overdrawing, long vector paths, hardcoded text, image without content description, query permissions needed. Can you check out the last 3?
I ran Lint as a static analysis tool. Some of the reported problems are obsolete layout params, overdrawing, long vector paths, hardcoded text, image without content description, query permissions needed. Can you check out the last 3?
Absolutely. I can look through them tonight and summarise the issues I find by tomorrow morning.
After a meeting, we have decided for my colleague to leave out image without content description error and instead focus on implied default locale in case conversion error.
List of errors we have reviewed:
Performance Issues:
Correctness Issues:
Internationalization Issues:
In the file “activity_register_contact.xml”, there are many examples of using obsolete practices. While using LinearLayout, android:layout_below is utilized but this is incorrect: layout_below is only applicable in RelativeLayout.
In the file activity_apoointments.xml, overdraw is a repeating problem. Overdraw happens when a screen region is painted multiple times and it occurs when both the root layout and the theme apply the same background causing performance issues and unnecessary GPU usage.
In ic_settings.xml, there is a 904 character long vector path. Vectors with such complex paths can impact app performance due to high processing needs. It can cause lag when drawing views or even app crashes if the vector drawing consumes too much memory or resources. Solution alternatives:
In ClientDetails.kt, an API that is affected by query permissions is used. Recent Android versions require apps to explicitly declare other apps or packages they intend to query using intents. Without a
If toLowerCase() or toUpperCase() methods are used without specifying locale, the behavior can vary across devices due to different locales, thus leading to incorrect data handling, especially for languages other than English. This issue is present in AddClient.kt.
In documents such as activity_add_appointment.xml, activity_add_client.xml, activity_appointments.xml, etc. there is a recurring issue: the text strings in the layout are directly specified, which results in them not being translated and makes it difficult to localize the app for different regions.
commit 53ed53b76fcf1d198eefdd9ad086fc1987650a49
Running a static analysis tool and reviewing the reported problems (SonarQube, FindBugs, VS Code Analyzer, Codacy, Coverity Scan...). As static analysis tools could find numerous problems, it is enough to review only a subset of them. If the team agrees with the reported problem, it can fix some of them. Try to review different types of problem and concentrate on more complex ones (e.g. not just formatting errors).