The calculation for new walls is the lesser of the two formulas shown below.
10 x (the wall height in metres) divided by 3.
Or
0.05 x the wall thickness.
Most modern homes have a wall height of 2.1m measured from the eave lining to the base of the concrete slab.
So 10 x 2.1m divided by 3 equals 7mm
Or 0.05 x 112mm wide brick wall equals 5.6mm
If your looking at a wall that is leaning around 7mm it has been built to code and if ok.
Unfortunately older homes do have leaning walls and I have seen walls leaning around 50mm quite regularly. These often require underpinning which is expensive or the walls should be removed and re built, which costs substantially more.