Need to Exclude files of Js,html and css files in my project scan

Need to Exclude files of Js,html and css files in my project scan.
I used below modification in Jenkin files using sonar exclusion as below

steps {
                        container('dotnetcore6') {
                            sonarScan(
                                projectKey: 'PTATDPORTAL:FidelityUI',
                                applicationName: "${APPLICATION_NAME}",
                                projectVersion: "1.0.0",
                                sonarArgs: ['-Dsonar.exclusions=**/*.css,**/*.html,**/*.js,**/*.cshtml'],
                                sonarQualityGate: 'PTATDPortal_QualityGate',
                                sonarLanguage: 'dotnetcore',
                                dotnetWindowsBuild: false,
                                msSolutionPath: ['SomePorjectName.sln']
                            )
                        }
                    }

When run build i am getting error as below
Unrecognized command line argument: -Dsonar.exclusions=**/*.css,**/*.html,**/*.js,**/*.cshtml

Please help me out on this whether i am uisng correct or not

Hi,

Welcome to the community!

Your argument specification looks correct to me. I generally favor setting exclusions via the UI, because it’s just easier. That would be the first thing I tried here. Otherwise, can you share your analysis log?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann