File-level historical data , and global/project database cleanup settings

I have a question about SonarQube database settings. It seems that by default the below option is set to true. As a result of this, it seems that we cannot directly diff metrics at the file level from two subsequent analyses (only at project level). Is there anyway to configure this setting at the project level (as opposed to globally) such that for a particular project we will be able to diff metrics at the file level from subsequent analyses? Alternatively, if we just flip this setting can you quantify how much more storage we’ll need in our postgres db? Will it affect SonarQube performance?

Clean directory/package history
If set to true, no history is kept at directory/package level. Setting this to false can cause database bloat.

Hi,

There is no setting for keeping file history. There is a toggle available at both global and project levels for keeping directory history.

Ann

To complement Ann’s answer, note that when a setting is available at project level, then it effectively is a mean to override the default value set at global level.

But as Ann said, this setting you mention here is for historical data on directories. Not to mention that it’s deprecated and soon to be removed : SONAR-10180 .