-
Task
-
Resolution: Done
-
Minor
-
None
-
None
Check PRs for stray logging statements that should either be internationalized or converted to a lower log level.
This would basically be a bit of automated code review.
Grep the PR diff:
1) For lines starting with + but not ++ (i.e. ignore diff lines showing the name of changed or added files)
2) Ignore src/test/ or testsuite/
3) Look for ".info(", ".infof(", ".warn(", ".warnf(", ".error(", ".errorf(", ".fatal(", ".fatalf(", "System.out.print", "System.err.print", ".printStackTrace".
4) Ignore cases where "//" precedes the items in 3)
Fail if found.
I don't think being super helpful in the failure message is particularly important. A static failure message that generally explains what the test is looking for should suffice; if it fails people can figure out the problem easily enough by looking at the diff.
A script executed by a github action seems like a good way to do this as once it's done it can be applied to many code bases.
- is related to
-
WFCORE-6955 Add a CI job to check for non-i18n INFO/WARN/ERROR logging
- Resolved