tor-browser

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

license.rst (1195B)


      1 License
      2 =======
      3 
      4 This linter verifies if a file has a known license header.
      5 
      6 By default, Firefox uses MPL-2 license with the `appropriate headers <https://www.mozilla.org/en-US/MPL/headers/>`_.
      7 In some cases (thirdpardy code), a file might have a different header file.
      8 If this is the case, one of the significant line of the header should be listed in the list `of valid licenses
      9 <https://searchfox.org/mozilla-central/source/tools/lint/license/valid-licenses.txt>`_.
     10 
     11 Run Locally
     12 -----------
     13 
     14 This mozlint linter can be run using mach:
     15 
     16 .. parsed-literal::
     17 
     18    $ mach lint --linter license <file paths>
     19 
     20 
     21 Configuration
     22 -------------
     23 
     24 This linter is enabled on most of the whole code base.
     25 
     26 Autofix
     27 -------
     28 
     29 This linter provides a ``--fix`` option. The python script is doing the change itself
     30 and will use the right header MPL-2 header depending on the language.
     31 It will add the license at the right place in case the file is a script (ie starting with ``!#``
     32 or a XML file ``<?xml>``).
     33 
     34 
     35 Sources
     36 -------
     37 
     38 * `Configuration (YAML) <https://searchfox.org/mozilla-central/source/tools/lint/license.yml>`_
     39 * `Source <https://searchfox.org/mozilla-central/source/tools/lint/license/__init__.py>`_