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

feat: improve code extract to be consistent #1137

Merged
merged 8 commits into from
Jul 24, 2023

Conversation

cfabianski
Copy link
Collaborator

@cfabianski cfabianski commented Jul 21, 2023

Description

Code Extract is not consistent between CLI and Cloud because the CLI reads the lines from the file while the Cloud gets the info from the Source and Sink which may not be the entire line.
The new JSON field code_extract corrects that and makes it consistent

Also:

  • Refactored the way we generate the omitted line and logic which were a little bit too complicated.
  • Makes it easier to configure the buffer for line

Tested with HTML, JSON and Table outputs

Still ToDo:

  • Requires a Cloud updates to start consuming this new field cc @gotbadger
  • Update bearer-rules snapshots 🙈
image image

Related

Checklist

  • I've added test coverage that shows my fix or feature works as expected.
  • I've updated or added documentation if required.
  • I've included usage information in the description if CLI behavior was updated or added.
  • PR title follows Conventional Commits format

@cfabianski cfabianski force-pushed the fix/update-cli-line-report branch 2 times, most recently from cfadc8b to ea5d932 Compare July 24, 2023 15:32
cfabianski and others added 2 commits July 24, 2023 17:55
Co-authored-by: Philip Hayton <gotbadger@users.noreply.github.com>
Co-authored-by: Philip Hayton <gotbadger@users.noreply.github.com>
@cfabianski cfabianski merged commit e96d808 into main Jul 24, 2023
5 checks passed
@cfabianski cfabianski deleted the fix/update-cli-line-report branch July 24, 2023 16:07
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.

Inaccurate Ruby logger code snippets and line numbers
2 participants