File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff 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
4747directory, 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"
You can’t perform that action at this time.
0 commit comments