dart-code-metrics icon indicating copy to clipboard operation
dart-code-metrics copied to clipboard

[Command change] - check-unused-l10n - add possibility to exclude keys by mask

Open furaiev opened this issue 3 years ago • 0 comments

It would be nice to have a possibility to exclude some keys by mask: E.g. flutter pub run dart_code_metrics:metrics check-unused-l10n lib -p ^S$ --exclude 'mcc*|any_other_mask'

  "hello": "Hello",                             <<< doesn't excluded
  "@mcc3299": {
    "type": "text",
    "placeholders": {}
  },
  "mcc3299": "Airlines",                 <<< excluded (mcc*)
  "@mcc3299": {
    "type": "text",
    "placeholders": {}
  },
  "mcc3351": "Car Rental",              <<< excluded (mcc*)
  "@mcc3351": {
    "type": "text",
    "placeholders": {}
  },

Why? Some localisations aren't used in code directly but come from the server.

furaiev avatar Feb 02 '22 13:02 furaiev