Skip to content

Spelling - #65

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

Spelling#65
jsoref wants to merge 25 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

📝 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.

Suggested reviewers: roshkhatri, zackcam

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (1 warning, 2 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.
Title check ❓ Inconclusive The title indicates spelling changes but is too generic to identify the scope of the documentation, code comment, and test-name corrections. Use a specific title such as "Correct spelling and terminology across JSON documentation and tests."
Description check ❓ Inconclusive No pull request description was provided, so the changeset lacks a meaningful summary in the description. Add a brief description stating that the pull request corrects spelling, terminology, comments, and test names without changing runtime behavior.
✅ Passed checks (2 passed)
Check name Status Explanation
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
// Resize the number of shards in the keyTable. this isn't multi-thread safe. But the current AppConfig architecture
// doesn't provide a good way to solve this problem. Also, we only do it when the table is empty. As long as there
// are no background operations in progress (slot migration, threadsave) we're good. Sadly there's no easy way for
// are no background operations in progress we're good. Sadly there's no easy way for

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add the missing comma.

The sentence should read “As long as there are no background operations in progress, we're good.”

Proposed fix
-// are no background operations in progress we're good. Sadly there's no easy way for
+// are no background operations in progress, we're good. Sadly there's no easy way for
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// are no background operations in progress we're good. Sadly there's no easy way for
// are no background operations in progress, we're good. Sadly there's no easy way for
🤖 Prompt for 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.

In `@src/json/json.cc` at 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.”

Comment thread src/json/keytable.h
//
// Query if this set of factors is valid.
// returns: NULL, If the factors are valid. Otherwise an error string
// returns: NULL, If the factors are valid. Otherwise, an error string

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Rewrite the return-value comment as a complete sentence.

The current text still contains a capitalization error after the comma. It also does not clearly state that the function returns an error string.

Proposed fix
-// returns: NULL, If the factors are valid. Otherwise, an error string
+// Returns NULL if the factors are valid. Otherwise, it returns an error string.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// returns: NULL, If the factors are valid. Otherwise, an error string
// Returns NULL if the factors are valid. Otherwise, it returns an error string.
🤖 Prompt for 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.

In `@src/json/keytable.h` at 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.

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