CheckCommand constructor
CheckCommand()
Implementation
CheckCommand() {
argParser
..addFlag(
'strict',
negatable: false,
help: 'Promote warnings to errors (CI mode).',
)
..addFlag(
'strict-length',
negatable: false,
help:
'Also promote the length-family warnings (length-ratio, '
'width-budget) to errors. Independent of --strict because these '
'length heuristics are softer conventions than the other checks.',
)
..addFlag(
'fix',
negatable: false,
help:
'Normalize ARB files in place: sort keys, hoist @@locale, place '
'each @key block after its key, strip descriptive metadata from '
'translations (keeping locked + source_hash), stamp source_hash '
'provenance onto unlocked translations, drop orphan @key blocks.',
)
..addFlag(
'stamp',
defaultsTo: true,
help:
'With --fix, stamp source_hash provenance onto unlocked '
'translations that lack it. Use --no-stamp for the authoring pass '
'on a brand-new locale, so the first review stays a readable diff '
'of translations instead of one @key block per key; the next '
'--fix stamps them. Existing hashes are always preserved.',
)
..addOption(
'ack',
help:
'Acknowledge a soft-mode warning so it stops surfacing: '
'--ack <rule>:<locale>:<key> (e.g. '
'source_equality:vi:settingsEmailLabel). Writes '
'.dialect/state.json; re-fires if the source/translation changes.',
valueHelp: 'rule:locale:key',
)
..addOption(
'note',
help: 'Optional justification stored alongside --ack.',
);
}