tor-browser

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

ignorefile.rst (1053B)


      1 Ignorefile Lint
      2 ===============
      3 
      4 Ignorefile lint is a linter for ``.gitignore`` and ``.hgignore`` files,
      5 to verify those files have equivalent entries.
      6 
      7 Each pattern is roughly compared, ignoring punctuation, to absorb the
      8 syntax difference.
      9 
     10 Run Locally
     11 -----------
     12 
     13 The mozlint integration of ignorefile linter can be run using mach:
     14 
     15 .. parsed-literal::
     16 
     17    $ mach lint --linter ignorefile
     18 
     19 
     20 Special syntax
     21 --------------
     22 
     23 The following special comment can be used to ignore the pattern in the next line.
     24 
     25 .. parsed-literal::
     26 
     27    # lint-ignore-next-line: git-only
     28 
     29 The next line exists only in ``.gitignore``.
     30 
     31 .. parsed-literal::
     32    # lint-ignore-next-line: syntax-difference
     33 
     34 The next line's pattern needs to be represented differently between
     35 ``.gitignore`` and ``.hgignore``.
     36 This can be used when the ``.hgignore`` uses complex pattern which cannot be
     37 represented in single pattern in ``.gitignore``.
     38 
     39 
     40 Sources
     41 -------
     42 
     43 * :searchfox:`Configuration (YAML) <tools/lint/ignorefile.yml>`
     44 * :searchfox:`Source <tools/lint/ignorefile/__init__.py>`