agents/projects/code-health/lint-sync/references/patterns.md
The linter links files by cross-referencing labels. Follow these syntax rules to
format your LINT.IfChange and LINT.ThenChange guards correctly.
LINT.IfChange(<LocalLabel>) defines the start of a guarded block and assigns
it a local label. Always use the name of the enum as it appears in the
current file.LINT.ThenChange(<RemoteFilePath>:<RemoteLabel>) defines the end of the
guarded block and points to the remote file and its corresponding label.
Always use the name of the enum as it appears in the remote file.SecurityDomainIdTrustedVaultSecurityDomainId// LINT.IfChange(SecurityDomainId)
enum class SecurityDomainId { ... };
// LINT.ThenChange(//tools/metrics/histograms/enums.xml:TrustedVaultSecurityDomainId)
enums.xml or histograms.xml)<!-- LINT.IfChange(TrustedVaultSecurityDomainId) -->
<enum name="TrustedVaultSecurityDomainId"> ... </enum>
<!-- LINT.ThenChange(//path/to/source.h:SecurityDomainId) -->