- We are interested to see how design patterns can be checked in SonarQube.
- Regarding the cross-modular checks β unfortunately I was not able to find any link or document that explains it in more detail, so I will try myself - it is somewhat technical
. Let us assume the following example:
i.e. we have two source files that share a common header file, which defines a data structure (struct x) with a conditional item (int b). Those two files are separately compiled and linked into a single executable image. If both source files define B_INCLUDED, which controls the conditional part of the data structure, everything will work correctly. But if the first source file defines B_INCLUDED, while the second does not, things will not work as expected. The problem is that: 1) seen from the compilerβs perspective, there is no issue, 2) linker does not perform this type of check, 3) static analysis at the level of source files will not reveal the issue. That department is using PC-Lint (Gimpel Software) is capable of this cross-modular checks which focus exactly on these issues β basically it supplements the functionality that is (by design, perhaps from historical reasons) missing in the linker.