Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into sync-issue-pr-and-more
Browse files Browse the repository at this point in the history
  • Loading branch information
harryzcy committed Aug 22, 2022
2 parents 8874bf5 + 353a533 commit dd20d7d
Show file tree
Hide file tree
Showing 652 changed files with 16,243 additions and 8,468 deletions.
2 changes: 1 addition & 1 deletion .air.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ bin = "gitea"
include_ext = ["go", "tmpl"]
exclude_dir = ["modules/git/tests", "services/gitdiff/testdata", "modules/avatar/testdata"]
include_dir = ["cmd", "models", "modules", "options", "routers", "services", "templates"]
exclude_regex = ["_test.go$"]
exclude_regex = ["_test.go$", "_gen.go$"]
26 changes: 13 additions & 13 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ steps:
- make deps-frontend

- name: deps-backend
image: golang:1.18
image: golang:1.19
pull: always
commands:
- make deps-backend
Expand Down Expand Up @@ -88,7 +88,7 @@ steps:
depends_on: [deps-frontend]

- name: checks-backend
image: golang:1.18
image: golang:1.19
commands:
- make checks-backend
depends_on: [deps-backend]
Expand Down Expand Up @@ -122,7 +122,7 @@ steps:
path: /go

- name: build-backend-arm64
image: golang:1.18
image: golang:1.19
environment:
GO111MODULE: on
GOPROXY: https://goproxy.io
Expand All @@ -138,7 +138,7 @@ steps:
path: /go

- name: build-backend-windows
image: golang:1.18
image: golang:1.19
environment:
GO111MODULE: on
GOPROXY: https://goproxy.io
Expand All @@ -153,7 +153,7 @@ steps:
path: /go

- name: build-backend-386
image: golang:1.18
image: golang:1.19
environment:
GO111MODULE: on
GOPROXY: https://goproxy.io
Expand Down Expand Up @@ -243,7 +243,7 @@ steps:
- pull_request

- name: deps-backend
image: golang:1.18
image: golang:1.19
pull: always
commands:
- make deps-backend
Expand Down Expand Up @@ -360,7 +360,7 @@ steps:
path: /go

- name: generate-coverage
image: golang:1.18
image: golang:1.19
commands:
- make coverage
environment:
Expand Down Expand Up @@ -436,7 +436,7 @@ steps:
- pull_request

- name: deps-backend
image: golang:1.18
image: golang:1.19
pull: always
commands:
- make deps-backend
Expand Down Expand Up @@ -578,7 +578,7 @@ trigger:

steps:
- name: download
image: golang:1.18
image: golang:1.19
pull: always
commands:
- timeout -s ABRT 40m make generate-license generate-gitignore
Expand Down Expand Up @@ -640,7 +640,7 @@ steps:
- make deps-frontend

- name: deps-backend
image: golang:1.18
image: golang:1.19
pull: always
commands:
- make deps-backend
Expand All @@ -649,7 +649,7 @@ steps:
path: /go

- name: static
image: techknowlogick/xgo:go-1.18.x
image: techknowlogick/xgo:go-1.19.x
pull: always
commands:
# Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
Expand Down Expand Up @@ -760,7 +760,7 @@ steps:
- make deps-frontend

- name: deps-backend
image: golang:1.18
image: golang:1.19
pull: always
commands:
- make deps-backend
Expand All @@ -769,7 +769,7 @@ steps:
path: /go

- name: static
image: techknowlogick/xgo:go-1.18.x
image: techknowlogick/xgo:go-1.19.x
pull: always
commands:
# Upgrade to node 18 once https://github.com/techknowlogick/xgo/issues/163 is resolved
Expand Down
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,3 @@ indent_style = tab

[*.svg]
insert_final_newline = false

