Skip to content

Commit 3e52622

Browse files
committed
Merge branch 'main' into lunny/fix_issue_comment_num
2 parents 87ab9ea + 1007ce7 commit 3e52622

File tree

607 files changed

+15112
-11433
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

607 files changed

+15112
-11433
lines changed

.eslintrc.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ reportUnusedDisableDirectives: true
44
ignorePatterns:
55
- /web_src/js/vendor
66
- /web_src/fomantic
7+
- /public/assets/js
78

89
parserOptions:
910
sourceType: module
@@ -126,19 +127,21 @@ rules:
126127
"@stylistic/js/computed-property-spacing": [2, never]
127128
"@stylistic/js/dot-location": [2, property]
128129
"@stylistic/js/eol-last": [2]
129-
"@stylistic/js/function-call-spacing": [2, never]
130130
"@stylistic/js/function-call-argument-newline": [0]
131+
"@stylistic/js/function-call-spacing": [2, never]
131132
"@stylistic/js/function-paren-newline": [0]
132133
"@stylistic/js/generator-star-spacing": [0]
133134
"@stylistic/js/implicit-arrow-linebreak": [0]
134135
"@stylistic/js/indent": [2, 2, {ignoreComments: true, SwitchCase: 1}]
135136
"@stylistic/js/key-spacing": [2]
136137
"@stylistic/js/keyword-spacing": [2]
138+
"@stylistic/js/line-comment-position": [0]
137139
"@stylistic/js/linebreak-style": [2, unix]
138140
"@stylistic/js/lines-around-comment": [0]
139141
"@stylistic/js/lines-between-class-members": [0]
140142
"@stylistic/js/max-len": [0]
141143
"@stylistic/js/max-statements-per-line": [0]
144+
"@stylistic/js/multiline-comment-style": [0]
142145
"@stylistic/js/multiline-ternary": [0]
143146
"@stylistic/js/new-parens": [2]
144147
"@stylistic/js/newline-per-chained-call": [0]
@@ -310,7 +313,7 @@ rules:
310313
jquery/no-merge: [2]
311314
jquery/no-param: [2]
312315
jquery/no-parent: [0]
313-
jquery/no-parents: [0]
316+
jquery/no-parents: [2]
314317
jquery/no-parse-html: [2]
315318
jquery/no-prop: [2]
316319
jquery/no-proxy: [2]
@@ -319,8 +322,8 @@ rules:
319322
jquery/no-show: [2]
320323
jquery/no-size: [2]
321324
jquery/no-sizzle: [2]
322-
jquery/no-slide: [0]
323-
jquery/no-submit: [0]
325+
jquery/no-slide: [2]
326+
jquery/no-submit: [2]
324327
jquery/no-text: [0]
325328
jquery/no-toggle: [2]
326329
jquery/no-trigger: [0]
@@ -458,7 +461,7 @@ rules:
458461
no-jquery/no-other-utils: [2]
459462
no-jquery/no-param: [2]
460463
no-jquery/no-parent: [0]
461-
no-jquery/no-parents: [0]
464+
no-jquery/no-parents: [2]
462465
no-jquery/no-parse-html-literal: [0]
463466
no-jquery/no-parse-html: [2]
464467
no-jquery/no-parse-json: [2]
@@ -704,6 +707,7 @@ rules:
704707
unicorn/better-regex: [0]
705708
unicorn/catch-error-name: [0]
706709
unicorn/consistent-destructuring: [2]
710+
unicorn/consistent-empty-array-spread: [2]
707711
unicorn/consistent-function-scoping: [2]
708712
unicorn/custom-error-definition: [0]
709713
unicorn/empty-brace-spaces: [2]
@@ -730,9 +734,11 @@ rules:
730734
unicorn/no-for-loop: [0]
731735
unicorn/no-hex-escape: [0]
732736
unicorn/no-instanceof-array: [0]
737+
unicorn/no-invalid-fetch-options: [2]
733738
unicorn/no-invalid-remove-event-listener: [2]
734739
unicorn/no-keyword-prefix: [0]
735740
unicorn/no-lonely-if: [2]
741+
unicorn/no-magic-array-flat-depth: [0]
736742
unicorn/no-negated-condition: [0]
737743
unicorn/no-nested-ternary: [0]
738744
unicorn/no-new-array: [0]
@@ -798,10 +804,12 @@ rules:
798804
unicorn/prefer-set-has: [0]
799805
unicorn/prefer-set-size: [2]
800806
unicorn/prefer-spread: [0]
807+
unicorn/prefer-string-raw: [0]
801808
unicorn/prefer-string-replace-all: [0]
802809
unicorn/prefer-string-slice: [0]
803810
unicorn/prefer-string-starts-ends-with: [2]
804811
unicorn/prefer-string-trim-start-end: [2]
812+
unicorn/prefer-structured-clone: [2]
805813
unicorn/prefer-switch: [0]
806814
unicorn/prefer-ternary: [0]
807815
unicorn/prefer-text-content: [2]

