Add a linting workflow #5
Workflow file for this run
This file contains hidden or 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
--- | |
name: "On PR Lint" | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
check_dependabot: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Check Changes | |
id: changed-env | |
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5 | |
with: | |
files: | | |
.github/dependabot.yml | |
- if: | | |
steps.changed-env.outputs.any_modified == 'true' | |
run: | | |
npx -y @bugron/validate-dependabot-yaml@latest | |
lint_cupcake: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Lint Code Base | |
uses: oxsecurity/megalinter/flavors/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# We'll turn them on again later, but turn a number off for now. | |
# Priority will be given to security, github actions, JS and MD. Then CSS, then secondary other files. | |
DISABLE_LINTERS: "COPYPASTE_JSCPD,DOCKERFILE_HADOLINT,REPOSITORY_CHECKOV,REPOSITORY_TRIVY,REPOSITORY_KICS, C_CPPLINT, CPP_CPPLINT, CSS_STYLELINT,HTML_HTMLHINT,JSON_JSONLINT,JSON_PRETTIER,JAVASCRIPT_STANDARD,MARKDOWN_MARKDOWN_TABLE_FORMATTER,MARKDOWN_MARKDOWNLINT,YAML_PRETTIER,YAML_YAMLLINT,PYTHON_ISORT,PYTHON_RUFF,SPELL_CSPELL" |