FYI, from the 2018 British Columbia Plumbing Code:
2.6.1.9. Water Hammer
1) Provision shall be made to protect the water distribution system from the adverse effects of water hammer. (See Note A-2.6.1.9.(1).)
A-2.6.1.9.(1) Water Hammer Prevention. Water hammer is a buildup of pressure in a length of horizontal or vertical pipe that occurs when a valve or faucet is closed suddenly. The longer the pipe and the greater the water velocity, the greater the pressure exerted on the pipe, which can be many times the normal static water pressure and be sufficient to damage the piping system. Since air chambers made from a piece of vertical pipe do not provide acceptable protection, pre-manufactured water hammer arresters are required to address this potential problem. Water hammer arresters need not be installed at every valve or faucet, nor in every piping system.
Cheers, Wayne