Skip to content

Commit

Permalink
Remove --root-dir option
Browse files Browse the repository at this point in the history
Previously deprecated in 1.2.0.

This commit does not remove the concept of a root directory, which
is still used to determine whether a file belongs to the code base.

Signed-off-by: John Pennycook <john.pennycook@intel.com>
  • Loading branch information
Pennycook committed Mar 28, 2024
1 parent 2486942 commit 454407f
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions bin/codebasin
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,6 @@ def main():
help="Display version information and exit.",
)
deprecated_args = parser.add_argument_group("deprecated options")
deprecated_args.add_argument(
"-r",
"--rootdir",
dest="rootdir",
metavar="<dir>",
default=None,
help="Set working root directory. "
+ "Defaults to current working directory.",
)
deprecated_args.add_argument(
"-c",
"--config",
Expand Down Expand Up @@ -171,17 +162,8 @@ def main():
DeprecationWarning,
)

# Determine the root directory based on the -r flag.
rootpath = None
if not args.rootdir:
rootpath = os.getcwd()
elif args.rootdir:
warnings.warn(
"--rootdir (-r) is deprecated.",
DeprecationWarning,
)
rootpath = args.rootdir
rootdir = os.path.realpath(rootpath)
# Determine the root directory based on where codebasin is run.
rootdir = os.path.realpath(os.getcwd())

if args.config_file and args.analysis_file:
raise RuntimeError(
Expand Down

0 comments on commit 454407f

Please sign in to comment.