Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the doc comments referring to the extant ClearBuiltins() option #345

Merged
merged 2 commits into from
May 4, 2020

Conversation

TristonianJones
Copy link
Collaborator

Doc comments have been updated, but no additional godoc level Example tests have been added yet because I'd like the example to be meaningful and most of the tests around custom environments are toy examples.

When #290 is implemented, I can easily see the NewCustomEnv warranting its own example as it will be much easier to subset CEL. Comment added to the FR #290 to this effect.

Closes #344

Copy link

@sfllaw sfllaw left a comment

Choose a reason for hiding this comment

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

cel/options.go Outdated
@@ -68,7 +65,9 @@ func CustomTypeProvider(provider ref.TypeProvider) EnvOption {

// Declarations option extends the declaration set configured in the environment.
//
// Note: This option must be specified after ClearBuiltIns if both are used together.
// Note: Declarations will by default be appended to the pre-existing declaration set cnofigured
Copy link

Choose a reason for hiding this comment

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

Spelling:

Suggested change
// Note: Declarations will by default be appended to the pre-existing declaration set cnofigured
// Note: Declarations will by default be appended to the pre-existing declaration set configured

cel/options.go Outdated
Comment on lines 69 to 70
// for the environment. The cel.NewEnv call builds on top of the standard CEL declarations. For
// a purely custom set of declarations use cel.NewCustomEnv.
Copy link

Choose a reason for hiding this comment

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

This is the only place in the documentation where you use the namespaced name in the doc comment. Since this function also lives in cel, perhaps it is unnecessary?

Suggested change
// for the environment. The cel.NewEnv call builds on top of the standard CEL declarations. For
// a purely custom set of declarations use cel.NewCustomEnv.
// for the environment. The NewEnv call builds on top of the standard CEL declarations. For
// a purely custom set of declarations use NewCustomEnv.

@TristonianJones
Copy link
Collaborator Author

@sfllaw Thanks for the review.

@TristonianJones TristonianJones merged commit 3023710 into google:master May 4, 2020
@TristonianJones TristonianJones deleted the doc-fix branch May 4, 2020 18:53
TristonianJones added a commit to rachelmyers/cel-go that referenced this pull request Jun 15, 2020
…oogle#345)

* Fix the doc comments referring to the extant ClearBuiltins() option
* Remove missed reference, fix typo
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.

cel.ClearBuiltins was removed but doc comments still reference it
3 participants