-
Notifications
You must be signed in to change notification settings - Fork 9
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
Improve coverage tool for P3 Analysis Library integration #41
base: main
Are you sure you want to change the base?
Conversation
Currently identical to the old etc/coverage.py script, but renamed. Signed-off-by: John Pennycook <[email protected]>
Using angle brackets, similar to how commands like git behave, allows us to use metavar names that contain spaces and are easier to read. Signed-off-by: John Pennycook <[email protected]>
This option enables cbicov to be run anywhere, instead of requiring it to be run in the source directory. Signed-off-by: John Pennycook <[email protected]>
Using an empty codebase means that cbicov will only generate coverage information for files in the specified source directory. Pre-populating the codebase file list restricts our ability to exclude files, because files that are explicitly listed in the codebase are assumed to have been specified by the user. Signed-off-by: John Pennycook <[email protected]>
The new schema allows for coverage files to contain both a file hash and (optional) path information. Signed-off-by: John Pennycook <[email protected]>
The previous coverage schema required the exporter logic to replace all filenames with file hashes unconditionally. The new exporter logic is able to retain filenames, which can be used to compute file hashes when required. Signed-off-by: John Pennycook <[email protected]>
Now requires file name, a unique ID, and a different line representation. Signed-off-by: John Pennycook <[email protected]>
Signed-off-by: John Pennycook <[email protected]>
Previously, a CodeNode could only recover region information in terms of an extent (start line and end line) which was not sufficient to export the information required by the new coverage format. Signed-off-by: John Pennycook <[email protected]>
@@ -1,5 +1,5 @@ | |||
include codebasin/schema/analysis.schema | |||
include codebasin/schema/compilation-database.schema | |||
include codebasin/schema/config.schema | |||
include codebasin/schema/coverage-0.1.0.schema | |||
include codebasin/schema/coverage-0.3.0.schema |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you forgot to add this file to your PR :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How embarrassing! Fixed in 57f4ff8.
Signed-off-by: John Pennycook <[email protected]>
Signed-off-by: John Pennycook <[email protected]>
Handles excludes in an identical manner to codebasin. Signed-off-by: John Pennycook <[email protected]>
@swright87 - I've added |
This PR introduces a new standalone
cbicov
tool that reads a compilation database and produces JSON that can be read in by the P3 Analysis Library. It is intended to be invoked as below:This might need a little more work before it is ready to be merged, but I wanted to give us a place to discuss the functionality while we evaluate options for an automated Code Base Investigator + P3 Analysis Library pipeline.