Skip to content

chore: move protobuf/protoc_echo_plugin/CppFormatter to infra/syntax #1477

chore: move protobuf/protoc_echo_plugin/CppFormatter to infra/syntax

chore: move protobuf/protoc_echo_plugin/CppFormatter to infra/syntax #1477

---
name: Linting & Formatting
on:
pull_request:
types: [opened, synchronize, reopened]
merge_group:
permissions:
contents: read
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
formatter:
name: Formatting
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
persist-credentials: false
- uses: DoozyX/clang-format-lint-action@a83a8fb7d371f66da7dd1c4f33a193023899494b # v0.16
with:
clangFormatVersion: 14
inplace: true
extensions: "cpp,hpp"
exclude: "./external"
- uses: reviewdog/action-suggester@a60fde3c0152426868be6dc5bcb7e1c89bba2358 # v1.7.4
with:
tool_name: clang-format
filter_mode: diff_context
linter:
name: Linting
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
security-events: write
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 0
persist-credentials: false
- uses: oxsecurity/megalinter@fda6ac3a38be0e969820709ac16e442464e5a035 # v7.3.0
env:
APPLY_FIXES: all
VALIDATE_ALL_CODEBASE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: github/codeql-action/upload-sarif@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2.21.5
if: ${{ success() }} || ${{ failure() }}
with:
sarif_file: megalinter-reports/megalinter-report.sarif
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: ${{ success() }} || ${{ failure() }}
with:
name: linter
path: |
megalinter-reports
- uses: reviewdog/action-suggester@a60fde3c0152426868be6dc5bcb7e1c89bba2358 # v1.7.4
with:
tool_name: MegaLinter
filter_mode: diff_context