Skip to content

Commit

Permalink
ci(megalinter): add root level config
Browse files Browse the repository at this point in the history
  • Loading branch information
Kashugoyal committed Nov 18, 2024
1 parent 761388a commit 813954d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ jobs:
id: megalinter
env:
VALIDATE_ALL_CODEBASE: true
EXCLUDED_DIRECTORIES: test/fixtures/

DISABLE_LINTERS: REPOSITORY_KICS, GO_GOLANGCI_LINT, GO_REVIVE
SPELL_CSPELL_DISABLE_ERRORS: true
COPYPASTE_JSCPD_DISABLE_ERRORS: true

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Upload MegaLinter artifacts
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ bin/
vendor/
.vscode
.idea
megalinter-reports/
22 changes: 22 additions & 0 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Configuration file for MegaLinter
# See all available variables at https://megalinter.io/configuration/ and in linters documentation

EXCLUDED_DIRECTORIES:
- test/fixtures/

DISABLE_LINTERS:
- REPOSITORY_KICS
- GO_GOLANGCI_LINT
- GO_REVIVE
- REPOSITORY_GRYPE

DISABLE_ERRORS_LINTERS:
- SPELL_CSPELL
- COPYPASTE_JSCPD

FILTER_REGEX_EXCLUDE: '(test/)'
JSON_JSONLINT_FILTER_REGEX_EXCLUDE: '(test/)'
YAML_YAMLLINT_FILTER_REGEX_EXCLUDE: '(test/)'
YAML_PRETTIER_FILTER_REGEX_EXCLUDE: '(test/)'
SHOW_ELAPSED_TIME: true
REPORT_OUTPUT_FOLDER: megalinter-reports
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=alpine:3.20@sha256:0a4eaa0eecf5f8c050e5bba433f58c052be7587ee8af3e8b3910ef9ab5fbe9f5
ARG BASE_IMAGE_TAG=3.20@sha256:0a4eaa0eecf5f8c050e5bba433f58c052be7587ee8af3e8b3910ef9ab5fbe9f5

FROM golang:1.22@sha256:f43c6f049f04cbbaeb28f0aad3eea15274a7d0a7899a617d0037aec48d7ab010 as go-builder
ARG VALIDATOR_VERSION=unknown
Expand All @@ -13,7 +13,8 @@ RUN CGO_ENABLED=0 \
-o validator \
cmd/validator/validator.go

FROM $BASE_IMAGE as base
FROM alpine:$BASE_IMAGE_TAG
USER user
COPY --from=go-builder /build/validator /
HEALTHCHECK NONE
ENTRYPOINT [ "/validator" ]

0 comments on commit 813954d

Please sign in to comment.