Wish Some compiler warnings should classified as hints

Widget

Well-Known Member
Licensed User
Longtime User
I noticed there are no compiler Hints in B4A. Hints are less severe than warnings because they will not cause a program to malfunction.

Warnings that could be classified as Hints (Erel can decide):
9: Unused variable '{1}'.
10: Variable '{1}' is never assigned any value.
12: Sub '{1}' is not used.
15: File '{1}' is not used.
16: Layout file '{1}' is not used. Are you missing a call to Activity.LoadLayout?
19: Empty Catch block. You should at least add Log(LastException.Message).
32: Library ‘xxxx’ is not used.

The majority of Warnings I see in the Logs are from this list and do not affect the program's logic. If these warnings could be classified as hints, then we can separate the more severe Warnings from the more mundane Hints by doing the following:
  1. Split the Logs list into 2 sections: Top & Bottom. The Top contains the Warnings (more important) and the Bottom displays the Hints. You don't need to create 2 Logs lists, just add a horizontal line like "------ Hints ------" in the existing Logs list to separate the Warnings from the Hints.

  2. If you don't like option#1, then have the ability to suppress Hints from the Logs. Perhaps right click on the Logs list and set a menu option "Display Hints" or have a checkbox etc. to control the Hints visibility.
Either way, it will help to reduce Hints from concealing actual Warnings which the programmer may otherwise miss. I am continually checking the Logs to try and discern severe warnings from hints and if they were separated it will speed things up.

TIA
 
Top