chore: reformat and enforce formatting #321
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
# This workflow performs static analysis checks. | |
name: Library format check | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
format_projects: | |
# Don't run the nightly build on forks | |
if: github.event_name != 'schedule' || github.repository_owner == 'aws' | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
DOTNET_NOLOGO: 1 | |
steps: | |
- name: Support longpaths | |
run: | | |
git config --global core.longpaths true | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Dafny | |
uses: dafny-lang/[email protected] | |
with: | |
dafny-version: ${{ '4.2.0' }} | |
- name: Check format of Dafny code | |
run: | | |
# This works because `node` is installed by default on GHA runners | |
CORES=$(node -e 'console.log(os.cpus().length)') | |
make format_dafny-check | |
- name: Check format of Dotnet code | |
run: | | |
# This works because `node` is installed by default on GHA runners | |
CORES=$(node -e 'console.log(os.cpus().length)') | |
make format_net-check | |
- name: Check format of Java code et al | |
run: | | |
# This works because `node` is installed by default on GHA runners | |
CORES=$(node -e 'console.log(os.cpus().length)') | |
make setup_prettier | |
make format_java_misc-check |