Skip to content

HDDS-14734. Fix false positive spellcheck errors#356

Merged
jojochuang merged 1 commit intoapache:masterfrom
ptlrs:HDDS-14734-spellcheck-filename
Mar 5, 2026
Merged

HDDS-14734. Fix false positive spellcheck errors#356
jojochuang merged 1 commit intoapache:masterfrom
ptlrs:HDDS-14734-spellcheck-filename

Conversation

@ptlrs
Copy link
Contributor

@ptlrs ptlrs commented Feb 26, 2026

What changes were proposed in this pull request?

The spelling.sh script checks if the filenames are valid.

When running the script manually in a dev environment, the script erroneously flags bad filenames due to the presence of unknown words in the path.

The canonical path should not be validated. Only the path from the root of the project should be validated.

This PR removes the root file path prefix when validating the path names

Before:

rpatel@GQ2V5HK6NX scripts % find "$root"/docs "$root"/src/pages                    
/Users/rpatel/Github/ozone-site/docs
/Users/rpatel/Github/ozone-site/docs/07-system-internals
/Users/rpatel/Github/ozone-site/docs/07-system-internals/02-data-operations
/Users/rpatel/Github/ozone-site/docs/07-system-internals/02-data-operations/04-hsync.md
/Users/rpatel/Github/ozone-site/docs/07-system-internals/02-data-operations/02-read.md
/Users/rpatel/Github/ozone-site/docs/07-system-internals/02-data-operations/03-delete.md
/Users/rpatel/Github/ozone-site/docs/07-system-internals/02-data-operations/README.mdx
/Users/rpatel/Github/ozone-site/docs/07-system-internals/02-data-operations/01-write.md
Checking document content...
CSpell: Files checked: 655, Issues found: 0 in 0 files.

Checking file names...
File%2520Name:1:8       - Unknown word (rpatel)     -- /Users/rpatel/Github/ozone-site/docs
File%2520Name:2:8       - Unknown word (rpatel)     -- /Users/rpatel/Github/ozone-site/docs
File%2520Name:3:8       - Unknown word (rpatel)     -- /Users/rpatel/Github/ozone-site/docs
File%2520Name:4:8       - Unknown word (rpatel)     -- /Users/rpatel/Github/ozone-site/docs
File%2520Name:5:8       - Unknown word (rpatel)     -- /Users/rpatel/Github/ozone-site/docs
CSpell: Files checked: 1, Issues found: 5 in 1 file.

Spell check failed. See CONTRIBUTING.md for help fixing false positive spelling errors:
https://github.com/apache/ozone-site/blob/master/CONTRIBUTING.md#spelling

Process finished with exit code 1

After:

rpatel@GQ2V5HK6NX scripts % find "$root"/docs "$root"/src/pages | sed "s|^$root/||" 
docs
docs/07-system-internals
docs/07-system-internals/02-data-operations
docs/07-system-internals/02-data-operations/04-hsync.md
docs/07-system-internals/02-data-operations/02-read.md
docs/07-system-internals/02-data-operations/03-delete.md
docs/07-system-internals/02-data-operations/README.mdx
docs/07-system-internals/02-data-operations/01-write.md
/bin/zsh /Users/rpatel/Github/ozone-site/.github/scripts/spelling.sh
Checking document content...
CSpell: Files checked: 655, Issues found: 0 in 0 files.

Checking file names...
CSpell: Files checked: 1, Issues found: 0 in 0 files.

Process finished with exit code 0

What is the link to the Apache Jira?

https://issues.apache.org/jira/browse/HDDS-14734

How was this patch tested?

CI: https://github.com/ptlrs/ozone-site/actions/runs/22456055037

@ptlrs ptlrs marked this pull request as ready for review February 26, 2026 18:50
Copy link
Contributor

@errose28 errose28 left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @ptlrs.

@ptlrs ptlrs changed the title HDDS-14734 Fix false positive spellcheck errors HDDS-14734. Fix false positive spellcheck errors Mar 4, 2026
@jojochuang jojochuang merged commit 044a137 into apache:master Mar 5, 2026
12 of 13 checks passed
@jojochuang
Copy link
Contributor

Merged. Thanks @ptlrs @errose28

@ptlrs ptlrs deleted the HDDS-14734-spellcheck-filename branch March 5, 2026 00:48
@ptlrs
Copy link
Contributor Author

ptlrs commented Mar 5, 2026

Thanks for the reviews @errose28 @jojochuang

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