[*.md]
trim_trailing_whitespace = false
18 changes: 9 additions & 9 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ overrides:
env:
worker: true
rules:
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
- files: ["build/generate-images.js"]
rules:
import/no-unresolved: [0]
Expand Down Expand Up @@ -109,7 +109,7 @@ rules:
import/no-extraneous-dependencies: [2]
import/no-import-module-exports: [0]
import/no-internal-modules: [0]
import/no-mutable-exports: [2]
import/no-mutable-exports: [0]
import/no-named-as-default-member: [0]
import/no-named-as-default: [2]
import/no-named-default: [0]
Expand All @@ -121,7 +121,7 @@ rules:
import/no-restricted-paths: [0]
import/no-self-import: [2]
import/no-unassigned-import: [0]
import/no-unresolved: [2, {commonjs: true}]
import/no-unresolved: [2, {commonjs: true, ignore: ["\\?.+$"]}]
import/no-unused-modules: [2, {unusedExports: true}]
import/no-useless-path-segments: [2, {commonjs: true}]
import/no-webpack-loader-syntax: [2]
Expand Down Expand Up @@ -211,7 +211,7 @@ rules:
no-compare-neg-zero: [2]
no-cond-assign: [2, except-parens]
no-confusing-arrow: [0]
no-console: [1, {allow: [info, warn, error]}]
no-console: [1, {allow: [debug, info, warn, error]}]
no-const-assign: [2]
no-constant-binary-expression: [2]
no-constant-condition: [0]
Expand Down Expand Up @@ -287,7 +287,7 @@ rules:
no-redeclare: [2]
no-regex-spaces: [2]
no-restricted-exports: [0]
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, self, status, statusbar, stop, toolbar, top]
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, self, status, statusbar, stop, toolbar, top, __dirname, __filename]
no-restricted-imports: [0]
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement]
no-return-assign: [0]
Expand Down Expand Up @@ -321,7 +321,7 @@ rules:
no-unused-labels: [2]
no-unused-private-class-members: [2]
no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_, ignoreRestSiblings: false}]
no-use-before-define: [2, nofunc]
no-use-before-define: [2, {functions: false, classes: true, variables: true, allowNamedExports: true}]
no-useless-backreference: [0]
no-useless-call: [2]
no-useless-catch: [2]
Expand All @@ -347,7 +347,7 @@ rules:
padded-blocks: [2, never]
padding-line-between-statements: [0]
prefer-arrow-callback: [2, {allowNamedFunctions: true, allowUnboundThis: true}]
prefer-const: [2, {destructuring: all}]
prefer-const: [2, {destructuring: all, ignoreReadBeforeAssign: true}]
prefer-destructuring: [0]
prefer-exponentiation-operator: [2]
prefer-named-capture-group: [0]
Expand Down Expand Up @@ -449,7 +449,7 @@ rules:
unicorn/no-new-array: [0]
unicorn/no-new-buffer: [0]
unicorn/no-null: [0]
unicorn/no-object-as-default-parameter: [2]
unicorn/no-object-as-default-parameter: [0]
unicorn/no-process-exit: [0]
unicorn/no-reduce: [2]
unicorn/no-static-only-class: [2]
Expand All @@ -475,7 +475,7 @@ rules:
unicorn/prefer-array-index-of: [2]
unicorn/prefer-array-some: [2]
unicorn/prefer-at: [0]
unicorn/prefer-code-point: [2]
unicorn/prefer-code-point: [0]
unicorn/prefer-dataset: [2]
unicorn/prefer-date-now: [2]
unicorn/prefer-default-parameters: [0]
Expand Down
8 changes: 6 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ linters:
fast: false

run:
go: 1.18
go: 1.19
timeout: 10m
skip-dirs:
- node_modules
Expand Down Expand Up @@ -75,7 +75,7 @@ linters-settings:
- name: modifies-value-receiver
gofumpt:
extra-rules: true
lang-version: "1.18"
lang-version: "1.19"
depguard:
# TODO: use depguard to replace import checks in gitea-vet
list-type: denylist
Expand Down Expand Up @@ -171,3 +171,7 @@ issues:
- path: models/user/openid.go
linters:
- golint
- path: models/user/badge.go
linters:
- revive
text: "exported: type name will be used as user.UserBadge by other packages, and that stutters; consider calling this Badge"
18 changes: 18 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
commands-show-output: false
fenced-code-language: false
first-line-h1: false
header-increment: false
line-length: {code_blocks: false, tables: false, stern: true, line_length: -1}
no-alt-text: false
no-bare-urls: false
no-blanks-blockquote: false
no-duplicate-header: {allow_different_nesting: true}
no-emphasis-as-header: false
no-empty-links: false
no-hard-tabs: {code_blocks: false}
no-inline-html: false
no-space-in-code: false
no-space-in-emphasis: false
no-trailing-punctuation: false
no-trailing-spaces: {br_spaces: 0}
single-h1: false
Loading

0 comments on commit dd20d7d

Please sign in to comment.