Add Compilation Database to handle different configuration sources in an unique way #1970
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Combine squid configuration to one solution, see #1365
To analyze source code additional information like defines and includes are needed. Only then it is possible for the preprocessor and parser to generate an complete abstract syntax tree.
The solution allows to store information as key/value pairs. The information is also arranged hierarchically. If an information is not found on one level, the next higher level is searched. Additional information can be e.g. on file level (translation unit), global or from sonar-project.properties.
Pre-defined hierarchy (levels):
With
add
the key/value pairs are added to the database. The level parameter defines the level on which the data should be inserted. For level a predefined name can be used or a new one can be defined. If level is an identifier, the information is created in an element with the level-name directly under root. If level is a path, the information is stored onFiles
level.With
get
andgetValues
the information is read out again afterwards.get
returns the first found value for key, whereby the search starts on level.getValues
collects all found values over all levels. It starts with the given level and further found values are added to the end of the list.close #1365
close #1325
close #1326
This change is