Skip to content

chore: better code doc. and CodeUnset rename#5

Merged
rjfonseca merged 1 commit into
mainfrom
chore/normalize-unset-values
Jun 18, 2025
Merged

chore: better code doc. and CodeUnset rename#5
rjfonseca merged 1 commit into
mainfrom
chore/normalize-unset-values

Conversation

@rjfonseca
Copy link
Copy Markdown
Member

Rename NoCode to CodeUnset to better reflect its purpose as the default unset value for Code type.

Add comprehensive documentation to exported types and functions in the package, improving code clarity and maintainability.

Rename `NoCode` to `CodeUnset` to better reflect its purpose as the
default unset value for Code type.

Add comprehensive documentation to exported types and functions in the package, improving code clarity and maintainability.
Copilot AI review requested due to automatic review settings June 17, 2025 21:22
@rjfonseca rjfonseca requested a review from xico42 as a code owner June 17, 2025 21:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR renames the default NoCode constant to CodeUnset for clarity and adds comprehensive documentation to exported types and functions.

  • Renamed NoCode to CodeUnset throughout code and tests
  • Updated formatter logic to use CodeUnset
  • Added doc comments for With, Op, GetOpStack, CodeUnset, and GetCode

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
with.go Added doc comment for With function
op.go Documented Op type and GetOpStack function
formatter.go Switched writeCode to check CodeUnset instead of NoCode
code_test.go Updated test to expect CodeUnset instead of NoCode
code.go Renamed NoCode to CodeUnset and added documentation
Comments suppressed due to low confidence (1)

code_test.go:12

  • Update the error message to reference CodeUnset instead of NoCode to match the renamed constant.
		t.Error("expected NoCode, got", errors.GetCode(err))

@rjfonseca rjfonseca merged commit 5369ed6 into main Jun 18, 2025
3 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