ci: Add clang-tidy-full-scan manual job and rename existing job as smart scan
Add a manual job to the CI/CD pipeline that runs a full scan of clang-tidy (i.e., on all files). This job is manual and needs to be triggered explicitly by the user via GitLab. The existing clang-tidy job was renamed clang-tidy-20-smart-scan. It has internal logic to decide whether to run a full scan or a scan on the modified files only.
In summary, the logic of the clang-tidy jobs is as follows:
- In the main branch, always run the
clang-tidy-20-full-scanjob. - In MRs, run the
clang-tidy-20-smart-scanjob and set theclang-tidy-20-full-scanjob as manual (i.e., optional).
The smart scan job is enough for almost all MRs. The objective of the clang-tidy-20-full-scan job is to provide an easy method to run a full scan in MRs. For example, MRs with large refactorings or changes to class contructors, which might trigger warnings in files that were not directly modified by the MR, but which might be affected by its changes. An example is !2612 (merged), in which the changes in the class constructor raised modernize-use-auto warnings in other parts of the code.