-
Notifications
You must be signed in to change notification settings - Fork 0
/
simple.yaml
88 lines (87 loc) · 2.29 KB
/
simple.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
# Must be lower than or equal the version of the polylint tool to be valid
version: v0.0.1
# Includes can be either filesystem local or http(s)
includes:
- path: examples/basic.yaml
hash: sha256:90e8cd4f24da96045625317d4f2cb5940f897bd13af1a54d36256c18c57ed44d
# - path: https://example.com/other/config.yml
# sha: 123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
rules:
- id: no-print
description: "Don't use print()"
recommendation: "Use logging instead."
severity: low
link: https://examples.com/wiki/no-print
include_paths: '\.py$'
exclude_paths: null
fn:
type: builtin
scope: line
name: contains
args:
- print(
- id: no-logging
description: "Don't use logging"
recommendation: "Use print instead."
severity: low
link: https://examples.com/wiki/no-logging
include_paths: '\.py$'
exclude_paths: null
fn:
type: builtin
scope: line
name: regexp
args:
- '^logging'
- id: no-print-js
description: "Don't use print()"
recommendation: "Use logging instead."
severity: low
link: https://examples.com/wiki/no-print-js
include_paths: '\.py$'
exclude_paths: null
fn:
type: js
scope: line
name: fn
body: |
const fn = (_p, _i, line) => line.includes('print')
- id: no-print-js-file-level
description: "Don't use print()"
recommendation: "Use logging instead."
severity: low
link: https://examples.com/wiki/no-print-js-file-level
include_paths: '\.py$'
exclude_paths: null
fn:
type: js
scope: file
name: fn
body: const fn = (_p, _i, file) => file.includes('print')
- id: no-print-js-path-level
description: "Don't use print()"
recommendation: "Use logging instead."
severity: low
link: https://examples.com/wiki/no-print-js-path-level
include_paths: '\.py$'
exclude_paths: null
fn:
type: js
scope: path
name: fn
body: const fn = (path, _i, _l) => path.includes('print')
- id: no-python-in-path
description: Don't use python here
recommendation: None
severity: low
link: https://examples.com/wiki/no-print-js-path-level
include_paths: '\.py$'
exclude_paths: null
fn:
type: wasm
scope: path
name: path_validator
body: ./plugins/test-plugin.wasm
metadata:
sha256: f2880b9d1a2f70f7eddca65c7aa539483c800653669e5a070b8cb3b11a199eca