John Pennycook

Results 43 issues of John Pennycook

There are several inconsistencies in the way that we report warnings and errors. Some are prefixed with information about where (i.e., in which file) an error occurred, some are quite...

enhancement

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...

enhancement

### Feature/behavior summary While working on #87, it became apparent that several of the unit tests are actually end-to-end tests. For example, instead of testing whether specific directives are parsed...

enhancement
help wanted

### Feature/behavior summary We have pre-commit hooks and unittests that can be run offline, but should run them as part of the CI to ensure that we catch errors that...

enhancement

Our test coverage is currently only around 89%, which may be hiding some bugs. A simple way to compute coverage statistics: ```sh python -m coverage run -m unittest python -m...

enhancement
help wanted

### Feature/behavior summary As detailed in #72 and #79, the handling of duplicate files is complicated. Since a duplicate file is likely to be the cause of a misconfigured codebase...

enhancement

### Feature/behavior summary Functions like `util._load_json` and `util._load_toml` currently throw exceptions that contain information from `jsonschema`. We intercept these (typically by catching `BaseException`) in order to throw another exception containing...

enhancement

### Feature/behavior summary Multiple tests hard-code paths relative to the root, like so: https://github.com/intel/code-base-investigator/blob/3da02aef3098e7f5aeba3ca29fcd4ef92931e13c/tests/define/test_define.py#L15-L16 ### Request attributes - [ ] Would this be a refactor of existing code? - [...

enhancement
good first issue

### Feature/behavior summary `pathlib` offers a higher-level abstraction of paths than `os.path`, including a `Path` object. Moving to `pathlib` would make the code cleaner, and would make it simpler for...

documentation
enhancement

- Avoids referencing languages by name (as strings). - Enables multiple constructors (from_path and from_ext). - Enables a dedicated sentinel value (UNKNOWN) instead of None.

refactor