You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pylint plugin to enforce consistent file/module header.
@@ -17,7 +17,7 @@ pip install pylintfileheader
17
17
## Configuration
18
18
19
19
Generate a `.pylintrc` file by executing `pylint --generate-rcfile`.
20
-
Then add `pylintfileheader` to the plugins to load and set the `file-header` option to the [regular expression](https://docs.python.org/3/library/re.html#regular-expression-syntax) that the file header should match.
20
+
Then add `pylintfileheader` to the plugins to load and set the `file-header` option to the [regular expression](https://docs.python.org/3/library/re.html#regular-expression-syntax) that the file header should match.
21
21
When the `file-header` setting is omitted, pylint will pass.
22
22
23
23
*`file-header-ignore-empty-files` turns on the mode of ignoring the empty files, like `__init__.py`. The default value is `False`.
@@ -26,7 +26,7 @@ When the `file-header` setting is omitted, pylint will pass.
26
26
27
27
### Setup
28
28
29
-
***.pylintrc**:
29
+
***.pylintrc**:
30
30
31
31
```pylintrc
32
32
[MASTER]
@@ -35,7 +35,7 @@ When the `file-header` setting is omitted, pylint will pass.
35
35
file-header=# -----------\n#[ \w]*\n# -----------
36
36
```
37
37
38
-
***valid_example.py**:
38
+
***valid_example.py**:
39
39
40
40
```python
41
41
# -----------
@@ -45,7 +45,7 @@ When the `file-header` setting is omitted, pylint will pass.
45
45
print('I am a valid example')
46
46
```
47
47
48
-
***invalid_example.py**:
48
+
***invalid_example.py**:
49
49
50
50
```python
51
51
# lorem ipsum
@@ -55,15 +55,15 @@ When the `file-header` setting is omitted, pylint will pass.
55
55
56
56
### Evaluation
57
57
58
-
*`pylint valid_example.py` evaluates to:
58
+
*`pylint valid_example.py` evaluates to:
59
59
```
60
60
Using config file /path/to/your/.pylintrc
61
61
62
62
------------------------------------
63
63
Your code has been rated at 10.00/10
64
64
```
65
65
66
-
*`pylint invalid_example.py` evaluates to:
66
+
*`pylint invalid_example.py` evaluates to:
67
67
```
68
68
Using config file /path/to/your/.pylintrc
69
69
************* Module invalid_example
@@ -75,10 +75,10 @@ When the `file-header` setting is omitted, pylint will pass.
75
75
76
76
## Contribution
77
77
78
-
If you found a bug or are missing a feature do not hesitate to [file an issue](https://github.com/HaaLeo/pylint-file-header/issues/new/choose).
78
+
If you found a bug or are missing a feature do not hesitate to [file an issue](https://github.com/HaaLeo/pylint-file-header/issues/new/choose).
79
79
Pull Requests are welcome!
80
80
81
81
## Support
82
82
83
-
When you like this package make sure to [star the repository](https://github.com/HaaLeo/pylint-file-header/stargazers). I am always looking for new ideas and feedback.
83
+
When you like this package make sure to [star the repository](https://github.com/HaaLeo/pylint-file-header/stargazers). I am always looking for new ideas and feedback.
84
84
In addition, it is possible to [donate via paypal](https://www.paypal.me/LeoHanisch).
0 commit comments