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

{Aggregate|Density}MeasureComputer: reduce and soften the logging #1641

Merged
merged 1 commit into from
Dec 27, 2018

Conversation

ivangalkin
Copy link
Contributor

@ivangalkin ivangalkin commented Dec 21, 2018

fixes #1640


This change is Reviewable

@ivangalkin ivangalkin requested a review from guwirth December 21, 2018 21:22
@ivangalkin ivangalkin self-assigned this Dec 21, 2018
@ivangalkin ivangalkin added this to the 1.2.1 milestone Dec 21, 2018
@ivangalkin ivangalkin mentioned this pull request Dec 21, 2018
@guwirth guwirth modified the milestones: 1.2.1, 1.2.2 Dec 22, 2018
@guwirth
Copy link
Collaborator

guwirth commented Dec 23, 2018

@ivangalkin think it’s possible to filter for the language.

So not sure if we can keep some warnings but only for our language?

@ivangalkin
Copy link
Contributor Author

@guwirth you are right about the FileAttributes::getLanguageKey() property. It's possible to determine the language, but only for FILEs

  /**
   * The attributes of the Component if it's type is File.
   *
   * @throws IllegalStateException if the Component's type is not {@link Type#FILE}
   */
  FileAttributes getFileAttributes();

However the visitor iterates over different component types: the full list is PROJECT, MODULE, DIRECTORY, FILE, VIEW, SUBVIEW. In my opinion it would be too complex (and not really useful) to detect if e.g. MODULE has at least one C/C++ file. It would require manual implementation of recursive algorithm and wouldn't really fit with the visitor approach. Since it's only about the traces, I believe it's not really worth it.

@guwirth
Copy link
Collaborator

guwirth commented Dec 27, 2018

@ivangalkin ok. Seems there will be anyway some changes: https://jira.sonarsource.com/browse/MMF-365.

@guwirth guwirth merged commit 0be32bb into SonarOpenCommunity:master Dec 27, 2018
@guwirth guwirth mentioned this pull request Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

CE log is flooded with DEBUG and ERROR entries
2 participants