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

Do not import files detected as autogenerated in SonarQube #237

Closed
valhristov opened this issue Apr 25, 2017 · 1 comment
Closed

Do not import files detected as autogenerated in SonarQube #237

valhristov opened this issue Apr 25, 2017 · 1 comment
Assignees
Labels
Area: SQ Plugin Java plugin related issues. Type: Improvement Making existing code better.
Milestone

Comments

@valhristov
Copy link
Contributor

We want to avoid the confusion in end users by preventing files that we detect as autogenerated from importing in SonarQube.

Use InputFileFilter to filter the not needed files.

Currently the C# and VB.NET analyzers consider files that match the following conditions as autogenerated:

  • file name contains ".g.", ".generated.", etc.
  • file has comment containing "<auto-generated" or "<autogenerated"
  • file has any of these .NET attributes "DebuggerNonUserCode", etc.
    See GeneratedCodeRecognizer.cs in SonarAnalyzer.sln for more information.
@jdcoffre
Copy link

In order help user understand why some files are skipped during the analysis, can we make sure that at debug level a log explicitly mentions the file name and the reason why it has been skipped.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: SQ Plugin Java plugin related issues. Type: Improvement Making existing code better.
Projects
None yet
Development

No branches or pull requests

4 participants