File level constants for error message in require statements

Hello mates. I would like to know if there are some caveats against using
file level constants to declare error messages on require statements. I think that
is not the case because according to solidity documentation, constants are inline
and don't occupy storage, but maybe there is something that I am not seeing.

The idea is something like this

/* snip */

string constant MsgFoo = "some message" ;

contract ExampleContract {

    function exampleFunction() external {
          require(msg.sender != address(0) ,MsgFoo) ;
          /* code */
    }

}

/* snip */

What I am looking for is for test purposes. If using this approach then
when testing (at least using foundry) I would import constants declaration
and write something like this.

/* snip */

import "path/to/ExampleContract.sol" ; // MsgFoo variable is imported here

contract TestExampleContract is Test {

   ExampleContract testContract ;

    functino setUp() {
         testContract = ExampleContract() ;
    }

    function test_exampleFunction() public {      
        vm.expectRevert(MsgFoo) ;          // this declare that call to `exampleFunction`  must revert with message `MsgFoo`
        vm.prank(address(0))                     // this set msg.sender = address(0) in the next function call
        testContract.exampleFunction() ;
    }

/* snip */

Of course, you can simply copy the message string of the require statement and assign it to a constant
in your test or simply copy and paste directly the string in the expect revert statement like
vm.expectRevert(YourConstant) or vm.expectRevert("message here") although I personally
prefer to avoid this because errors may happen...(but is what I ended doing until now)

Thanks in advance.

No runtime caveats.

Some might consider this paradigm less readable, but that's a matter of opinion.

Just an quick FYI, best practise atm is to use Custom Errors instead of require statements.

error YourCustomError;
alternative:
error YourCustomError(address user)

usage:
if (msg.sender != address(0))
revert YourCustomError();

alternative:
if (msg.sender != address(0))
revert YourCustomError(msg.sender);

Using custom errors saves on gas also.

Thanks to both, I am now testing declaring constants in another file and import it to see how it goes and if it make code more readable, I would check also using more often customer errors, I believe that would very cool if require statements accepts custom errors