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

[New Output] Support Note Output #311

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ikelax
Copy link
Contributor

@ikelax ikelax commented Aug 21, 2024

Adresses #208.

Changes

Add a capture group for the Note output.

Testing

  • Added new unit tests

@ikelax ikelax requested a review from cpisciotta as a code owner August 21, 2024 11:10
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.33%. Comparing base (e7289f3) to head (37cb126).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #311      +/-   ##
==========================================
- Coverage   86.85%   86.33%   -0.53%     
==========================================
  Files          14       14              
  Lines        1651     1661      +10     
==========================================
  Hits         1434     1434              
- Misses        217      227      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ikelax
Copy link
Contributor Author

ikelax commented Aug 21, 2024

@cpisciotta Currently, the tests do not check if the strings are coloured correctly if I am not mistaken. Do you think this should be covered? What do you think about the formatting I chose for this output?

…erers. Additionally, I had to decrease the magic numbers in ParsingTests.swift.
@ikelax ikelax force-pushed the issue-208-support-note-output branch from 62a9ad6 to 37cb126 Compare August 21, 2024 11:26
Copy link
Owner

@cpisciotta cpisciotta left a comment

Choose a reason for hiding this comment

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

Hey @ikelax! I appreciate your contribution. Happy to get this merged in, but can you fix the conflicts first? Thanks!

/// Regular expression captured groups:
/// $1 = note
/// $2 = information
static let regex = Regex(pattern: "^(note:) (.*)")
Copy link
Owner

Choose a reason for hiding this comment

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

nit: We can change this to `"^note: (.*)$".

No need to capture note, since it's a static keyword.

@cpisciotta
Copy link
Owner

@cpisciotta Currently, the tests do not check if the strings are coloured correctly if I am not mistaken. Do you think this should be covered? What do you think about the formatting I chose for this output?

I think it LGTM! No need to test the colored output.

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