Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@ on:
workflow_dispatch:

pull_request:
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled
branches:
- develop
- master

jobs:
cpp-linter:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: cpp-linter/cpp-linter-action@v2
Expand All @@ -23,10 +32,16 @@ jobs:
files-changed-only: true
tidy-checks: '-*'
version: '15' # clang-format version
format-review: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'cpp-format-suggest') }}
passive-reviews: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'cpp-format-suggest') }}
file-annotations: true
step-summary: true
extensions: 'cpp,h'

- name: Failure Check
if: steps.linter.outputs.checks-failed > 0
run: echo "Some files failed the formatting check! See job summary and file annotations for more info" && exit 1
run: |
echo "Some files failed the formatting check."
echo "See job summary and file annotations for details."
echo "To request inline suggestions on the next PR update, add the 'cpp-format-suggest' label to this pull request."
exit 1
2 changes: 1 addition & 1 deletion src/plot.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#include "openmc/plot.h"

#include <algorithm>
Expand Down Expand Up @@ -2539,7 +2539,7 @@
return OPENMC_E_INVALID_ARGUMENT;
}

plt->diffuse_fraction() = diffuse_fraction;
plt->diffuse_fraction() = diffuse_fraction;
Comment thread
pshriwise marked this conversation as resolved.
Comment thread
pshriwise marked this conversation as resolved.
Comment thread
pshriwise marked this conversation as resolved.
Comment thread
pshriwise marked this conversation as resolved.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-format suggestion

Suggested change
plt->diffuse_fraction() = diffuse_fraction;
plt->diffuse_fraction() = diffuse_fraction;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-format suggestion

Suggested change
plt->diffuse_fraction() = diffuse_fraction;
plt->diffuse_fraction() = diffuse_fraction;

return 0;
}

Expand Down
Loading