This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Megalinter setup * test megalinter config * lint * test new config * hot fixes to trigger ci only on pr * hot fixes to trigger ci only on pr * check another config * rename file * hot fix * hot fix * hot fix * hot fix * hot fix * hot fix * change eslitnrc * change eslitnrc * change eslitnrc * change authorized linter * change authorized linter * change authorized linter * change authorized linter * change authorized linter * change authorized linter * change authorized linter * changes required for linter * changes required for linter * changes required for linter * changes required for linter * changes required for linter * changes required for linter * Update .github/workflows/mega-linter.yml Co-authored-by: Guillaume <[email protected]> Co-authored-by: Célian Riboulet <[email protected]>
- Loading branch information
1 parent
12346cf
commit caef74a
Showing
12 changed files
with
139 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
name: Lint | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
branches-ignore: | ||
- PRODUCTION | ||
# more infos on possible types here : https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#pull_request | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
APPLY_FIXES: all # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool) | ||
APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all) | ||
APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request) | ||
|
||
jobs: | ||
megalinter: | ||
permissions: write-all | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Git Checkout | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
# MegaLinter | ||
- name: MegaLinter | ||
id: ml | ||
# You can override MegaLinter flavor used to have faster performances | ||
# More info at https://oxsecurity.github.io/megalinter/flavors/ | ||
uses: oxsecurity/megalinter/flavors/[email protected] | ||
env: | ||
# All available variables are described in documentation | ||
# https://oxsecurity.github.io/megalinter/configuration/ | ||
# Apply linter fixes configuration | ||
VALIDATE_ALL_CODEBASE: false # to change | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Upload MegaLinter artifacts create dir | ||
- name: Archive production artifacts create dir | ||
if: ${{ failure() }} | ||
run: mkdir -p megalinter-reports/linters_logs/ | ||
# Upload MegaLinter artifacts | ||
- name: Archive production artifacts | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: MegaLinter reports | ||
path: megalinter-reports/linters_logs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,3 +65,5 @@ buck-out/ | |
/vendor/bundle/ | ||
|
||
.env | ||
|
||
megalinter-reports/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"threshold": 20, | ||
"reporters": ["html", "markdown"], | ||
"ignore": [ | ||
"**/node_modules/**", | ||
"**/.git/**", | ||
"**/.rbenv/**", | ||
"**/.venv/**", | ||
"**/*cache*/**", | ||
"**/.github/**", | ||
"**/.idea/**", | ||
"**/report/**", | ||
"**/*.svg", | ||
"**/*.yml", | ||
"**/*.yaml", | ||
"**/*.md", | ||
"**/android/**", | ||
"**/ios/**" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Configuration file for MegaLinter | ||
# See all available variables at https://megalinter.io/configuration/ and in linters documentation | ||
|
||
APPLY_FIXES: all | ||
ENABLE: | ||
- COPYPASTE | ||
- REPOSITORY | ||
|
||
DISABLE_LINTERS: | ||
- REPOSITORY_GITLEAKS | ||
|
||
PRINT_ALL_FILES: false | ||
FILTER_REGEX_EXCLUDE: '(\.automation/test|\.automation/generated|\.github/workflows|docs/javascripts|docs/overrides|docs/json-schemas|flavors|clj-kondo|TEMPLATES)' | ||
JSON_JSONLINT_FILTER_REGEX_EXCLUDE: '(\.vscode/)' | ||
YAML_YAMLLINT_FILTER_REGEX_EXCLUDE: '(templates/\.mega-linter\.yml)' | ||
YAML_PRETTIER_FILTER_REGEX_EXCLUDE: '(templates/\.mega-linter\.yml|mkdocs\.yml)' | ||
YAML_V8R_FILTER_REGEX_EXCLUDE: '(descriptors|templates/\.mega-linter\.yml|\.codecov\.yml)' | ||
BASH_FILTER_REGEX_EXCLUDE: "(lib)" | ||
MARKDOWN_FILTER_REGEX_EXCLUDE: '(license\.md)' | ||
MARKDOWN_MARKDOWN_LINK_CHECK_DISABLE_ERRORS: true | ||
REPOSITORY_TRIVY_DISABLE_ERRORS: true | ||
SPELL_MISSPELL_FILTER_REGEX_EXCLUDE: '(\.automation/generated|docs/descriptors|used-by-stats)' | ||
DOCKERFILE_HADOLINT_ARGUMENTS: "--ignore DL3003 --ignore DL3007 --ignore DL3013 --ignore DL3016 --ignore DL3018 --ignore DL3028 --ignore DL3059 --ignore DL4001 --ignore DL4006 --ignore SC2015 --ignore SC2016 --ignore SC2039 --ignore SC2086 --ignore SC1091 --ignore SC3046" | ||
REPOSITORY_TRIVY_ARGUMENTS: | ||
- "--skip-dirs" | ||
- ".automation/test" | ||
SHOW_ELAPSED_TIME: true | ||
EMAIL_REPORTER: false | ||
FILEIO_REPORTER: true | ||
JSON_REPORTER: true | ||
GITHUB_STATUS_REPORTER: false | ||
PLUGINS: | ||
- https://raw.githubusercontent.com/oxsecurity/megalinter/main/.automation/test/mega-linter-plugin-test/test.megalinter-descriptor.yml | ||
PRE_COMMANDS: | ||
- command: npm install | ||
cwd: "workspace" | ||
- command: npm run lint:fix | ||
cwd: "workspace" | ||
POST_COMMANDS: | ||
- command: echo "This is MegaLinter POST_COMMAND on own MegaLinter ! :)" | ||
cwd: "workspace" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters