Skip to content

Commit 58cf698

Browse files
committed
Document commands
1 parent b76868c commit 58cf698

1 file changed

Lines changed: 103 additions & 0 deletions

File tree

tools/make/lib/lint/README.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,109 @@ This command is useful when wanting to lint a list of Julia files generated by s
322322

323323
* * *
324324

325+
### Python
326+
327+
#### lint-python
328+
329+
Lints Python files.
330+
331+
<!-- run-disable -->
332+
333+
```bash
334+
$ make lint-python
335+
```
336+
337+
The command supports the environment variables supported by each context-specific (`lint-python-<context>`) command documented below.
338+
339+
This command is useful when wanting to glob for files, irrespective of context, for a particular package in order to lint all contained Python files.
340+
341+
#### lint-python-src
342+
343+
Lints Python source files.
344+
345+
<!-- run-disable -->
346+
347+
```bash
348+
$ make lint-python-src
349+
```
350+
351+
The command supports the following environment variables:
352+
353+
- **PYTHON_SOURCES_FILTER**: file path pattern; e.g., `.*/blas/base/dasum/.*`.
354+
- **FAST_FAIL**: flag indicating whether to stop linting upon encountering a lint error.
355+
356+
This command is useful when wanting to glob for Python source files (e.g., lint all Python source files for a particular package).
357+
358+
#### lint-python-tests-fixtures
359+
360+
Lints Python test fixture files.
361+
362+
<!-- run-disable -->
363+
364+
```bash
365+
$ make lint-python-tests-fixtures
366+
```
367+
368+
The command supports the following environment variables:
369+
370+
- **PYTHON_TESTS_FIXTURES_FILTER**: file path pattern; e.g., `.*/blas/base/dasum/.*`.
371+
- **FAST_FAIL**: flag indicating whether to stop linting upon encountering a lint error.
372+
373+
This command is useful when wanting to glob for Python test fixture files (e.g., lint all Python test fixture files for a particular package).
374+
375+
#### lint-python-examples
376+
377+
Lints Python examples files.
378+
379+
<!-- run-disable -->
380+
381+
```bash
382+
$ make lint-python-examples
383+
```
384+
385+
The command supports the following environment variables:
386+
387+
- **PYTHON_EXAMPLES_FILTER**: file path pattern; e.g., `.*/blas/base/dasum/.*`.
388+
- **FAST_FAIL**: flag indicating whether to stop linting upon encountering a lint error.
389+
390+
This command is useful when wanting to glob for Python examples files (e.g., lint all Python examples files for a particular package).
391+
392+
#### lint-python-benchmarks
393+
394+
Lints Python benchmark files.
395+
396+
<!-- run-disable -->
397+
398+
```bash
399+
$ make lint-python-src
400+
```
401+
402+
The command supports the following environment variables:
403+
404+
- **PYTHON_BENCHMARKS_FILTER**: file path pattern; e.g., `.*/blas/base/dasum/.*`.
405+
- **FAST_FAIL**: flag indicating whether to stop linting upon encountering a lint error.
406+
407+
This command is useful when wanting to glob for Python benchmark files (e.g., lint all Python benchmark files for a particular package).
408+
409+
#### lint-python-files
410+
411+
Lints a specified list of Python files.
412+
413+
<!-- run-disable -->
414+
415+
```bash
416+
$ make lint-python-files FILES='/foo/file.py /bar/file.py'
417+
```
418+
419+
The command supports the following environment variables:
420+
421+
- **FILES**: list of Python files.
422+
- **FAST_FAIL**: flag indicating whether to stop linting upon encountering a lint error.
423+
424+
This command is useful when wanting to lint a list of Python files generated by some other command (e.g., a list of changed Python files obtained via `git diff`).
425+
426+
* * *
427+
325428
### Configuration Files
326429

327430
#### lint-conf

0 commit comments

Comments
 (0)