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

feat(debug): add debug flag and docs for dumping vet rule variables #2521

Merged
merged 2 commits into from
Jul 25, 2023

Conversation

andrewmbenton
Copy link
Collaborator

No description provided.

@@ -430,6 +430,10 @@ func (c *checker) checkSQL(ctx context.Context, s config.SQL) error {
evalMap["mysql"] = engineOutput.MySQL
}

if debug.Debug.DumpVetEnv {
fmt.Printf("vars for rule '%s' evaluating against query '%s':\n%v\n", name, query.Name, evalMap)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we dump this as JSON?

@andrewmbenton andrewmbenton merged commit 10e51f8 into main Jul 25, 2023
7 checks passed
@andrewmbenton andrewmbenton deleted the andrew/debug-dump-vet-env branch July 25, 2023 18:42
This pull request was closed.
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.

2 participants