Run clang-tidy with default checks when the project has none
TirSystem/github-action: Publish wiki / publish-wiki (push) Skipped
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Skipped
Validate workflows / validate (pull_request) Successful in 22s
TirSystem/github-action: Publish wiki / publish-wiki (push) Skipped
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Skipped
Validate workflows / validate (pull_request) Successful in 22s
Task: MIL-007#4
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<!-- translation of QualityChecksCpp.md, source sha256 f54f7f7dc713 -->
|
||||
<!-- translation of QualityChecksCpp.md, source sha256 fd8bb0d71906 -->
|
||||
|
||||
> Dette er en oversættelse af [`QualityChecksCpp`](QualityChecksCpp). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
||||
|
||||
@@ -41,7 +41,7 @@ Henvis til workflowet ved major-tagget (`@v1`) eller et præcist tag, aldrig ved
|
||||
## Hvad repositoryet skal have
|
||||
|
||||
- En `.clang-format` i arbejdsmappen eller i en mappe over den, op til repositoryets rod. Uden en fejler kørslen med `[configuration]`, og intet værktøj kører.
|
||||
- Eventuelt en `.clang-tidy` med projektets kontroller (for eksempel C++ Core Guidelines). Uden en kører clang-tidy sine standardkontroller.
|
||||
- Eventuelt en `.clang-tidy` med projektets kontroller (for eksempel C++ Core Guidelines). Uden en kører workflowet compilerdiagnostik og den statiske analysator (`clang-diagnostic-*` og `clang-analyzer-*`), fordi clang-tidy selv ikke aktiverer nogen kontrol uden konfiguration.
|
||||
- For præcise statiske kontroller en compile-database: byg den først (for eksempel `cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON`) og angiv `compile-commands-dir: build`. Workflowet bygger ikke dit projekt.
|
||||
|
||||
## Hvad der kontrolleres
|
||||
@@ -49,7 +49,7 @@ Henvis til workflowet ved major-tagget (`@v1`) eller et præcist tag, aldrig ved
|
||||
| Filer | Værktøj | Hvad det melder |
|
||||
| --- | --- | --- |
|
||||
| sporede `*.c`, `*.cc`, `*.cpp`, `*.cxx`, `*.h`, `*.hh`, `*.hpp`, `*.hxx` | `clang-format --dry-run -Werror` | formatering, der afviger fra `.clang-format` |
|
||||
| de samme filer | `clang-tidy` | fund fra kontrollerne i `.clang-tidy`; `*.c`-filer kontrolleres som C17, de øvrige filer som C++-standarden i `std` |
|
||||
| de samme filer | `clang-tidy` | fund fra kontrollerne i `.clang-tidy` (eller fra `clang-diagnostic-*` og `clang-analyzer-*` uden en); `*.c`-filer kontrolleres som C17, de øvrige filer som C++-standarden i `std` |
|
||||
|
||||
Usporede filer kontrolleres ikke. Et repository uden disse filer består med en bemærkning. Der er ingen `cppcheck`: kun en gammel version findes som pakke, og gamle værktøjer køres ikke (ADR-0008).
|
||||
|
||||
|
||||
@@ -50,7 +50,9 @@ version of a tool is a new release of this repository, not a silent change.
|
||||
the top of the repository. Without one the run fails with `[configuration]`
|
||||
and no tool runs.
|
||||
- Optionally a `.clang-tidy` with the checks of the project (for example the
|
||||
C++ Core Guidelines). Without one clang-tidy runs its default checks.
|
||||
C++ Core Guidelines). Without one the workflow runs the compiler diagnostics
|
||||
and the static analyzer (`clang-diagnostic-*` and `clang-analyzer-*`),
|
||||
because clang-tidy itself enables no check when there is no configuration.
|
||||
- For precise static checks, a compile database: build it first (for example
|
||||
`cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON`) and pass
|
||||
`compile-commands-dir: build`. The workflow does not build your project.
|
||||
@@ -60,7 +62,7 @@ version of a tool is a new release of this repository, not a silent change.
|
||||
| Files | Tool | What it reports |
|
||||
| --- | --- | --- |
|
||||
| tracked `*.c`, `*.cc`, `*.cpp`, `*.cxx`, `*.h`, `*.hh`, `*.hpp`, `*.hxx` | `clang-format --dry-run -Werror` | formatting that differs from `.clang-format` |
|
||||
| the same files | `clang-tidy` | findings of the checks of `.clang-tidy`; `*.c` files are checked as C17, the other files as the C++ standard of `std` |
|
||||
| the same files | `clang-tidy` | findings of the checks of `.clang-tidy` (or of `clang-diagnostic-*` and `clang-analyzer-*` without one); `*.c` files are checked as C17, the other files as the C++ standard of `std` |
|
||||
|
||||
Untracked files are not checked. A repository without these files passes with a
|
||||
notice. There is no `cppcheck`: only an old version of it is available as a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- translation of QualityChecksCpp.md, source sha256 f54f7f7dc713 -->
|
||||
<!-- translation of QualityChecksCpp.md, source sha256 fd8bb0d71906 -->
|
||||
|
||||
> Ini ialah terjemahan [`QualityChecksCpp`](QualityChecksCpp). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
||||
|
||||
@@ -41,7 +41,7 @@ Rujuk aliran kerja pada tag major (`@v1`) atau pada tag tepat, jangan sekali-kal
|
||||
## Apa yang diperlukan oleh repositori
|
||||
|
||||
- Satu `.clang-format` dalam direktori kerja atau dalam direktori di atasnya, sehingga akar repositori. Tanpanya larian gagal dengan `[configuration]` dan tiada alat dijalankan.
|
||||
- Pilihan: satu `.clang-tidy` dengan semakan projek (contohnya C++ Core Guidelines). Tanpanya clang-tidy menjalankan semakan lalainya.
|
||||
- Pilihan: satu `.clang-tidy` dengan semakan projek (contohnya C++ Core Guidelines). Tanpanya aliran kerja menjalankan diagnostik pengkompil dan penganalisis statik (`clang-diagnostic-*` dan `clang-analyzer-*`), kerana clang-tidy sendiri tidak mengaktifkan sebarang semakan tanpa konfigurasi.
|
||||
- Untuk semakan statik yang tepat, satu pangkalan data kompilasi: bina dahulu (contohnya `cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON`) dan berikan `compile-commands-dir: build`. Aliran kerja tidak membina projek anda.
|
||||
|
||||
## Apa yang disemak
|
||||
@@ -49,7 +49,7 @@ Rujuk aliran kerja pada tag major (`@v1`) atau pada tag tepat, jangan sekali-kal
|
||||
| Fail | Alat | Apa yang dilaporkan |
|
||||
| --- | --- | --- |
|
||||
| `*.c`, `*.cc`, `*.cpp`, `*.cxx`, `*.h`, `*.hh`, `*.hpp`, `*.hxx` yang dijejaki | `clang-format --dry-run -Werror` | pemformatan yang berbeza daripada `.clang-format` |
|
||||
| fail yang sama | `clang-tidy` | dapatan semakan dalam `.clang-tidy`; fail `*.c` disemak sebagai C17, fail lain sebagai piawaian C++ dalam `std` |
|
||||
| fail yang sama | `clang-tidy` | dapatan semakan dalam `.clang-tidy` (atau `clang-diagnostic-*` dan `clang-analyzer-*` tanpanya); fail `*.c` disemak sebagai C17, fail lain sebagai piawaian C++ dalam `std` |
|
||||
|
||||
Fail yang tidak dijejaki tidak disemak. Repositori tanpa fail ini lulus dengan satu notis. Tiada `cppcheck`: hanya versi lama tersedia sebagai pakej, dan alat lama tidak dijalankan (ADR-0008).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user