tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

fluent-lint.rst (1418B)


      1 Fluent Lint
      2 ===========
      3 
      4 Fluent lint is a linter for Fluent files (.ftl). Currently, it includes:
      5 
      6 * Checks for invalid typography in messages (e.g. straight single or double quotes).
      7 * Checks for comments layout.
      8 * Checks for identifiers (minimum length, allowed characters).
      9 * Hard-coded brand names.
     10 
     11 
     12 Run Locally
     13 -----------
     14 
     15 The mozlint integration of fluent-lint can be run using mach:
     16 
     17 .. parsed-literal::
     18 
     19    $ mach lint --linter fluent-lint <file paths>
     20 
     21 Alternatively, omit the ``--linter fluent-lint`` and run all configured linters, which will include
     22 fluent-lint.
     23 
     24 
     25 Run on Taskcluster
     26 ------------------
     27 
     28 The fluent-lint job shows up as text(fluent) in the linting job. It should run automatically if
     29 changes are made to fluent (ftl) files.
     30 
     31 
     32 Configuration
     33 -------------
     34 
     35 The main configuration file is found in :searchfox:`tools/lint/fluent-lint/exclusions.yml`. This provides
     36 a way of excluding identifiers or files from checking. In general, exclusions are only to be
     37 used for identifiers that are generated programmatically, but unfortunately, there are other
     38 exclusions that are required for historical reasons. In almost all cases, it should *not* be
     39 necessary to add new exclusions to this file.
     40 
     41 
     42 Sources
     43 -------
     44 
     45 * :searchfox:`Configuration (YAML) <tools/lint/fluent-lint.yml>`
     46 * :searchfox:`Source <tools/lint/fluent-lint/__init__.py>`
     47 * :searchfox:`Test <tools/lint/test/test_fluent_lint.py>`