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.cfiles 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/conscrypt/main_src/fix_format.py