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

Extract new ccsh filter "inspect" #3668

Open
Richargh opened this issue Jul 26, 2024 · 0 comments
Open

Extract new ccsh filter "inspect" #3668

Richargh opened this issue Jul 26, 2024 · 0 comments
Labels
difficulty:low Solving this is likely not that difficult pr-analysis Issues that touch the analysis pr(oject). priority:medium Set by PO

Comments

@Richargh
Copy link

Feature request

Create new ccsh filter "inspect"

Description

As an auditor, I want to extract a filter that shows me the structure of a cc.json so that I can verify the structure of a cc.json without uncompressing, prettyfying and opening it in my editor.

In audits we quickly want to verify that a cc.json has the expected contents. Often we need to do this before merging two or more cc.json files. Imagine one .git.cc.json file was created in the git root and a sonar.cc.json was created for a sub-project (happens in mono-repos) then we cannot simply merge them, because the nodes would not align. We already have a filter to show the contents of a cc.json. It is ccsh modify -p 1 xyz.cc.json but it is not obvious that "modify" can also print the contents of a cc.json. I make this feature request so the --print-levels parameter is removed from "modify" and moved to a new filter "inspect".

Acceptance criteria

  • a new filter exists that can print the levels of a compressed or uncompressed cc.json

Usage suggestion

ccsh inspect xyz.cc.json --> prints the first level of the cc.json
ccsh inspect --level 3 xyz.cc.json --> prints the first three levels of the cc.json. Alternative to --level is --depth

Assumptions & Exclusions

No new features are added here. It is simply about extracting the --print-levels functionality from modify and make it easier to find.

Development notes (optional Task Breakdown)

  • [ ]
  • [ ]
  • [ ]

Open questions

@ChristianHuehn ChristianHuehn added pr-analysis Issues that touch the analysis pr(oject). priority:medium Set by PO difficulty:low Solving this is likely not that difficult labels Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:low Solving this is likely not that difficult pr-analysis Issues that touch the analysis pr(oject). priority:medium Set by PO
Projects
None yet
Development

No branches or pull requests

2 participants