hiero-ledger / hiero-ledger/hiero-sdk-cpp

[Good First Issue]: Normalize line endings in `FeeComponentsUnitTests.cc` to LF

Open Beginner friendly
#1,616 26 comments 0 reactions 0 assignees View on GitHub
priority: low scope: tests skill: good first issue status: ready for dev
Dominant language
C++
Stars
42
Forks
108
Avg merge
11h 45m
Merged PRs (30d)
2

Description

### 🆕🐥 First-Time Friendly

This issue is especially welcoming for people who are new to contributing to the **Hiero C++ SDK**.

We know that opening your first pull request can feel like a big step. Issues labeled **Good First Issue** are designed to make that experience easier, clearer, and more comfortable.

No prior knowledge of Hiero, Hedera, or distributed ledger technology is required - just a basic familiarity with C++ and Git is more than enough to get started.

> [!IMPORTANT]
> ### 📋 About Good First Issues
>
> Good First Issues are designed to make getting started as smooth and stress-free as possible.
>
> They usually focus on:
> - Small, clearly scoped changes
> - Straightforward updates to existing code or docs
> - Simple refactors or clarity improvements
>
> Other kinds of contributions — like larger features, deeper technical changes, or design-focused work — are just as valuable and often use the beginner, intermediate, or advanced labels.

### 👾 Description of the Task

`src/sdk/tests/unit/FeeComponentsUnitTests.cc` was created in PR #1438 with Windows-style **CRLF** line endings. Every other file in the project uses **LF**. The mismatch is harmless to the compiled output but pollutes diffs and can cause spurious "whole-file changed" appearances when contributors with different editor configs touch the file.

> Maintainer comment on PR #1438: *"`FeeComponentsUnitTests.cc` was created with Windows-style CRLF line endings — all other files in the project use LF… Not blocking here, but good to know for future contributions!"*

Relevant files:

```
src/sdk/tests/unit/FeeComponentsUnitTests.cc
```

(Optional, only if you discover the same issue exists elsewhere: any other file flagged by the verification step below.)

### 💡 Proposed Solution

Convert the file's line endings from CRLF to LF in place. The fastest reliable way:

```bash
# from the repo root
dos2unix src/sdk/tests/unit/FeeComponentsUnitTests.cc
```

If `dos2unix` isn't available, the equivalent with `sed`:

```bash
sed -i '' 's/\r$//' src/sdk/tests/unit/FeeComponentsUnitTests.cc # macOS BSD sed
# or
sed -i 's/\r$//' src/sdk/tests/unit/FeeComponentsUnitTests.cc # GNU sed
```

Then verify the file looks identical when opened, run the unit suite to confirm nothing else broke, and commit.

### 👩‍💻 Implementation Steps

- [ ] Confirm the issue is real:
```bash
file src/sdk/tests/unit/FeeComponentsUnitTests.cc
# expected output mentions "CRLF line terminators"
```
- [ ] Convert the file to LF using either `dos2unix` or the `sed` one-liner above.
- [ ] Verify the conversion: `file src/sdk/tests/unit/FeeComponentsUnitTests.cc` should now report "ASCII text" or similar without "CRLF line terminators".
- [ ] (Optional) Sweep the rest of the test directory for stragglers:
```bash
git ls-files 'src/sdk/tests/**' | xargs file | grep CRLF
```
If anything else turns up, normalize it too — note them in the PR description.
- [ ] Build the project: `cmake --build --preset linux-x64-debug -j 6`.
- [ ] Run the unit suite: `ctest -j 6 -C Debug --test-dir build/linux-x64-debug -R FeeComponentsUnitTests`.

### ✅ Acceptance Criteria

- [ ] `src/sdk/tests/unit/FeeComponentsUnitTests.cc` uses LF line endings (verified by `file ...`).
- [ ] If other files were also normalized, they are listed in the PR description.
- [ ] The `FeeComponentsUnitTests` test target still builds and passes.
- [ ] No code changes — line endings only.

---

### 📋 Step-by-Step Contribution Guide

To help keep contributions consistent and easy to review, we recommend following these steps:

- [ ] Comment `/assign` to request the issue
- [ ] Wait for assignment
- [ ] Fork the repository and create a branch
- [ ] Set up the project using the instructions in `README.md`
- [ ] Make the requested changes
- [ ] Sign each commit using `-s -S`
- [ ] Push your branch and open a pull request

Read [Workflow Guide](https://github.com/hiero-ledger/hiero-sdk-cpp/blob/main/docs/training/workflow.md) for step-by-step workflow guidance.
Read [README.md](https://github.com/hiero-ledger/hiero-sdk-cpp/blob/main/README.md) for setup instructions.

❗ Pull requests **cannot be merged** without `S` and `s` signed commits.
See the [Signing Guide](https://github.com/hiero-ledger/hiero-sdk-cpp/blob/main/docs/training/signing.md).

### 🤔 Additional Information

- Originating PR: [#1438](https://github.com/hiero-ledger/hiero-sdk-cpp/pull/1438).
- If you're on Windows and your editor auto-converts line endings on save, configure the editor to write LF for this file or set `core.autocrlf=false` for this clone before committing — otherwise your diff will round-trip back to CRLF.

If you have questions while working on this issue, feel free to ask! [Hiero-SDK-C++ Discord](https://discord.com/channels/905194001349627914/1337424839761465364)

Contributor guide

Open the contributing guide

Research direction

Start with src/sdk/tests/unit/FeeComponentsUnitTests.cc and confirm its CRLF line endings using the file command. Normalize that file to LF, then verify the line endings and build with the linux-x64-debug preset. Done means the FeeComponentsUnitTests target builds and passes with no code changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
testing
Issue type
Refactor
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
92/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.