Skip to content

refactor(diag): allow Diag_List to be moved #7428

refactor(diag): allow Diag_List to be moved

refactor(diag): allow Diag_List to be moved #7428

Workflow file for this run

# Copyright (C) 2020 Matthew Glazar
# See end of file for extended copyright information.
name: check format
on:
push:
pull_request:
types: [opened, synchronize]
jobs:
check_format:
name: check format
runs-on: ubuntu-latest
container: ghcr.io/quick-lint/quick-lint-js-github-clang-format:v1
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
# HACK(strager): Work around the following error from 'git ls-files' used
# by ./tools/format:
#
# fatal: unsafe repository ('/__w/quick-lint-js/quick-lint-js' is owned by someone else)
#
# See also: https://github.com/actions/checkout/issues/760
- name: work around permission issue
run: git config --global --add safe.directory /__w/quick-lint-js/quick-lint-js
- run: clang-format --version
- run: ./tools/format
- run: |
if ! git diff --exit-code; then
printf '::error ::%s\n' 'Sources are not formatted with clang-format. Run clang-format or apply the above patch, and amend your commit: https://github.com/quick-lint/quick-lint-js/blob/master/docs/CONTRIBUTING.md#clang-format'
exit 1
fi
# quick-lint-js finds bugs in JavaScript programs.
# Copyright (C) 2020 Matthew Glazar
#
# This file is part of quick-lint-js.
#
# quick-lint-js is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# quick-lint-js is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with quick-lint-js. If not, see <https://www.gnu.org/licenses/>.