.github/workflows/disk-clean.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/pull-compliance.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
- uses: actions/setup-node@v4
3939
with:
4040
node-version: 20
41+
cache: npm
42+
cache-dependency-path: package-lock.json
4143
- run: pip install poetry
4244
- run: make deps-py
4345
- run: make deps-frontend
@@ -65,6 +67,8 @@ jobs:
6567
- uses: actions/setup-node@v4
6668
with:
6769
node-version: 20
70+
cache: npm
71+
cache-dependency-path: package-lock.json
6872
- run: make deps-frontend
6973
- run: make lint-swagger
7074

@@ -134,6 +138,8 @@ jobs:
134138
- uses: actions/setup-node@v4
135139
with:
136140
node-version: 20
141+
cache: npm
142+
cache-dependency-path: package-lock.json
137143
- run: make deps-frontend
138144
- run: make lint-frontend
139145
- run: make checks-frontend
@@ -181,6 +187,8 @@ jobs:
181187
- uses: actions/setup-node@v4
182188
with:
183189
node-version: 20
190+
cache: npm
191+
cache-dependency-path: package-lock.json
184192
- run: make deps-frontend
185193
- run: make lint-md
186194
- run: make docs

.github/workflows/pull-e2e-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
- uses: actions/setup-node@v4
2525
with:
2626
node-version: 20
27+
cache: npm
28+
cache-dependency-path: package-lock.json
2729
- run: make deps-frontend frontend deps-backend
2830
- run: npx playwright install --with-deps
2931
- run: make test-e2e-sqlite

.github/workflows/release-nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ concurrency:
99
cancel-in-progress: true
1010

1111
jobs:
12-
disk-clean:
13-
uses: ./.github/workflows/disk-clean.yml
1412
nightly-binary:
1513
runs-on: nscloud
1614
steps:
@@ -25,6 +23,8 @@ jobs:
2523
- uses: actions/setup-node@v4
2624
with:
2725
node-version: 20
26+
cache: npm
27+
cache-dependency-path: package-lock.json
2828
- run: make deps-frontend deps-backend
2929
# xgo build
3030
- run: make release

.github/workflows/release-tag-rc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
- uses: actions/setup-node@v4
2525
with:
2626
node-version: 20
27+
cache: npm
28+
cache-dependency-path: package-lock.json
2729
- run: make deps-frontend deps-backend
2830
# xgo build
2931
- run: make release

.github/workflows/release-tag-version.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
- uses: actions/setup-node@v4
2727
with:
2828
node-version: 20
29+
cache: npm
30+
cache-dependency-path: package-lock.json
2931
- run: make deps-frontend deps-backend
3032
# xgo build
3133
- run: make release

