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

Replace --rootdir (-r) with --source-dir (-S) #59

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

Pennycook
Copy link
Contributor

Experience with real codebases suggests that we will eventually want to support the ability to independently identify source and build directories.

This commit does not add that functionality, but introduces the "source directory" as a replacement for the concept of a "root directory" without breaking backwards compatibility.

Related issues

The standalone tool in #41 also an -S flag. Using -S consistently across codebasin and cbicov seems like a good idea.

Proposed changes

  • Add --source-dir (-S) option.
  • Check that -S and -r cannot be used at the same time.
  • Issue a deprecation warning for -r and point towards -S as its replacement.

Note that the default value of arg.rootdir is changed from os.getcwd() to None to make it easier to detect when one or both flags are supplied. The correct default value is assigned later in the code. We can undo this change and assign a default value directly via argparse when -r is removed.

Experience with real codebases suggests that we will eventually want to support
the ability to independently identify source and build directories.

This commit does not add that functionality, but introduces the "source
directory" as a replacement for the concept of a "root directory" without
breaking backwards compatibility.

Signed-off-by: John Pennycook <john.pennycook@intel.com>
@Pennycook Pennycook added the enhancement New feature or request label Feb 23, 2024
@Pennycook Pennycook added this to the 1.2.0 milestone Feb 23, 2024
@Pennycook Pennycook merged commit 90a6325 into intel:main Feb 26, 2024
1 check passed
@Pennycook Pennycook deleted the source-dir branch February 26, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants