Skip to content

Commit

Permalink
Switch to Megalinter (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
nopeitsnothing authored Jul 9, 2024
1 parent f311712 commit 9411342
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
61 changes: 61 additions & 0 deletions .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# MegaLinter GitHub Action configuration file
# More info at https://megalinter.io
name: '✏️ MegaLinter'

Check warning on line 3 in .github/workflows/mega-linter.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

3:1 [document-start] missing document start "---"

permissions:
contents: read

on:

Check warning on line 8 in .github/workflows/mega-linter.yml

View workflow job for this annotation

GitHub Actions / MegaLinter

8:1 [truthy] truthy value should be one of [false, true]
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

# Comment env block if you do not want to apply fixes
env:
# Apply linter fixes configuration
APPLY_FIXES: all

# Decide which event triggers application of fixes in a commit or a PR
APPLY_FIXES_EVENT: pull_request, push

# If APPLY_FIXES is used, defines if the fixes are directly committed (commit)
# or posted in a PR (pull_request)
APPLY_FIXES_MODE: commit

jobs:
megalinter:
name: MegaLinter
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

# MegaLinter
- name: Run MegaLinter
id: ml
uses: oxsecurity/megalinter/flavors/[email protected]
env:
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISABLE: COPYPASTE,SPELL,HTML
DISABLE_LINTERS: JSON_JSONLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER
DISABLE_ERRORS_LINTERS: CSS_STYLELINT,MARKDOWN_MARKDOWN_LINK_CHECK,YAML_YAMLLINT,DOCKERFILE_HADOLINT,REPOSITORY_TRIVY,REPOSITORY_CHECKOV,REPOSITORY_GITLEAKS
MARKDOWN_MARKDOWNLINT_FILTER_REGEX_EXCLUDE: '(export/|briar\.md)'

# Upload MegaLinter artifacts
- name: Archive MegaLinter reports
uses: actions/upload-artifact@v4
if: always() # Ensure artifacts are always uploaded
with:
name: MegaLinter reports
path: |
megalinter-reports
mega-linter.log
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ vendor/
Gemfile*

# Artifact from PDF tests
*.log
*.log
megalinter-reports/

0 comments on commit 9411342

Please sign in to comment.