Skip to content

Commit fc96127

Browse files
vmpurivmpuri
and
vmpuri
authored
Move .lintrunner.toml to top-level directory and include basic linting instructions in CONTRIBUTING.md (#1258)
Co-authored-by: vmpuri <[email protected]>
1 parent 34d6831 commit fc96127

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

install/.lintrunner.toml renamed to .lintrunner.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ init_command = [
1919
'run',
2020
'pip_init',
2121
'--dry-run={{DRYRUN}}',
22-
'--requirement=requirements-lintrunner.txt',
22+
'--requirement=install/requirements-lintrunner.txt',
2323
]
2424

2525
# Black + usort
@@ -46,7 +46,7 @@ init_command = [
4646
'pip_init',
4747
'--dry-run={{DRYRUN}}',
4848
'--no-black-binary',
49-
'--requirement=requirements-lintrunner.txt',
49+
'--requirement=install/requirements-lintrunner.txt',
5050
]
5151
is_formatter = true
5252

@@ -75,6 +75,6 @@ init_command = [
7575
'run',
7676
'pip_init',
7777
'--dry-run={{DRYRUN}}',
78-
'--requirement=requirements-lintrunner.txt',
78+
'--requirement=install/requirements-lintrunner.txt',
7979
]
8080
is_formatter = true

CONTRIBUTING.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,23 @@ We actively welcome your pull requests.
1010
2. If you've added code that should be tested, add tests.
1111
3. If you've changed APIs, update the documentation.
1212
4. Ensure the test suite passes.
13-
5. Make sure your code lints.
13+
5. Make sure your code is well-formatted using the repo linter. See "Linting" for details.
1414
6. If you haven't already, complete the Contributor License Agreement ("CLA").
1515

16+
17+
### Linting
18+
Install the lintrunner dependencies from the requirements file.
19+
```
20+
pip3 install -r install/requirements-lintrunner.txt
21+
```
22+
23+
After making your changes locally, run the lintrunner and apply all suggestions to your changes.
24+
You can do this from the top-level torchchat directory - it will apply suggestions only to files that
25+
you have touched.
26+
```
27+
lintrunner -a
28+
```
29+
1630
## Contributor License Agreement ("CLA")
1731
In order to accept your pull request, we need you to submit a CLA. You only need
1832
to do this once to work on any of Meta's open source projects.

0 commit comments

Comments
 (0)