Skip to content

fix(caser): ToSnake does not replace spaces with _#1148

Merged
kodiakhq[bot] merged 6 commits intocloudquery:mainfrom
erezrokah:fix-bug-caser-#728-v2
Sep 4, 2023
Merged

fix(caser): ToSnake does not replace spaces with _#1148
kodiakhq[bot] merged 6 commits intocloudquery:mainfrom
erezrokah:fix-bug-caser-#728-v2

Conversation

@erezrokah
Copy link
Copy Markdown
Member

@erezrokah erezrokah commented Aug 17, 2023

Summary

Fixes #728

Another approach to #1094.
Instead of regular expressions we use strings.Fields to get rid of the spaces and replace them with _. Then we use _ as a word separator.

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 17, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.03% 🎉

Comparison is base (3566b64) 48.29% compared to head (d5ca1b2) 48.33%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1148      +/-   ##
==========================================
+ Coverage   48.29%   48.33%   +0.03%     
==========================================
  Files          87       87              
  Lines        8152     8158       +6     
==========================================
+ Hits         3937     3943       +6     
  Misses       3858     3858              
  Partials      357      357              
Files Changed Coverage Δ
serve/plugin.go 62.68% <ø> (ø)
caser/caser.go 91.36% <100.00%> (+0.38%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 17, 2023

⏱️ Benchmark results

Comparing with 6d3f752

  • Glob-8 ns/op: 100.1 ⬇️ 1.90% decrease vs. 6d3f752

@erezrokah erezrokah marked this pull request as ready for review August 18, 2023 07:40
@erezrokah erezrokah requested a review from yevgenypats as a code owner August 18, 2023 07:40
@github-actions github-actions bot added fix and removed fix labels Sep 4, 2023
@kodiakhq kodiakhq bot merged commit 329b601 into cloudquery:main Sep 4, 2023
kodiakhq bot pushed a commit that referenced this pull request Sep 4, 2023
🤖 I have created a release *beep* *boop*
---


## [4.6.4](v4.6.3...v4.6.4) (2023-09-04)


### Bug Fixes

* **caser:** ToSnake does not replace spaces with _ ([#1148](#1148)) ([329b601](329b601))
* **deps:** Update `github.com/grpc-ecosystem/go-grpc-middleware/v2` to `v2.0.0` ([#1197](#1197)) ([6d3f752](6d3f752))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(caser): ToSnake does not replace spaces with _

4 participants