Halting problem only applies in the general case. I can trivially tell you that while(1) will never halt.
There are many examples of programs whose halting behavior is not known (collatz conjecture for example) but many others where program analysis works just fine.
If you write a program whose behavior is Collatz-like (say, in some states it queues up more work for itself, and in other states it completes work from the queue, and you believe that in general it should always ultimately complete the queue) it is actually useful to have a static analyzer tell you ‘it’s not entirely clear that this code will ever terminate’.
You can make the analyzer happy by adding a max iteration limit or a recursion depth limit or something to make sure it fails out rather than looping forever.
Which is probably a good idea anyway, if you’re running code that you can’t mathematically prove will always complete.
There are many examples of programs whose halting behavior is not known (collatz conjecture for example) but many others where program analysis works just fine.