Conscrypt Formatting
When modifying C++, C, or Java files in the Conscrypt project, you MUST run
the project's custom formatting script. The standard g4 fix or global
formatters are not sufficient as Conscrypt uses a specific configuration.
Critical Rules
- Run after modifications: Always run the formatter after making any
changes to
.java, .cc, .h, .cpp, or .c files in Conscrypt, and
before creating a CL, uploading, or submitting.
- Files must be opened: The formatting script only processes files that
are currently opened for edit in your VCS (e.g., via
g4 edit, hg edit, etc.). Ensure your modified files are opened before running the
script.
How to Format
Run the Python script located in the Conscrypt root directory:
python3 third_party/java_src/conscrypt/fix_format.py
Source: google/conscrypt — distributed by TomeVault.
1---2name: google-conscrypt-conscrypt3description: Conscrypt Formatting4---56# Conscrypt Formatting78When modifying C++, C, or Java files in the Conscrypt project, you **MUST** run9the project's custom formatting script. The standard `g4 fix` or global10formatters are not sufficient as Conscrypt uses a specific configuration.1112## Critical Rules13141. **Run after modifications**: Always run the formatter *after* making any15 changes to `.java`, `.cc`, `.h`, `.cpp`, or `.c` files in Conscrypt, and16 *before* creating a CL, uploading, or submitting.172. **Files must be opened**: The formatting script only processes files that18 are currently **opened for edit** in your VCS (e.g., via `g4 edit`, `hg19 edit`, etc.). Ensure your modified files are opened before running the20 script.2122## How to Format2324Run the Python script located in the Conscrypt root directory:2526```bash27python3 third_party/java_src/conscrypt/fix_format.py28```2930---31> Source: [google/conscrypt](https://github.com/google/conscrypt) — distributed by [TomeVault](https://tomevault.io).32<!-- tomevault:4.0:skill_md:2026-06-17 -->