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

Add/filter reports #160

Merged
merged 2 commits into from
May 19, 2021
Merged

Add/filter reports #160

merged 2 commits into from
May 19, 2021

Conversation

dalbar
Copy link
Contributor

@dalbar dalbar commented May 17, 2021

Reports can be filtered on set of paths

Fixes issue #157

User wants to focus on specific differences and therefore wants to filter on
paths in the report. All the others should be omitted.

Add Filter function to Report to filter on paths.

Add flag for provinding filtering arguments.

Add reports.go for methods of Report structure

Fixes homeport#157

User wants to focus on certain differences and therefore wants to filter on
paths in the report. All the other should be omitted.

Add `Filter` function to Report to filter on paths.

Signed-off-by: Matthias Diester <matthias.diester@de.ibm.com>
Fixes homeport#157

User wants to focus on specific differences and therefore wants to filter on
paths in the report. All the others should be omitted.

Refactor `Filter` function to make use of Map for more efficient
processing.

Add flag for provinding filtering arguments.

Add `reports.go` for methods of `Report` structure

Signed-off-by: Baran Dalgic <baran.dalgic@posteo.net>
@dalbar dalbar marked this pull request as ready for review May 17, 2021 23:03
@dalbar
Copy link
Contributor Author

dalbar commented May 17, 2021

Usages Examples (equivalent)

./dyff between --no-header --filter /yaml/map/type-change-2 --filter /yaml/map/type-change-1 from.yml to.yml
./dyff between --no-header --filter /yaml/map/type-change-2,yaml/map/type-change-1 from.yml to.yml

@codecov
Copy link

codecov bot commented May 19, 2021

Codecov Report

Merging #160 (a613384) into develop (3699ab3) will increase coverage by 0.12%.
The diff coverage is 89.47%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #160      +/-   ##
===========================================
+ Coverage    82.03%   82.15%   +0.12%     
===========================================
  Files           12       13       +1     
  Lines         1102     1121      +19     
===========================================
+ Hits           904      921      +17     
- Misses         149      150       +1     
- Partials        49       50       +1     
Flag Coverage Δ
unittests 82.15% <89.47%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/cmd/between.go 90.69% <71.42%> (-3.75%) ⬇️
internal/cmd/common.go 76.54% <100.00%> (+0.29%) ⬆️
pkg/dyff/reports.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3699ab3...a613384. Read the comment docs.

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