File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,24 @@ following conditions is met:
104
104
* The average complexity (among all of the analyzed blocks) is ranked with
105
105
``B `` or higher.
106
106
107
+ Pre-commit hook
108
+ +++++++++++++++
109
+
110
+ Xenon can be used in combination with `pre-commit <https://pre-commit.com/ >`_ as follows:
111
+
112
+ .. code-block :: yaml
113
+
114
+ # monitor code complexity
115
+ - repo : https://github.com/rubik/xenon
116
+ rev : v0.9.0
117
+ hooks :
118
+ - id : xenon
119
+ args : ['--max-absolute=B', '--max-modules=B', '--max-average=A']
120
+
121
+ Note: due to how options are passed to commands by pre-commit, make sure to
122
+ pass values either with an equals sign like in the above example, or by
123
+ splitting them as separate list items, e.g. ``['--max-absolute', 'B'] ``.
124
+
107
125
Other resources
108
126
---------------
109
127
You can’t perform that action at this time.
0 commit comments