summaryrefslogtreecommitdiffstats
path: root/.ameba.yml
blob: c7629dcb0796907f56685bce40fde7fdc1172286 (plain)
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
#
# Lint
#

# Exclude assigns for ECR files
Lint/UselessAssign:
  Excluded:
  - src/invidious.cr
  - src/invidious/helpers/errors.cr
  - src/invidious/routes/**/*.cr

# Ignore false negative (if !db.query_one?...)
Lint/UnreachableCode:
  Excluded:
  - src/invidious/database/base.cr

# Ignore shadowed variable `key` (it works for now, and that's
# a sensitive part of the code)
Lint/ShadowingOuterLocalVar:
  Excluded:
  - src/invidious/helpers/tokens.cr

Lint/NotNil:
  Enabled: false


#
# Style
#

Style/RedundantBegin:
  Enabled: false

Style/RedundantReturn:
  Enabled: false

Style/ParenthesesAroundCondition:
  Enabled: false

# This requires a rewrite of most data structs (and their usage) in Invidious.
Style/QueryBoolMethods:
  Enabled: false


#
# Metrics
#

# Ignore function complexity (number of if/else & case/when branches)
# For some functions that can hardly be simplified for now
Metrics/CyclomaticComplexity:
  Enabled: false