-
Type:
Task
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
QE 2025-02-17
-
None
-
None
-
None
-
None
-
None
-
None
-
None
SERVER-96709 replaces all instances of tojson() in jstests with tojsonForLogging(), however, it does not prevent test authors adding new tojson() for log output in their tests, which could potentially break JSON format (tojson() does not always produce valid JSON).
Although there are few other tickets aiming at reducing the need of tojson() or tojsonForLogging() (see SERVER-100146 and SERVER-96943) we should try to prevent new tojson() from being added by adding a new linting rule.
Note: 'golden' tests might depend on 'tojson()'.
- duplicates
-
SERVER-99572 Discourage new uses of print() in jstests through linting
-
- Closed
-
- is related to
-
SERVER-101533 Add eslint rule that catches attempts of calling print(tojson(...)) in jstests
-
- Closed
-