Skip to content

Correct spelling and terminology across JSON documentation and tests - #65

Open
jsoref wants to merge 26 commits into
valkey-io:unstablefrom
jsoref:spelling
Open

Correct spelling and terminology across JSON documentation and tests#65
jsoref wants to merge 26 commits into
valkey-io:unstablefrom
jsoref:spelling

Conversation

@jsoref

@jsoref jsoref commented Jun 4, 2025

Copy link
Copy Markdown

No description provided.

Comment thread README.md
MODULE LOAD /path/to/libjson.so
```
## Supported Module Commands
## Supported Module Commands

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I don't usually make commits to drop spaces... this one seems like a pretty good candidate for dropping...

Comment thread src/json/json.cc
Comment thread src/json/util.h Outdated
Comment thread src/rapidjson/reader.h
\brief Macro to indicate a parse error.
\param parseErrorCode \ref rapidjson::ParseErrorCode of the error
\param offset position of the error in JSON input (\c size_t)
\param offset position of the error in JSON input (\c size_t)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

there were a couple of places where things appeared to be intentionally indented. This doesn't appear to be one of those cases...

Comment thread src/rapidjson/reader.h
}

// When read/write pointers are the same for insitu stream, just skip unescaped characters
// When read/write pointers are the same for in situ stream, just skip unescaped characters

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thi is the proper spelling for the phrase.

https://en.wikipedia.org/wiki/In_situ

Note that I'm not changingt the class as that seemed a bit too invasive...

Comment thread tst/integration/error_handlers.py Outdated
assert exp.encode() == client.execute_command('JSON.GET', k2, path)

# we do not support mixing of unions and slices, nor do we support extraneous commas
# we do not support mixing of unions and slices, nor do we support extraneous commas

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

this is why I included the commit to fix the doubled whitespace.

actually, this line helped me realize that one of my own rules was broken -- one of the benefits I get from running my rules against other projects is identifying bugs in them and fixing them...

'JSON.GET', key, path).decode()

def test_json_objectlen_command(self):
def test_json_object_len_command(self):

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

the actual things are objlen or objkeys, so I don't see any particular reason to invent additional new words just for these tests...

Comment thread tst/unit/dom_test.cc
}

TEST_F(DomTest, testNumMutiBy_int64) {
TEST_F(DomTest, testNumMultiBy_int64) {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I'd personally favor Multiply, but this was the simplest fix

Comment thread tst/unit/selector_test.cc
" \"my key\" : \"key inside here\""
" },"
" \"anonther object\" : {"
" \"another object\" : {"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

GitHub CI passes...

@roshkhatri roshkhatri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Over all looks good, just need change a few things. I would also like to see why the tests run. I am curious they didnt run on this

Comment thread src/json/json.cc Outdated
Comment thread src/json/json.cc
jsoref and others added 25 commits August 2, 2026 20:31
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Roshan Khatri <117414976+roshkhatri@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4f52f464-82c5-42e7-97ba-665b53cffdbc

📥 Commits

Reviewing files that changed from the base of the PR and between d6838b2 and 424d8ab.

📒 Files selected for processing (1)
  • src/json/json.cc
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/json/json.cc

📝 Walkthrough

Walkthrough

The pull request corrects spelling, terminology, spacing, comments, documentation, test names, fixture text, and one local variable name. It does not change runtime behavior, public interfaces, build behavior, or test logic.

Changes

Documentation and naming cleanup

Layer / File(s) Summary
Project and module text corrections
README.md, src/commands/json.mget.json, src/json/...
Corrects project headings, command descriptions, module comments, error text spelling, and validation comment wording.
RapidJSON comment corrections
src/rapidjson/...
Corrects documentation spacing, spelling, capitalization, and wording in RapidJSON headers.
Test comments and identifier corrections
tst/integration/..., tst/unit/...
Corrects test comments, test method names, fixture text, test names, and the metadata_val local variable name.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 27.27% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive No pull request description was provided, so its relevance to the changeset cannot be assessed. Add a concise description that summarizes the spelling, terminology, and comment corrections.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the spelling and terminology corrections made across JSON documentation and tests.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/json/json.cc`:
- Line 2612: Update the comment sentence near the background-operation check to
insert a comma after “progress,” so it reads grammatically as “As long as there
are no background operations in progress, we're good.”

In `@src/json/keytable.h`:
- Line 310: Rewrite the return-value comment near the affected function as a
complete sentence, correcting the capitalization and clearly stating that valid
factors return NULL while invalid factors return an error string.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c2efa678-00a8-40f3-b41c-f78b5b85f39f

📥 Commits

Reviewing files that changed from the base of the PR and between 7d0acb4 and d6838b2.

📒 Files selected for processing (14)
  • README.md
  • src/commands/json.mget.json
  • src/json/json.cc
  • src/json/keytable.cc
  • src/json/keytable.h
  • src/rapidjson/document.h
  • src/rapidjson/reader.h
  • src/rapidjson/writer.h
  • tst/integration/test_json_basic.py
  • tst/integration/test_rdb.py
  • tst/unit/CMakeLists.txt
  • tst/unit/dom_test.cc
  • tst/unit/selector_test.cc
  • tst/unit/traps_test.cc

Comment thread src/json/json.cc Outdated
Comment thread src/json/keytable.h
@roshkhatri roshkhatri changed the title Spelling Correct spelling and terminology across JSON documentation and tests Aug 3, 2026
Comment thread src/json/json.cc
Comment thread src/json/json.cc Outdated
Signed-off-by: Roshan Khatri <117414976+roshkhatri@users.noreply.github.com>
@roshkhatri

Copy link
Copy Markdown
Member

Sorry, one last thing, now that we are doing this can you also add a workflow for spellchek as well?
like this? and add the whitelisting spellings at this stage of the PR, no more changes
https://github.com/valkey-io/valkey/blob/unstable/.github/workflows/spell-check.yml

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