diff --git a/install/.lintrunner.toml b/.lintrunner.toml similarity index 87% rename from install/.lintrunner.toml rename to .lintrunner.toml index a76b5ef2d..d11e24826 100644 --- a/install/.lintrunner.toml +++ b/.lintrunner.toml @@ -19,7 +19,7 @@ init_command = [ 'run', 'pip_init', '--dry-run={{DRYRUN}}', - '--requirement=requirements-lintrunner.txt', + '--requirement=install/requirements-lintrunner.txt', ] # Black + usort @@ -46,7 +46,7 @@ init_command = [ 'pip_init', '--dry-run={{DRYRUN}}', '--no-black-binary', - '--requirement=requirements-lintrunner.txt', + '--requirement=install/requirements-lintrunner.txt', ] is_formatter = true @@ -75,6 +75,6 @@ init_command = [ 'run', 'pip_init', '--dry-run={{DRYRUN}}', - '--requirement=requirements-lintrunner.txt', + '--requirement=install/requirements-lintrunner.txt', ] is_formatter = true diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1bf135615..72c36bead 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,9 +10,23 @@ We actively welcome your pull requests. 2. If you've added code that should be tested, add tests. 3. If you've changed APIs, update the documentation. 4. Ensure the test suite passes. -5. Make sure your code lints. +5. Make sure your code is well-formatted using the repo linter. See "Linting" for details. 6. If you haven't already, complete the Contributor License Agreement ("CLA"). + +### Linting +Install the lintrunner dependencies from the requirements file. +``` +pip3 install -r install/requirements-lintrunner.txt +``` + +After making your changes locally, run the lintrunner and apply all suggestions to your changes. +You can do this from the top-level torchchat directory - it will apply suggestions only to files that +you have touched. +``` +lintrunner -a +``` + ## Contributor License Agreement ("CLA") In order to accept your pull request, we need you to submit a CLA. You only need to do this once to work on any of Meta's open source projects.