mirror of
https://github.com/tarampampam/error-pages.git
synced 2024-08-30 18:22:40 +00:00
Configure Renovate (#116)
Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Paramtamtam <7326800+tarampampam@users.noreply.github.com>
This commit is contained in:
parent
bde35e2c79
commit
48bd1a44e6
@ -10,7 +10,7 @@ indent_style = space
|
|||||||
indent_size = 4
|
indent_size = 4
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
[*.{yml, yaml, sh, conf}]
|
[*.{yml, yaml, sh, conf, json}]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
[{Makefile, go.mod, *.go}]
|
[{Makefile, go.mod, *.go}]
|
||||||
|
7
.github/renovate.json
vendored
Normal file
7
.github/renovate.json
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"github>tarampampam/.github//renovate/default",
|
||||||
|
":rebaseStalePrs"
|
||||||
|
]
|
||||||
|
}
|
17
.github/workflows/tests.yml
vendored
17
.github/workflows/tests.yml
vendored
@ -25,14 +25,7 @@ jobs: # Docs: <https://git.io/JvxXE>
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/setup-go@v3
|
- uses: golangci/golangci-lint-action@v3 # Action page: <https://github.com/golangci/golangci-lint-action>
|
||||||
with: {go-version: 1.17} # On v1.18 I had an error "panic: load embedded ruleguard rules: rules/rules.go:13: can't load fmt"
|
|
||||||
|
|
||||||
- name: Run linter
|
|
||||||
uses: golangci/golangci-lint-action@v3 # Action page: <https://github.com/golangci/golangci-lint-action>
|
|
||||||
with:
|
|
||||||
version: v1.44 # without patch version
|
|
||||||
only-new-issues: false # show only new issues if it's a pull request
|
|
||||||
|
|
||||||
validate-config-file:
|
validate-config-file:
|
||||||
name: Validate config file
|
name: Validate config file
|
||||||
@ -242,13 +235,7 @@ jobs: # Docs: <https://git.io/JvxXE>
|
|||||||
- working-directory: .artifact
|
- working-directory: .artifact
|
||||||
run: docker load < docker-image.tar
|
run: docker load < docker-image.tar
|
||||||
|
|
||||||
- name: Download hurl
|
- uses: gacts/install-hurl@v1
|
||||||
env:
|
|
||||||
VERSION: 1.5.0
|
|
||||||
run: curl -SL -o hurl.deb https://github.com/Orange-OpenSource/hurl/releases/download/${VERSION}/hurl_${VERSION}_amd64.deb
|
|
||||||
|
|
||||||
- name: Install hurl
|
|
||||||
run: sudo dpkg -i hurl.deb
|
|
||||||
|
|
||||||
- name: Run container with the app
|
- name: Run container with the app
|
||||||
run: docker run --rm -d -p "8080:8080/tcp" -e "SHOW_DETAILS=true" -e "PROXY_HTTP_HEADERS=X-Foo,Bar,Baz_blah" --name app app:ci
|
run: docker run --rm -d -p "8080:8080/tcp" -e "SHOW_DETAILS=true" -e "PROXY_HTTP_HEADERS=X-Foo,Bar,Baz_blah" --name app app:ci
|
||||||
|
@ -43,8 +43,6 @@ linters: # All available linters list: <https://golangci-lint.run/usage/linters/
|
|||||||
enable:
|
enable:
|
||||||
- asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
|
- asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
|
||||||
- bidichk # Checks for dangerous unicode character sequences
|
- bidichk # Checks for dangerous unicode character sequences
|
||||||
- bodyclose # Checks whether HTTP response body is closed successfully
|
|
||||||
- contextcheck # check the function whether use a non-inherited context
|
|
||||||
- deadcode # Finds unused code
|
- deadcode # Finds unused code
|
||||||
- depguard # Go linter that checks if package imports are in a list of acceptable packages
|
- depguard # Go linter that checks if package imports are in a list of acceptable packages
|
||||||
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
|
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
|
||||||
@ -73,17 +71,12 @@ linters: # All available linters list: <https://golangci-lint.run/usage/linters/
|
|||||||
- nakedret # Finds naked returns in functions greater than a specified function length
|
- nakedret # Finds naked returns in functions greater than a specified function length
|
||||||
- nestif # Reports deeply nested if statements
|
- nestif # Reports deeply nested if statements
|
||||||
- nlreturn # checks for a new line before return and branch statements to increase code clarity
|
- nlreturn # checks for a new line before return and branch statements to increase code clarity
|
||||||
- noctx # finds sending http request without context.Context
|
|
||||||
- nolintlint # Reports ill-formed or insufficient nolint directives
|
- nolintlint # Reports ill-formed or insufficient nolint directives
|
||||||
- prealloc # Finds slice declarations that could potentially be preallocated
|
- prealloc # Finds slice declarations that could potentially be preallocated
|
||||||
- rowserrcheck # Checks whether Err of rows is checked successfully
|
|
||||||
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
|
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
|
||||||
- structcheck # Finds unused struct fields
|
|
||||||
- stylecheck # Stylecheck is a replacement for golint
|
- stylecheck # Stylecheck is a replacement for golint
|
||||||
- tparallel # detects inappropriate usage of t.Parallel() method in your Go test codes
|
|
||||||
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
|
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
|
||||||
- unconvert # Remove unnecessary type conversions
|
- unconvert # Remove unnecessary type conversions
|
||||||
- unparam # Reports unused function parameters
|
|
||||||
- unused # Checks Go code for unused constants, variables, functions and types
|
- unused # Checks Go code for unused constants, variables, functions and types
|
||||||
- varcheck # Finds unused global variables and constants
|
- varcheck # Finds unused global variables and constants
|
||||||
- whitespace # Tool for detection of leading and trailing whitespace
|
- whitespace # Tool for detection of leading and trailing whitespace
|
||||||
@ -97,4 +90,3 @@ issues:
|
|||||||
- funlen
|
- funlen
|
||||||
- scopelint
|
- scopelint
|
||||||
- gocognit
|
- gocognit
|
||||||
- noctx
|
|
||||||
|
@ -23,22 +23,15 @@ services:
|
|||||||
<<: *app-service
|
<<: *app-service
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080/tcp" # Open <http://127.0.0.1:8080>
|
- "8080:8080/tcp" # Open <http://127.0.0.1:8080>
|
||||||
command:
|
command: sh -c "go build -o /tmp/app ./cmd/error-pages && /tmp/app serve"
|
||||||
- go
|
|
||||||
- run
|
|
||||||
- ./cmd/error-pages
|
|
||||||
- serve
|
|
||||||
- --verbose
|
|
||||||
- --port=8080
|
|
||||||
- --show-details
|
|
||||||
- --proxy-headers=X-Foo,Bar,Baz_blah
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD', 'wget', '--spider', '-q', 'http://127.0.0.1:8080/healthz']
|
test: ['CMD', '/tmp/app', 'healthcheck', '--log-json']
|
||||||
interval: 5s
|
interval: 4s
|
||||||
timeout: 2s
|
timeout: 1s
|
||||||
|
start_period: 5s
|
||||||
|
|
||||||
golint:
|
golint:
|
||||||
image: golangci/golangci-lint:v1.44-alpine # Image page: <https://hub.docker.com/r/golangci/golangci-lint>
|
image: golangci/golangci-lint:v1.46-alpine # Image page: <https://hub.docker.com/r/golangci/golangci-lint>
|
||||||
environment:
|
environment:
|
||||||
GOLANGCI_LINT_CACHE: /tmp/golint # <https://github.com/golangci/golangci-lint/blob/v1.42.0/internal/cache/default.go#L68>
|
GOLANGCI_LINT_CACHE: /tmp/golint # <https://github.com/golangci/golangci-lint/blob/v1.42.0/internal/cache/default.go#L68>
|
||||||
volumes:
|
volumes:
|
||||||
@ -53,5 +46,4 @@ services:
|
|||||||
- .:/src:ro
|
- .:/src:ro
|
||||||
working_dir: /src
|
working_dir: /src
|
||||||
depends_on:
|
depends_on:
|
||||||
web:
|
web: {condition: service_healthy}
|
||||||
condition: service_healthy
|
|
||||||
|
@ -206,7 +206,7 @@ func (tr *TemplateRenderer) Close() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (tr *TemplateRenderer) mixHashes(a, b Hash) (result cacheEntryHash) {
|
func (tr *TemplateRenderer) mixHashes(a, b Hash) (result cacheEntryHash) {
|
||||||
for i := 0; i < len(a); i++ {
|
for i := 0; i < len(a); i++ { //nolint:gosimple
|
||||||
result[i] = a[i]
|
result[i] = a[i]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user