-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
The idea for this comes from Rack::Lint.
There are several cases in which the driver is required by relevant specifications to pass bogus data to the server, and let the server fail the request. This is useful for forward compatibility as the server can add new features in the future and have older driver versions transparently use said features, but also complicates debugging.
This ticket proposes to add an optional linter, enabled via MONGO_RUBY_DRIVER_LINT environment variable, which will perform additional validations on data prior to sending it to the server to catch errors quicker. Such a linter is very useful during driver development.