Skip to content

refactor: remove [[nodiscard]] from functions not returning Status/Result - #1087

Merged
zhjwpku merged 1 commit into
apache:mainfrom
smaheshwar-pltr:cleanup/nodiscard-getters
Nov 21, 2026
Merged

zhjwpku merged 1 commit into
apache:mainfrom
smaheshwar-pltr:cleanup/nodiscard-getters

Conversation

@smaheshwar-pltr

@smaheshwar-pltr smaheshwar-pltr commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Removes [[nodiscard]] from functions that don't return Status/Result: the Equals overrides, SchemaField::optional(), and the ErrorCollector getters. Status/Result returns keep it.

Unused results from these functions aren't bugs worth warning about.

🤖 Generated with Claude Code

@wgtmac

wgtmac commented Nov 5, 2026

Copy link
Copy Markdown
Member

I don't think this is necessary. On the contrary, I would suggest removing those existing [[nodiscard]] attributes from functions that do not return Status/Result.

@zhjwpku

zhjwpku commented Nov 20, 2026

Copy link
Copy Markdown
Member

@smaheshwar-pltr Gentle ping, would you like to update the PR as suggested?

…sult

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@smaheshwar-pltr
smaheshwar-pltr force-pushed the cleanup/nodiscard-getters branch from 6d517e7 to 4f1cc62 Compare November 20, 2026 18:03
@smaheshwar-pltr smaheshwar-pltr changed the title refactor: mark field accessors nodiscard refactor: remove [[nodiscard]] from functions not returning Status/Result Nov 20, 2026
@smaheshwar-pltr

Copy link
Copy Markdown
Contributor Author

@wgtmac @zhjwpku updated! I think this differs between projects so happy to follow project preferences

@zhjwpku
zhjwpku merged commit 71c1faa into apache:main Nov 21, 2026
15 checks passed
@zhjwpku

zhjwpku commented Nov 21, 2026

Copy link
Copy Markdown
Member

@smaheshwar-pltr thanks, merged.

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