Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.
Noncompliant code example
CREATE PROCEDURE sp_PrintMagicNumber
AS
BEGIN
PRINT 42
END
GO
CREATE FUNCTION MagicNumber()
RETURNS INT
AS
BEGIN
RETURN 42
END
GO
Compliant solution
CREATE PROCEDURE usp_PrintMagicNumber
AS
BEGIN
PRINT 42
END
GO
CREATE FUNCTION fn_MagicNumber()
RETURNS INT
AS
BEGIN
RETURN 42
END
GO