Green-Software-Foundation / Green-Software-Foundation/if
Add emojis to `if-diff` output
- Dominant language
- TypeScript
- Stars
- 183
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Description
**What**
Add a red cross emoji ❌ to the fail response and a green tick emoji ✅ to the success response for `if-diff`
**Why**
This change makes the status of the `if-diff` response clear at a glance, especially when there are additional logs and warnings in the console.
**Context**
`if-diff` is a command line tool we provide to enable rapid comparison of output files for debugging and verification purposes. Today it provides a success response as follows:
```
Files match!
```
and a failure response which looks like:
```
Files do not match!
tree.children.child-0.inputs.1.network/energy
source: 0.000001
target: 0.01
```
This plain text is adequate, but it would help to add an emoji to the console log to make it obvious at a glance whether the response was success/fail.
**Prerequisites/resources**
none
**SoW (scope of work)**
- [ ] raise PR ading emoji to success and failure responses
- [ ] update unit tests as appropriate
**Acceptance criteria**
- [ ] `if-diff` success response is preceded by a green tick emoji in the console
GIVEN the requested changes are made
WHEN I run `if-diff -s example.yml -t example.yml`
THEN I see the following output
```
✅ Files match!
```
- [ ] `if-diff` failure response is preceded by a red cross emoji in the console
GIVEN the requested changes are made
WHEN I run `if-diff -s example.yml -t example-2.yml` (where `example.yml` and `example-2.yml` differ)
THEN I see the following output
```
❌ Files do not match!
tree.children.child-0.inputs.1.network/energy
source: 0.000001
target: 0.01
```
- [ ] All unit tests pass and have 100% coverage
Contributor guide
Assessment
This issue has not been assessed yet.