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 missing underscores #115

Merged
merged 4 commits into from
Feb 23, 2023
Merged

Fix missing underscores #115

merged 4 commits into from
Feb 23, 2023

Conversation

spinillos
Copy link
Member

I found missing underscores inside structs when I upgraded thema: grafana/grafana#63629.

Also I added logic to iterate maps and arrays deeply if we could have these cases.

Copy link
Contributor

@AgnesToulet AgnesToulet left a comment

Choose a reason for hiding this comment

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

Looks good!

I don't know how important/urgent is the Grafana PR so I don't want to block it but I think it would be nice to merge the iterateXWithUnderscores functions with the iterateX ones, WDYT?

@spinillos spinillos merged commit 4226e95 into main Feb 23, 2023
Comment on lines +269 to +270
} else if strings.Contains(mx.Name, "_") {
mx.Name = withoutUnderscore(mx.Name)
Copy link
Contributor

Choose a reason for hiding this comment

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

The issue with these lines is that the fixRawData decorator now fix some underscores (but not all) and the fixUnderscores decorator fix some raw data 😅 I think we should keep them separated.

I was thinking about something like:

iterateArray(a *dst.ArrayType, fn func(i *dst.Ident)) {
   ...
} 

mildwonkey pushed a commit that referenced this pull request May 1, 2023
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.

None yet

2 participants