customLintTest function

void customLintTest()

Test function containing a print statement that should trigger the lint warning.

This function deliberately uses a print statement to verify that our custom lint rule correctly identifies and flags such usage. When analysing this file, the custom lint rule should generate a warning for the print statement below.

Expected lint warning:

  • Location: The print statement in this function
  • Message: "Avoid using print statements in production code."

Implementation

void customLintTest() {
  // This print statement should trigger our custom lint warning.
  // Note: uncomment the line below to trigger the lint warning.

  // print('Hello world! We expect this to be flagged by the custom lint.');
}