Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRIVERS-2790 Add more linting and integrity checks #1464

Merged
merged 3 commits into from
Dec 6, 2023

Conversation

blink1073
Copy link
Member

We have been using pre-commit on the Python team for over a year and it has been a great help in development. It is optional for local use, but runs in CI.

I've added a minimal set of integrity checks, including making sure the docs build without warnings. As a follow on, we may wish to enable the end-of-file-fixer, trailing-whitespace, and check-json hooks and then add that commit to a .git-blame-ignore-revs file so it doesn't show up in git blame (GitHub also honors this file).

I've left out the rst-backticks check and codespell for now, but those will also be useful for correctness, for example:

source/index-management/index-management.rst:1109: interally ==> internally, integrally
source/client-side-operations-timeout/client-side-operations-timeout.rst:563: overridding ==> overriding
source/client-side-operations-timeout/client-side-operations-timeout.rst:564: explict ==> explicit
source/client-side-operations-timeout/client-side-operations-timeout.rst:895: consious ==> conscious
source/client-side-operations-timeout/client-side-operations-timeout.rst:923: similiar ==> similar

@blink1073 blink1073 requested review from a team as code owners October 4, 2023 01:37
@blink1073 blink1073 requested review from jess-sig, kkloberdanz, BorisDog, comandeo and dariakp and removed request for a team October 4, 2023 01:37
@@ -62,7 +62,7 @@ Publishing & Subscribing

The driver SHOULD publish events in a manner that is standard to the driver's language publish/subscribe patterns and is not strictly mandated in this specification.

Similarly, as described in the `logging specification <../logging/logging.rst#implementation-requirements>`_ the driver SHOULD emit log messages in a manner that is standard for the language.
Similarly, as described in the `logging specification <../logging/logging.rst#implementation-requirements>`__ the driver SHOULD emit log messages in a manner that is standard for the language.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The double underscore makes it anonymous and avoids the warning: /Users/steve.silvester/workspace/specifications/source/server-discovery-and-monitoring/server-discovery-and-monitoring-logging-and-monitoring.rst:6: WARNING: Duplicate explicit target name: "logging specification"

@ShaneHarvey
Copy link
Member

Could you create a DRIVERS ticket to track this change?

@blink1073 blink1073 changed the title Add more linting and integrity checks DRIVERS-2790 Add more linting and integrity checks Dec 5, 2023
@blink1073
Copy link
Member Author

Could you create a DRIVERS ticket to track this change?

Done and linked.

@blink1073 blink1073 merged commit fd24a0a into mongodb:master Dec 6, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants