@@ -20,9 +20,9 @@ You can write your own regular rules in a YAML file, like so:
2020.. code-block :: YAML
2121
2222 - name : No ToDo
23- pattern : " [tT][oO][dD][oO]"
23+ pattern : ' [tT][oO][dD][oO]'
2424 hint : Get it done right away!
25- filePatter : " .*\. (py|js)"
25+ filePattern : .*\.(py|js)
2626 error : false
2727
2828 The ``name `` attribute is the name of your linter, the ``pattern `` can be
@@ -54,7 +54,7 @@ If you prefer linting changed files (cached on git) you can use the option
5454 This option is useful for pre-commit purposes. Here an example of how to use it
5555with `pre-commit `_ framework:
5656
57- .. code-block :: YAML
57+ .. code-block :: yaml
5858
5959 - repo : https://github.com/codingjoe/relint
6060 rev : 1.2.0
@@ -69,24 +69,24 @@ Samples
6969.. code-block :: yaml
7070
7171 - name : db fixtures
72- pattern : " def test_[^(]+\\ ([^)]*(customer|product)(, |\\ )) "
72+ pattern : ' def test_[^(]+\([^)]*(customer|product)(, |\)) '
7373 hint : Use model_mommy recipies instead of db fixtures.
74- filePattern : " test_.*\. py"
74+ filePattern : test_.*\.py
7575
7676 - name : model_mommy recipies
77- pattern : " mommy\\ .make\\ ( "
77+ pattern : mommy\.make\(
7878 hint : Please use mommy.make_recipe instead of mommy.make.
79- filePattern : " (test_.*|conftest)\. py"
79+ filePattern : (test_.*|conftest)\.py
8080
8181 - name : the database is lava
82- pattern : " @pytest.fixture.*\\ n[ ]*def [^(]+\\ ([^)]*(db|transactional_db)(, |\\ )) "
82+ pattern : ' @pytest.fixture.*\n[ ]*def [^(]+\([^)]*(db|transactional_db)(, |\)) '
8383 hint : Please do not create db fixtures but model_mommy recipies instead.
84- filePattern : " .*\. py"
84+ filePattern : .*\.py
8585
8686 - name : No logger in management commands
87- pattern : " (logger|import logging)"
88- hint : " Please write to self.stdout or self.stderr in favor of using a logger."
89- filePattern : " \/ management\/ commands\/ .*\. py"
87+ pattern : (logger|import logging)
88+ hint : Please write to self.stdout or self.stderr in favor of using a logger.
89+ filePattern : \/management\/commands\/.*\.py
9090
9191 .. _`pre-commit` : https://pre-commit.com/
9292.. _`relint-pre-commit.sh` : relint-pre-commit.sh
0 commit comments