.golangci.yml

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
linters:
2+
enable-all: false
3+
disable-all: true
4+
fast: false
25
enable:
36
- bidichk
4-
# - deadcode # deprecated - https://github.com/golangci/golangci-lint/issues/1841
57
- depguard
68
- dupl
79
- errcheck
810
- forbidigo
911
- gocritic
10-
# - gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.
1112
- gofmt
1213
- gofumpt
1314
- gosimple
@@ -17,20 +18,20 @@ linters:
1718
- nolintlint
1819
- revive
1920
- staticcheck
20-
# - structcheck # deprecated - https://github.com/golangci/golangci-lint/issues/1841
2121
- stylecheck
2222
- typecheck
2323
- unconvert
2424
- unused
25-
# - varcheck # deprecated - https://github.com/golangci/golangci-lint/issues/1841
2625
- wastedassign
27-
enable-all: false
28-
disable-all: true
29-
fast: false
3026

3127
run:
3228
timeout: 10m
3329

30+
output:
31+
sort-results: true
32+
sort-order: [file]
33+
show-stats: true
34+
3435
linters-settings:
3536
stylecheck:
3637
checks: ["all", "-ST1005", "-ST1003"]
@@ -41,33 +42,39 @@ linters-settings:
4142
- ifElseChain
4243
- singleCaseSwitch # Every time this occurred in the code, there was no other way.
4344
revive:
44-
ignore-generated-header: false
45-
severity: warning
46-
confidence: 0.8
47-
errorCode: 1
48-
warningCode: 1
45+
severity: error
4946
rules:
47+
- name: atomic
48+
- name: bare-return
5049
- name: blank-imports
50+
- name: constant-logical-expr
5151
- name: context-as-argument
5252
- name: context-keys-type
5353
- name: dot-imports
54+
- name: duplicated-imports
55+
- name: empty-lines
56+
- name: error-naming
5457
- name: error-return
5558
- name: error-strings
56-
- name: error-naming
59+
- name: errorf
5760
- name: exported
61+
- name: identical-branches
5862
- name: if-return
5963
- name: increment-decrement
60-
- name: var-naming
61-
- name: var-declaration
64+
- name: indent-error-flow
65+
- name: modifies-value-receiver
6266
- name: package-comments
6367
- name: range
6468
- name: receiver-naming
69+
- name: redefines-builtin-id
70+
- name: string-of-int
71+
- name: superfluous-else
6572
- name: time-naming
73+
- name: unconditional-recursion
6674
- name: unexported-return
67-
- name: indent-error-flow
68-
- name: errorf
69-
- name: duplicated-imports
70-
- name: modifies-value-receiver
75+
- name: unreachable-code
76+
- name: var-declaration
77+
- name: var-naming
7178
gofumpt:
7279
extra-rules: true
7380
depguard:
@@ -93,8 +100,8 @@ issues:
93100
max-issues-per-linter: 0
94101
max-same-issues: 0
95102
exclude-dirs: [node_modules, public, web_src]
103+
exclude-case-sensitive: true
96104
exclude-rules:
97-
# Exclude some linters from running on tests files.
98105
- path: _test\.go
99106
linters:
100107
- gocyclo
@@ -112,19 +119,19 @@ issues:
112119
- path: cmd
113120
linters:
114121
- forbidigo
115-
- linters:
122+
- text: "webhook"
123+
linters:
116124
- dupl
117-
text: "webhook"
118-
- linters:
125+
- text: "`ID' should not be capitalized"
126+
linters:
119127
- gocritic
120-
text: "`ID' should not be capitalized"
121-
- linters:
128+
- text: "swagger"
129+
linters:
122130
- unused
123131
- deadcode
124-
text: "swagger"
125-
- linters:
132+
- text: "argument x is overwritten before first use"
133+
linters:
126134
- staticcheck
127-
text: "argument x is overwritten before first use"
128135
- text: "commentFormatting: put a space between `//` and comment text"
129136
linters:
130137
- gocritic

0 commit comments

Comments
 (0)