Skip to content

Pacman Rules concept exercise #1081

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

colinleach
Copy link
Contributor

Draft for now, until there is a policy decision about exemplar/example and header files.

This is a pretty straight ripoff of the C++ version, with a couple of exceptions.

The test file is, of course, new. This is my first experience of Unity, so I'l wait for your comments on what I did wrong.

The introduction.md starts with Bob's version in the Booleans concept, but I removed the section on comparison operators: not needed here, and will be covered in the Conditionals concept. I also added a bit on operator precedence from C++, but I'm not sure if it's needed.

This passes configlet lint and configlet fmt, but I still need to configure my fork to enable manual CI runs (something about workflow_dispatch that I need to read up on). CI is going to fail in any case.

@colinleach
Copy link
Contributor Author

While I go away and learn about clang-format (overdue learning, apparently), I'll just note that format.sh only operates on practice exercises.

@colinleach
Copy link
Contributor Author

Now I'm confused. I let clang-format -i <filename> make a bunch of changes lcally, pushed them, and I'm still getting lots of errors. Any suggestions?

@ryanplusplus
Copy link
Member

ryanplusplus commented Aug 14, 2025

You should be able to have GitHub do it for you by leaving a comment with this in the body:

/format

See:

if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/format')

@ryanplusplus
Copy link
Member

You should be able to have GitHub do it for you by leaving a comment with this in the body:

/format

See:

if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/format')

Looks like this may not work for forks

@ryanplusplus
Copy link
Member

Looks like this may not work for forks

For now just ignore it and I can format it on my Linux machine prior to merge.

@colinleach
Copy link
Contributor Author

Thanks. I'm obviously not doing everything right on my Linux machine, so it would be good to understand this at some later point.

@ryanplusplus
Copy link
Member

Thanks. I'm obviously not doing everything right on my Linux machine, so it would be good to understand this at some later point.

More than likely it's a small difference related to the version of clang-format. Nothing is ever easy 😞

@colinleach
Copy link
Contributor Author

Better!

I installed the clang-format extension in VS Code, and that seemed to fix the problems.

@colinleach
Copy link
Contributor Author

Nothing is ever easy 😞

Could be worse. I first ran a C compiler from 5¼" floppy disks (8086 processor, 640k RAM). That puts 2025 in perspective!

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.

2 participants