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

relative_path = TRUE argument in dupree_[dir|package] #62

Open
russHyde opened this issue Jan 27, 2020 · 0 comments
Open

relative_path = TRUE argument in dupree_[dir|package] #62

russHyde opened this issue Jan 27, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@russHyde
Copy link
Owner

Reason:

Running dupree_package on aoos during code_as_data returned a data.frame that looks like:

file_a  file_b  block_a block_b line_a  line_b  score
<MY_HOME>/temp/dev-tools-analysis/aoos/R/S4-expressions.R    <MY_HOME>/temp/dev-tools-analysis/aoos/R/S4-expressions.R  2       4       71      139     0.24880382775119614
<MY_HOME>/temp/dev-tools-analysis/aoos/R/RL-retList.R        <MY_HOME>/temp/dev-tools-analysis/aoos/R/S4RC-Accessor.R   98      16      112     32      0.2222222222222222

I would rather the file paths were relative to the package-path or dir-path that was passed into dupree_* (for this particular analysis), that is:

file_a  file_b  block_a block_b line_a  line_b  score
R/S4-expressions.R    R/S4-expressions.R  2       4       71      139     0.24880382775119614
R/RL-retList.R        R/S4RC-Accessor.R   98      16      112     32      0.2222222222222222

lintr provides an equivalent argument, that is TRUE by default.
See lint_dir / lint_package:

@param relative_path if \code{TRUE}, file paths are printed using their path
#' relative to the base directory.  If \code{FALSE}, use the full
#' absolute path.

Could the name relative_path be confused:

  • it is supposed to indicate that the paths in the results will be written relative to the user-specified directory;
  • when the user provides a list of files or directories that should be ignored, should relative_path also dictate whether the ignored directories are specified relative to the analysed directory
@russHyde russHyde mentioned this issue Jan 27, 2020
11 tasks
@russHyde russHyde mentioned this issue Mar 30, 2020
17 tasks
@russHyde russHyde added the enhancement New feature or request label Mar 30, 2020
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

No branches or pull requests

1 participant