1
0

.pre-commit-config.yaml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. exclude: ^(doc/_static/.*|doc/_themes/.*)$
  2. repos:
  3. - repo: https://github.com/s0undt3ch/salt-rewrite
  4. rev: 0.6.0
  5. hooks:
  6. - id: salt-rewrite
  7. args:
  8. - --exclude-fix=fix_asserts
  9. exclude: ^templates/.*$
  10. - repo: https://github.com/saltstack/pip-tools-compile-impersonate
  11. rev: master
  12. hooks:
  13. - id: pip-tools-compile
  14. alias: compile-linux-py2.7-zmq-requirements
  15. name: Linux Py2.7 ZeroMQ Requirements
  16. files: ^requirements/((base|zeromq|pytest)\.txt|static/linux\.in)$
  17. exclude: ^requirements/static/(lint|cloud|docs|darwin|windows)\.in$
  18. args:
  19. - -v
  20. - --py-version=2.7
  21. - --platform=linux
  22. - --include=requirements/base.txt
  23. - --include=requirements/zeromq.txt
  24. - --include=requirements/pytest.txt
  25. - id: pip-tools-compile
  26. alias: compile-darwin-py2.7-zmq-requirements
  27. name: Darwin Py2.7 ZeroMQ Requirements
  28. files: ^(pkg/osx/(req|req_ext|req_pyobjc)\.txt|requirements/((base|zeromq|pytest)\.txt|static/darwin\.in))$
  29. args:
  30. - -v
  31. - --py-version=2.7
  32. - --platform=darwin
  33. - --include=pkg/osx/req.txt
  34. - --include=pkg/osx/req_ext.txt
  35. - --include=pkg/osx/req_pyobjc.txt
  36. - --include=requirements/base.txt
  37. - --include=requirements/zeromq.txt
  38. - --include=requirements/pytest.txt
  39. - --passthrough-line-from-input=^pyobjc(.*)$
  40. - id: pip-tools-compile
  41. alias: compile-windows-py2.7-zmq-requirements
  42. name: Windows Py2.7 ZeroMQ Requirements
  43. files: ^(pkg/windows/(req|req_win)\.txt|requirements/((base|zeromq|pytest)\.txt|static/windows\.in))$
  44. args:
  45. - -v
  46. - --py-version=2.7
  47. - --platform=windows
  48. - --include=pkg/windows/req.txt
  49. - --include=pkg/windows/req_win.txt
  50. - --include=requirements/base.txt
  51. - --include=requirements/zeromq.txt
  52. - --include=requirements/pytest.txt
  53. - id: pip-tools-compile
  54. alias: compile-cloud-py2.7-requirements
  55. name: Cloud Py2.7 Requirements
  56. files: ^requirements/(static/cloud\.in)$
  57. args:
  58. - -v
  59. - --py-version=2.7
  60. - id: pip-tools-compile
  61. alias: compile-linux-crypto-py2.7-requirements
  62. name: Linux Py2.7 Crypto Requirements
  63. files: ^requirements/(crypto\.txt|static/crypto\.in)$
  64. args:
  65. - -v
  66. - --py-version=2.7
  67. - --platform=linux
  68. - --out-prefix=linux
  69. - id: pip-tools-compile
  70. alias: compile-darwin-crypto-py2.7-requirements
  71. name: Darwin Py2.7 Crypto Requirements
  72. files: ^requirements/(crypto\.txt|static/crypto\.in)$
  73. args:
  74. - -v
  75. - --py-version=2.7
  76. - --platform=darwin
  77. - --out-prefix=darwin
  78. - id: pip-tools-compile
  79. alias: compile-windows-crypto-py2.7-requirements
  80. name: Windows Py2.7 Crypto Requirements
  81. files: ^requirements/(crypto\.txt|static/crypto\.in)$
  82. args:
  83. - -v
  84. - --py-version=2.7
  85. - --platform=windows
  86. - --out-prefix=windows
  87. - id: pip-tools-compile
  88. alias: compile-linux-py3.4-zmq-requirements
  89. name: Linux Py3.4 ZeroMQ Requirements
  90. files: ^requirements/((base|zeromq|pytest)\.txt|static/linux\.in)$
  91. exclude: ^requirements/static/(centos-6|amzn-2018\.03|lint|cloud|docs|darwin|windows)\.in$
  92. args:
  93. - -v
  94. - --py-version=3.4
  95. - --platform=linux
  96. - --include=requirements/base.txt
  97. - --include=requirements/zeromq.txt
  98. - --include=requirements/pytest.txt
  99. - id: pip-tools-compile
  100. alias: compile-cloud-py3.4-requirements
  101. name: Cloud Py3.4 Requirements
  102. files: ^requirements/(static/cloud\.in)$
  103. args:
  104. - -v
  105. - --py-version=3.4
  106. - id: pip-tools-compile
  107. alias: compile-linux-crypto-py3.4-requirements
  108. name: Linux Py3.4 Crypto Requirements
  109. files: ^requirements/(crypto\.txt|static/crypto\.in)$
  110. args:
  111. - -v
  112. - --py-version=3.4
  113. - --platform=linux
  114. - --out-prefix=linux
  115. - id: pip-tools-compile
  116. alias: compile-linux-py3.5-zmq-requirements
  117. name: Linux Py3.5 ZeroMQ Requirements
  118. files: ^requirements/((base|zeromq|pytest)\.txt|static/linux\.in)$
  119. exclude: ^requirements/static/(centos-6|amzn-2018\.03|lint|cloud|docs|darwin|windows)\.in$
  120. args:
  121. - -v
  122. - --py-version=3.5
  123. - --platform=linux
  124. - --include=requirements/base.txt
  125. - --include=requirements/zeromq.txt
  126. - --include=requirements/pytest.txt
  127. - id: pip-tools-compile
  128. alias: compile-darwin-py3.5-zmq-requirements
  129. name: Darwin Py3.5 ZeroMQ Requirements
  130. files: ^(pkg/osx/(req|req_ext|req_pyobjc)\.txt|requirements/((base|zeromq|pytest)\.txt|static/darwin\.in))$
  131. args:
  132. - -v
  133. - --py-version=3.5
  134. - --platform=darwin
  135. - --include=pkg/osx/req.txt
  136. - --include=pkg/osx/req_ext.txt
  137. - --include=pkg/osx/req_pyobjc.txt
  138. - --include=requirements/base.txt
  139. - --include=requirements/zeromq.txt
  140. - --include=requirements/pytest.txt
  141. - --passthrough-line-from-input=^pyobjc(.*)$
  142. - id: pip-tools-compile
  143. alias: compile-windows-py3.5-zmq-requirements
  144. name: Windows Py3.5 ZeroMQ Requirements
  145. files: ^(pkg/windows/(req|req_win)\.txt|requirements/((base|zeromq|pytest)\.txt|static/windows\.in))$
  146. args:
  147. - -v
  148. - --py-version=3.5
  149. - --platform=windows
  150. - --include=pkg/windows/req.txt
  151. - --include=pkg/windows/req_win.txt
  152. - --include=requirements/base.txt
  153. - --include=requirements/zeromq.txt
  154. - --include=requirements/pytest.txt
  155. - id: pip-tools-compile
  156. alias: compile-cloud-py3.5-requirements
  157. name: Cloud Py3.5 Requirements
  158. files: ^requirements/(static/cloud\.in)$
  159. args:
  160. - -v
  161. - --py-version=3.5
  162. - id: pip-tools-compile
  163. alias: compile-doc-requirements
  164. name: Docs Py3.5 Requirements
  165. files: ^requirements/((base|zeromq|pytest)\.txt|static/docs\.in)$
  166. args:
  167. - -v
  168. - --py-version=3.5
  169. - --platform=linux
  170. - id: pip-tools-compile
  171. alias: compile-linux-crypto-py3.5-requirements
  172. name: Linux Py3.5 Crypto Requirements
  173. files: ^requirements/(crypto\.txt|static/crypto\.in)$
  174. args:
  175. - -v
  176. - --py-version=3.5
  177. - --platform=linux
  178. - --out-prefix=linux
  179. - id: pip-tools-compile
  180. alias: compile-darwin-crypto-py3.5-requirements
  181. name: Darwin Py3.5 Crypto Requirements
  182. files: ^requirements/(crypto\.txt|static/crypto\.in)$
  183. args:
  184. - -v
  185. - --py-version=3.5
  186. - --platform=darwin
  187. - --out-prefix=darwin
  188. - id: pip-tools-compile
  189. alias: compile-windows-crypto-py3.5-requirements
  190. name: Windows Py3.5 Crypto Requirements
  191. files: ^requirements/(crypto\.txt|static/crypto\.in)$
  192. args:
  193. - -v
  194. - --py-version=3.5
  195. - --platform=windows
  196. - --out-prefix=windows
  197. - id: pip-tools-compile
  198. alias: compile-lint-py3.5-requirements
  199. name: Lint Py3.5 Requirements
  200. files: ^requirements/static/lint\.in$
  201. args:
  202. - -v
  203. - --py-version=3.5
  204. - --platform=linux
  205. - id: pip-tools-compile
  206. alias: compile-linux-py3.6-zmq-requirements
  207. name: Linux Py3.6 ZeroMQ Requirements
  208. files: ^requirements/((base|zeromq|pytest)\.txt|static/linux\.in)$
  209. exclude: ^requirements/static/(centos-6|amzn-2018\.03|lint|cloud|docs|darwin|windows)\.in$
  210. args:
  211. - -v
  212. - --py-version=3.6
  213. - --platform=linux
  214. - --include=requirements/base.txt
  215. - --include=requirements/zeromq.txt
  216. - --include=requirements/pytest.txt
  217. - id: pip-tools-compile
  218. alias: compile-darwin-py3.6-zmq-requirements
  219. name: Darwin Py3.6 ZeroMQ Requirements
  220. files: ^(pkg/osx/(req|req_ext|req_pyobjc)\.txt|requirements/((base|zeromq|pytest)\.txt|static/darwin\.in))$
  221. args:
  222. - -v
  223. - --py-version=3.6
  224. - --platform=darwin
  225. - --include=pkg/osx/req.txt
  226. - --include=pkg/osx/req_ext.txt
  227. - --include=pkg/osx/req_pyobjc.txt
  228. - --include=requirements/base.txt
  229. - --include=requirements/zeromq.txt
  230. - --include=requirements/pytest.txt
  231. - --passthrough-line-from-input=^pyobjc(.*)$
  232. - id: pip-tools-compile
  233. alias: compile-windows-py3.6-zmq-requirements
  234. name: Windows Py3.6 ZeroMQ Requirements
  235. files: ^(pkg/windows/(req|req_win)\.txt|requirements/((base|zeromq|pytest)\.txt|static/windows\.in))$
  236. args:
  237. - -v
  238. - --py-version=3.6
  239. - --platform=windows
  240. - --include=pkg/windows/req.txt
  241. - --include=pkg/windows/req_win.txt
  242. - --include=requirements/base.txt
  243. - --include=requirements/zeromq.txt
  244. - --include=requirements/pytest.txt
  245. - id: pip-tools-compile
  246. alias: compile-cloud-py3.6-requirements
  247. name: Cloud Py3.6 Requirements
  248. files: ^requirements/(static/cloud\.in)$
  249. args:
  250. - -v
  251. - --py-version=3.6
  252. - id: pip-tools-compile
  253. alias: compile-doc-requirements
  254. name: Docs Py3.6 Requirements
  255. files: ^requirements/((base|zeromq|pytest)\.txt|static/docs\.in)$
  256. args:
  257. - -v
  258. - --py-version=3.6
  259. - --platform=linux
  260. - id: pip-tools-compile
  261. alias: compile-linux-crypto-py3.6-requirements
  262. name: Linux Py3.6 Crypto Requirements
  263. files: ^requirements/(crypto\.txt|static/crypto\.in)$
  264. args:
  265. - -v
  266. - --py-version=3.6
  267. - --platform=linux
  268. - --out-prefix=linux
  269. - id: pip-tools-compile
  270. alias: compile-darwin-crypto-py3.6-requirements
  271. name: Darwin Py3.6 Crypto Requirements
  272. files: ^requirements/(crypto\.txt|static/crypto\.in)$
  273. args:
  274. - -v
  275. - --py-version=3.6
  276. - --platform=darwin
  277. - --out-prefix=darwin
  278. - id: pip-tools-compile
  279. alias: compile-windows-crypto-py3.6-requirements
  280. name: Windows Py3.6 Crypto Requirements
  281. files: ^requirements/(crypto\.txt|static/crypto\.in)$
  282. args:
  283. - -v
  284. - --py-version=3.6
  285. - --platform=windows
  286. - --out-prefix=windows
  287. - id: pip-tools-compile
  288. alias: compile-lint-py3.6-requirements
  289. name: Lint Py3.6 Requirements
  290. files: ^requirements/static/lint\.in$
  291. args:
  292. - -v
  293. - --py-version=3.6
  294. - --platform=linux
  295. - id: pip-tools-compile
  296. alias: compile-linux-py3.7-zmq-requirements
  297. name: Linux Py3.7 ZeroMQ Requirements
  298. files: ^requirements/((base|zeromq|pytest)\.txt|static/linux\.in)$
  299. exclude: ^requirements/static/(centos-6|amzn-2018\.03|lint|cloud|docs|darwin|windows)\.in$
  300. args:
  301. - -v
  302. - --py-version=3.7
  303. - --platform=linux
  304. - --include=requirements/base.txt
  305. - --include=requirements/zeromq.txt
  306. - --include=requirements/pytest.txt
  307. - id: pip-tools-compile
  308. alias: compile-darwin-py3.7-zmq-requirements
  309. name: Darwin Py3.7 ZeroMQ Requirements
  310. files: ^(pkg/osx/(req|req_ext|req_pyobjc)\.txt|requirements/((base|zeromq|pytest)\.txt|static/darwin\.in))$
  311. args:
  312. - -v
  313. - --py-version=3.7
  314. - --platform=darwin
  315. - --include=pkg/osx/req.txt
  316. - --include=pkg/osx/req_ext.txt
  317. - --include=pkg/osx/req_pyobjc.txt
  318. - --include=requirements/base.txt
  319. - --include=requirements/zeromq.txt
  320. - --include=requirements/pytest.txt
  321. - --passthrough-line-from-input=^pyobjc(.*)$
  322. - id: pip-tools-compile
  323. alias: compile-windows-py3.7-zmq-requirements
  324. name: Windows Py3.7 ZeroMQ Requirements
  325. files: ^(pkg/windows/(req|req_win)\.txt|requirements/((base|zeromq|pytest)\.txt|static/windows\.in))$
  326. args:
  327. - -v
  328. - --py-version=3.7
  329. - --platform=windows
  330. - --include=pkg/windows/req.txt
  331. - --include=pkg/windows/req_win.txt
  332. - --include=requirements/base.txt
  333. - --include=requirements/zeromq.txt
  334. - --include=requirements/pytest.txt
  335. - id: pip-tools-compile
  336. alias: compile-cloud-py3.7-requirements
  337. name: Cloud Py3.7 Requirements
  338. files: ^requirements/(static/cloud\.in)$
  339. args:
  340. - -v
  341. - --py-version=3.7
  342. - id: pip-tools-compile
  343. alias: compile-doc-requirements
  344. name: Docs Py3.7 Requirements
  345. files: ^requirements/((base|zeromq|pytest)\.txt|static/docs\.in)$
  346. args:
  347. - -v
  348. - --py-version=3.7
  349. - --platform=linux
  350. - id: pip-tools-compile
  351. alias: compile-linux-crypto-py3.7-requirements
  352. name: Linux Py3.7 Crypto Requirements
  353. files: ^requirements/(crypto\.txt|static/crypto\.in)$
  354. args:
  355. - -v
  356. - --py-version=3.7
  357. - --platform=linux
  358. - --out-prefix=linux
  359. - id: pip-tools-compile
  360. alias: compile-darwin-crypto-py3.7-requirements
  361. name: Darwin Py3.7 Crypto Requirements
  362. files: ^requirements/(crypto\.txt|static/crypto\.in)$
  363. args:
  364. - -v
  365. - --py-version=3.7
  366. - --platform=darwin
  367. - --out-prefix=darwin
  368. - id: pip-tools-compile
  369. alias: compile-windows-crypto-py3.7-requirements
  370. name: Windows Py3.7 Crypto Requirements
  371. files: ^requirements/(crypto\.txt|static/crypto\.in)$
  372. args:
  373. - -v
  374. - --py-version=3.7
  375. - --platform=windows
  376. - --out-prefix=windows
  377. - id: pip-tools-compile
  378. alias: compile-lint-py3.7-requirements
  379. name: Lint Py3.7 Requirements
  380. files: ^requirements/static/lint\.in$
  381. args:
  382. - -v
  383. - --py-version=3.7
  384. - --platform=linux
  385. - repo: https://github.com/saltstack/salt-nox-pre-commit
  386. rev: master
  387. hooks:
  388. - id: nox-py2
  389. alias: lint-salt
  390. name: Lint Salt
  391. files: ^((setup|noxfile)|salt/.*)\.py$
  392. args:
  393. - -e
  394. - lint-salt-pre-commit
  395. - --
  396. - repo: https://github.com/saltstack/salt-nox-pre-commit
  397. rev: master
  398. hooks:
  399. - id: nox-py2
  400. alias: lint-tests
  401. name: Lint Tests
  402. files: ^tests/.*\.py$
  403. args:
  404. - -e
  405. - lint-tests-pre-commit
  406. - --