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

Also remove cr from file #273

Merged
merged 2 commits into from
Aug 26, 2023

Conversation

filintod
Copy link
Contributor

@filintod filintod commented Aug 8, 2023

When executing on github actions on a windows platform, it can happen (depending on your .gitattributes setting or lack of settings), that the golden files will also have carriage return.

This PR removes it from the file when reading it.

Another option would be a documentations about adding .gitattributes file to the repo with * text=auto eol=lf

@CLAassistant
Copy link

CLAassistant commented Aug 8, 2023

CLA assistant check
All committers have signed the CLA.

@dnephin
Copy link
Member

dnephin commented Aug 12, 2023

Thank you for the pull request! It has been a while since I've encountered this problem, but from what I remember I think the preferred solution is to use .gitattributes. In particular I think it's risky to modify the expected value. If the golden package is used with []byte those CR bytes may not be appropriate to remove.

I think it would be better to document the .gitattributes setup to prevent the problem. A section in the golden package godoc would be great!

@filintod
Copy link
Contributor Author

Makes sense, I'll change this PR to be a doc change in the next days. Thanks

@filintod
Copy link
Contributor Author

@dnephin please take a look when you have some time. I added the .gitattributes info to the global variable that defines the normalization.

Signed-off-by: Filinto Duran <filinto@diagrid.io>
Copy link
Member

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

Thank you!

@dnephin dnephin merged commit 2891300 into gotestyourself:main Aug 26, 2023
kodiakhq bot referenced this pull request in cloudquery/plugin-pb-go Mar 1, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [gotest.tools/v3](https://togithub.com/gotestyourself/gotest.tools) | indirect | patch | `v3.5.0` -> `v3.5.1` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>gotestyourself/gotest.tools (gotest.tools/v3)</summary>

### [`v3.5.1`](https://togithub.com/gotestyourself/gotest.tools/releases/tag/v3.5.1)

[Compare Source](https://togithub.com/gotestyourself/gotest.tools/compare/v3.5.0...v3.5.1)

#### What's Changed

-   Make assert and golden packages compatible with other golden packages by [@&#8203;dnephin](https://togithub.com/dnephin) in [https://github.com/gotestyourself/gotest.tools/pull/271](https://togithub.com/gotestyourself/gotest.tools/pull/271)
-   Also remove cr from file by [@&#8203;filintod](https://togithub.com/filintod) in [https://github.com/gotestyourself/gotest.tools/pull/273](https://togithub.com/gotestyourself/gotest.tools/pull/273)
-   fs: add go doc links by [@&#8203;dolmen](https://togithub.com/dolmen) in [https://github.com/gotestyourself/gotest.tools/pull/275](https://togithub.com/gotestyourself/gotest.tools/pull/275)

#### New Contributors

-   [@&#8203;filintod](https://togithub.com/filintod) made their first contribution in [https://github.com/gotestyourself/gotest.tools/pull/273](https://togithub.com/gotestyourself/gotest.tools/pull/273)

**Full Changelog**: gotestyourself/gotest.tools@v3.5.0...v3.5.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
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