question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No match found error when excluding multiple namespaces

See original GitHub issue

Hi, As suggested by @MarcoRossignoli I’m opening this issue after the short conversation on #56 When trying to use Exclude filter in MSBuild task integration to exclude more than one namespace I get some errors:

dotnet test --configuration Develop /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=TestResults/Coverage/ /p:Exclude=\"[*]CustomControls*,[*]TinyIoC*\"
zsh: no matches found: /p:Exclude="[*]CustomControls*,[*]TinyIoC*"

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:22

github_iconTop GitHub Comments

2reactions
petlicommented, Aug 26, 2020

zsh escaping is similar to sh or bash, you can find a maybe too detailed documentation here e.g.: http://zsh.sourceforge.net/Guide/zshguide05.html

Double quotes usually disables globbing, but in your example there is \" which means that the quoting is escaped. It will then treat * as a globbing pattern, which fails since it of course doesn’t match any files. You can try just removing the backslashes:

dotnet test --configuration Develop /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=TestResults/Coverage/ /p:Exclude="[*]CustomControls*,[*]TinyIoC*"

or if the double quotes are somehow needed for the msbuild task use single qoutes around the whole thing to preserve both double quotes and the pattern as-is:

dotnet test --configuration Develop /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=TestResults/Coverage/ '/p:Exclude="[*]CustomControls*,[*]TinyIoC*"'
1reaction
micheleissacommented, Aug 27, 2020

Oh sorry again take a look at escape syntax like our build https://github.com/coverlet-coverage/coverlet/blob/master/eng/build.yml

Last test task Does it work?

Thanks, it finally worked with %2c suggestion and yes the test task works

Read more comments on GitHub >

github_iconTop Results From Across the Web

The XML contains multiple namespaces - but it only has one
I'm using SSIS to import XML files. ... If it only has one xmlns= in it, doesn't that mean it only has one...
Read more >
Resolve warnings related using namespaces
In this article ; CS0138 - Error: A using namespace directive can only be applied to namespaces; 'type' is a type not a...
Read more >
Namespaces
Namespaces are a way to divide cluster resources between multiple users (via resource quota). It is not necessary to use multiple namespaces to ......
Read more >
XQuery, XSLT, and XPath Error Codes Namespace ...
It is a static error if a namespace prefix is used within the [xsl:]exclude-result-prefixes attribute and there is no namespace binding in ...
Read more >
Unable to Delete a Project or Namespace in OCP
This usually happens because something is preventing a resource from being deleted, causing namespace deletion to be stuck. It is necessary to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found