codecov-exe icon indicating copy to clipboard operation
codecov-exe copied to clipboard

Add commandline argument: -s for directory search for reports

Open PureKrome opened this issue 5 years ago • 4 comments

As requested in #53 the codecov-bash script accepts a -s argument:

From the codecov-bash script:

I'm not sure how this could conflict with the existing -f argument if globbing is used in (the -f') arg. Do take note of the comment for -f in the screenshot above with respect to this:

This is non-exclusive, use -s "*.foo" to match specific paths.

so I'm not sure if this means globbing should be removed from -f ??

PureKrome avatar Apr 02 '20 22:04 PureKrome

Out of interesting @AdmiringWorm - could you please confirm what the required functionality is/does for:

  • -s
  • -f

PureKrome avatar Jun 22 '20 02:06 PureKrome

@PureKrome I assume that you are talking about the functionality of them in codecov-bash. Unfortunately, I can not confirm what the functionality is there.

I can tell you what my impression of the functionality in that script though:

  • -f in codecov-bash under my impression adds additional files to their internal default list of files that it will use if they exist.
  • -s seems to be twofold in codecov-bash.
    1. It can be the base of the directories to search for coverage files.
    2. It overrides the -f and the internal files if a full path to a file, or a globbing pattern matching files are used.

Now, what the -f do here in codecov-exe and what I expect the -s argument to do is somewhat diferrent

  • -f in codecov-exe is the explicit files to upload, this must exist, or the program will throw an error (we also don't use any internal list of default files).
  • -s would be expected to be either a full path to a directory, or a globbing pattern matching directories that should be used as base directories for any relative paths specified with the -f argument.

AdmiringWorm avatar Jun 22 '20 09:06 AdmiringWorm

Thanks @AdmiringWorm !

e.g.

  • -f myreport.xml -s some\report\folder <- some\report\folder\myreport.xml
  • -f myreport.xml -s some\report\* <- some\report\folder\myreport.xml and some\report\folder2\myreport.xml

like that?

also, do you want -f to do globbing also?

PureKrome avatar Jun 22 '20 10:06 PureKrome

@PureKrome yes, exactly like that is what I envision (although, there is a need to quote the argument value to if the user would like the program instead of the shell to expand the globbing pattern).

also, do you want -f to do globbing also?

Yes, -f should still allow for globbing, both when used alone and used together with -s (although this would be in conflict with codecov-bash).

AdmiringWorm avatar Jun 22 '20 10:06 AdmiringWorm