Skip to content

Refactor and docs: fix typo, reformat code, update README#1009

Open
v1k1nghawk wants to merge 4 commits intointel:masterfrom
v1k1nghawk:enhancement_instruction_indentation_typo
Open

Refactor and docs: fix typo, reformat code, update README#1009
v1k1nghawk wants to merge 4 commits intointel:masterfrom
v1k1nghawk:enhancement_instruction_indentation_typo

Conversation

@v1k1nghawk
Copy link
Copy Markdown

  • Fix typo in print_output()
  • Convert indentation from tabs to spaces for consistency (according to project's Coding Style)
  • Update README.md to include more user-friendly robust instructions for build directory creation, otherwise, if a user would like to repeat the step they will get an error: "mkdir: cannot create directory ‘build’: File exists" because the directory persists from a previous attempt

README.md Outdated

```
mkdir build
rm -rf build && mkdir build
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is probably good to mention here that one can use mkdir -p here to prevent a full rebuild. If one wants a full rebuild then delete it all and start over.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Agreed. Mentioned both cases as suggested.

@ogbrugge
Copy link
Copy Markdown
Contributor

ogbrugge commented Apr 1, 2026

Regarding the rest of the changes, I've discussed this with @rdementi in the past but it is probably better to change indentation only there where you make actual changes.

@v1k1nghawk v1k1nghawk force-pushed the enhancement_instruction_indentation_typo branch from 1cf43ec to 735d63d Compare April 1, 2026 13:01
- Fix typo in print_output()
- Convert indentation from tabs to spaces for consistency (according to project's Coding Style)
- Update README.md to include more robust instruction for build directory creation
@v1k1nghawk v1k1nghawk force-pushed the enhancement_instruction_indentation_typo branch from 735d63d to 09ed30d Compare April 1, 2026 13:10
@v1k1nghawk
Copy link
Copy Markdown
Author

Regarding the rest of the changes, I've discussed this with @rdementi in the past but it is probably better to change indentation only there where you make actual changes.

Thank you for the clarification, I've reverted the indentation changes from the PR.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR cleans up user-facing documentation and messaging by correcting a metric description typo in the PCM output and improving the README build instructions to avoid common “build directory already exists” errors.

Changes:

  • Fixes a typo in the UTIL metric description printed by print_output().
  • Updates README build steps to include options for reusing vs. recreating the build/ directory.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/pcm.cpp Corrects a typo in the printed UTIL description string.
README.md Adds build-directory setup guidance (incremental vs. clean build) before the compile steps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

README.md Outdated
Comment on lines +85 to +87
* Quick Update: Run `mkdir -p build` to skip a full rebuild and preserve existing build artifacts.
* OR
* Clean Start: Run `rm -rf build && mkdir build` to do a full rebuild.
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The "* OR" line renders as a third bullet item, which can look like an instruction step rather than a separator between the two options. Consider using plain text (e.g., "or") or restructuring the list (e.g., numbered options) to make the mutually exclusive choice clearer.

Suggested change
* Quick Update: Run `mkdir -p build` to skip a full rebuild and preserve existing build artifacts.
* OR
* Clean Start: Run `rm -rf build && mkdir build` to do a full rebuild.
1. Quick Update: Run `mkdir -p build` to skip a full rebuild and preserve existing build artifacts.
2. Clean Start: Run `rm -rf build && mkdir build` to do a full rebuild.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Clarified

README.md Outdated
Comment on lines 89 to 93
Compile:
```
mkdir build
cd build
cmake ..
cmake --build .
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The compile snippet now starts with cd build but no longer includes any build directory creation command in the code block. A copy/paste of the "Compile" block alone will fail on a fresh checkout (or if the user skips the section above). Consider including the chosen directory-creation command in the fenced block(s) or otherwise making the required step unmissable.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Clarified

Copy link
Copy Markdown
Contributor

@ogbrugge ogbrugge Apr 1, 2026

Choose a reason for hiding this comment

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

I think it is ok this way, Copilot does have a point that in the Compile section there is no mkdir build so you might move the comment into the compile section but before the ``` line. This is up to you though, i can live with this without.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Let's take Copilot's suggestion, I've updated the section to include it.

v1k1nghawk and others added 2 commits April 1, 2026 17:17
Quick Update rephrasing

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@v1k1nghawk v1k1nghawk requested a review from ogbrugge April 1, 2026 14:43
README.md Outdated
* Clean Start: Run `rm -rf build && mkdir build` to do a full rebuild.

Compile:
then compile:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you have done a previous build you do not need to do a mkdir -p build because it exists, you can go straight to the "cd build" step.

So something like this perhaps?

On first build or in case you want to throw everything away and start from scratch then start with this:
rm -rf build && mkdir build
If you have a previous build and want to continue building with that then you can skip the deletion of the build directory.

cd build

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, sounds logical. I've rephrased the statements based on those suggestions. Thanks!

@v1k1nghawk v1k1nghawk requested a review from ogbrugge April 2, 2026 07:22

Choose **one** of the following build methods:
* Incremental Build (Fastest): if you have a previous build to reuse the existing `build` directory and preserve previous build artifacts, go straight to the `cd build` step.
* Clean Build (From Scratch): Run `rm -rf build && mkdir build` for your first build, or for a full rebuild to ensure a "clean state" by deleting all previous build data.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

does this work on Windows? the expectation is that it works on both *nix/BSD-like OSes and Windows

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.

4 participants