-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
How to add multiple assemblies in assemblyfilters #84
Comments
Regarding 1. Regarding 2. Here's some sample code to generate a text file containing the coverage ratio:
|
1)currently the dlls which are not getting filtered out are "fluentassertions.core.dll","fluentassertions.dll". 2)regarding the teamcity ,i will try out your solution and update you once its done. Thanks for your quick response. |
|
1.so the problem was with the syntax of powershell command.Had to surround assembly filter vaules with double quotes 2.I wrote powershell script which had following steps And in the teamcity build definition added failure condition which will check for specific text in build log. |
Perfect, then I can close this issue? I think double quotes work best if placed before the complete argument, e.g.:
Also see usage section here: |
Need to reopen this. When using the Azure DevOps Extension there is no way for you to surround the parameters with |
I will investigate this within the next days. |
Could you please try again by triggering the build on Azure DevOps? |
Tested it and doesn't appear to be fixed. This is what is showing in the log for the translated command line that gets executed. This is my task in the YAML. - task: reportgenerator@4
inputs:
reports: '$(Build.SourcesDirectory)/**/coverage.cobertura.xml'
targetdir: '$(Build.SourcesDirectory)/CodeCoverage'
reporttypes: 'HtmlInline_AzurePipelines_Dark;Cobertura;Badges'
assemblyfilters: '-Dapper.*;-Dommel.*' :\Program Files\dotnet\dotnet.exe" D:\agent\_work\_tasks\reportgenerator_be803a55-9253-4895-a525-be570d86f161\4.2.7\tools\netcoreapp2.1\ReportGenerator.dll "\"-reports:D:\agent\_work\10\s/**/coverage.cobertura.xml\"" "\"-targetdir:D:\agent\_work\10\s/CodeCoverage\"" "\"-reporttypes:HtmlInline_AzurePipelines_Dark;Cobertura;Badges\"" "\"-sourcedirs:\"" "\"-historydir:\"" "\"-plugins:\"" "\"-assemblyfilters:-Dapper.*;-Dommel.*\"" "\"-classfilters:+*\"" "\"-filefilters:+*\"" "\"-verbosity:Verbose\"" "\"-tag:RCRMS Release Build_#1432\"" |
Can you please test once again.
|
Still not working. It isn't wrapping the assemblyfilters option in quotes. So it still only processes the |
Ok, The arguments seem to get passed correctly to ReportGeneratorr:
The problem is probably the filter definition itself. If you change the filter to |
That makes sense. Will retest and report.
…On Fri, Jul 12, 2019, 3:03 AM Daniel Palme ***@***.***> wrote:
Ok, The arguments seem to get passed correctly to *ReportGeneratorr*:
| -assemblyfilters:-Dapper.*;-Dommel.* |
The problem is probably the filter definition itself.
The filters are not interpreted as regular expressions but as text with
wildcards.
In your case Dommel.* does not match the assembly Dommel, it would only
match Dommel.XYZ.
If you change the filter to -assemblyfilters:-Dapper.*;-Dommel or
-assemblyfilters:-Dapper.*;-Dommel* it should work as expected.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#84?email_source=notifications&email_token=AALXG3JHSNM4XDRW4R6C3ODP7AUFTA5CNFSM4DBL3H7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZY4MUA#issuecomment-510772816>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AALXG3OKAPL7LVTPVZGCWQLP7AUFTANCNFSM4DBL3H7A>
.
|
Close this as resolved. Works!! Thanks so much! |
Hi daniel,
I have two doubts
For example ,
currrently i an using following powershell command
ReportGenerator.exe" -reports:"coverage.xml" -targetdir:Coverage -assemblyfilters:-tests;-fluentassertions*
but the final report only filters out the test assemly dll and not the fluentassertions.
Is there any syntax error ,if yes then please specify the correct way to do this.
for example:
If the codecoverage is 40% ,then is there any way that i can add condition in teamcity build so that this build fails for codecoverage less than say 50%.
Thanks in advance :)
The text was updated successfully, but these errors were encountered: