Skip to content

Commit dfc0dbd

Browse files
authored
feat: enforce Dafny formatting (#865)
* feat: enforce Dafny formatting
1 parent 56f1cd1 commit dfc0dbd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+4380
-4316
lines changed

.github/workflows/library_format.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow performs static analysis checks.
2+
name: Library format check
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
format_projects:
12+
# Don't run the nightly build on forks
13+
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
14+
strategy:
15+
matrix:
16+
library:
17+
[
18+
DynamoDbEncryption,
19+
]
20+
os: [ubuntu-latest]
21+
runs-on: ${{ matrix.os }}
22+
defaults:
23+
run:
24+
shell: bash
25+
env:
26+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
27+
DOTNET_NOLOGO: 1
28+
steps:
29+
- name: Support longpaths
30+
run: |
31+
git config --global core.longpaths true
32+
33+
- uses: actions/checkout@v4
34+
with:
35+
submodules: recursive
36+
37+
- name: Setup Dafny
38+
uses: dafny-lang/setup-dafny-action@v1.7.0
39+
with:
40+
dafny-version: ${{ '4.2.0' }}
41+
42+
- name: Check format of ${{ matrix.library }} Dafny code
43+
working-directory: ./${{ matrix.library }}
44+
run: |
45+
# This works because `node` is installed by default on GHA runners
46+
CORES=$(node -e 'console.log(os.cpus().length)')
47+
make format_dafny-check

0 commit comments

Comments
 (0)