Skip to content

Commit 3b9446c

Browse files
authored
Update README.rst
1 parent 64a8468 commit 3b9446c

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,34 @@ The following command will lint all files in the current directory:
4545
4646
The default configuration file name is `.relint.yaml` within your working
4747
directory, but you can provide any YAML or JSON file.
48+
49+
Samples
50+
-------
51+
52+
.. code-block:: yaml
53+
54+
- name: db fixtures
55+
pattern: "def test_[^(]+\\([^)]*(customer|product)(, |\\))"
56+
hint: Use model_mommy recipies instead of db fixtures.
57+
filename:
58+
- "**/test_*.py"
59+
60+
- name: model_mommy recipies
61+
pattern: "mommy\\.make\\("
62+
hint: Please use mommy.make_recipe instead of mommy.make.
63+
filename:
64+
- "**/test_*.py"
65+
- "conftest.py"
66+
- "**/conftest.py"
67+
68+
- name: the database is lava
69+
pattern: "@pytest.fixture.*\\n[ ]*def [^(]+\\([^)]*(db|transactional_db)(, |\\))"
70+
hint: Please do not create db fixtures but model_mommy recipies instead.
71+
filename:
72+
- "*.py"
73+
74+
- name: No logger in management commands
75+
pattern: "(logger|import logging)"
76+
hint: "Please write to self.stdout or self.stderr in favor of using a logger."
77+
filename:
78+
- "*/management/commands/*.py"

0 commit comments

Comments
 (0)