Files
TheRock/rocm-systems/projects/hipfile/STYLEGUIDE.md
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

55 lines
1.6 KiB
Markdown

# hipFile Style Guide
## File and Directory Structure
### Organization
### Naming
* Use hyphens instead of underscores in file and directory names
## Formatting
* Code must meet the requirements of our options to `clang-format`
## Naming Conventions
## Comments and Documentation
## Header Guidelines
* Headers should follow [include-what-you-use](https://include-what-you-use.org/) guidelines
* Use `#pragma once` instead of include guards
* Place local headers (quoted) ahead of system headers (brackets), with each block in alphabetical order
* Public headers MUST have Doxygen markup for all public symbols
* Private headers should have Doxygen markup flagged with `@internal`
## Language Features and Idioms
### CMake
* We use CMake 3.x (see the root `CMakeLists.txt` for the specific version) and have not moved to 4.x yet
* Use modern CMake (e.g., 3.x) paradigms and avoid "legacy CMake"
### C/C++
* C++17 and C11 are supported
* Use modern C++ idioms
* Do not use GNU extensions
* Code should be platform-independent
### Shell scripts
* All shell scripts should be run through [ShellCheck](https://www.shellcheck.net/) and report no issues
* Use `#!/usr/bin/env bash` as a platform-independent shebang line
* bash-isms are allowed, within reason
## Error Handling
## Testing Conventions
* All new functionality introduced MUST include tests of the feature
* This could include unit tests, system tests, and integration tests
* These tests MUST be automatable
* Bugfixes MUST include a proof-of-concept test that fails before the fix and passes after
## Tooling and Enforcement
clang-tidy, formatter, etc.