Conversation
📝 WalkthroughWalkthroughThis pull request contains two minor formatting updates. The first modifies 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Claude Code ReviewHead SHA: 90a988b Files changed:
FindingsMalformed GitHub Actions expression — job name broken
name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, matrix.intel && 'intel' || 'GNU')', matrix.os, matrix.mpi, matrix.debug, matrix.intel) }}The ternary-style expression The expression will either error at evaluation time or produce a mangled job name, making matrix job identification unreliable in the Actions UI. The intended fix is to move the conditional outside the format string as the fourth positional argument: format('Github ({0}, {1}, {2}, {3})', matrix.os, matrix.mpi, matrix.debug, matrix.intel && 'intel' || 'GNU') |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1380 +/- ##
=======================================
Coverage 64.76% 64.76%
=======================================
Files 71 71
Lines 18713 18713
Branches 1549 1549
=======================================
Hits 12119 12119
Misses 5638 5638
Partials 956 956 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@sbryngelson This incredibly important and revolutionary PR is ready for review. |
|
hard to say... https://github.com/MFlowCode/MFC/actions/runs/24893271532 You need to make a trivial change to a source file to trigger test runs so we can see the re-labeling. |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: f756d33e-921c-4711-8d7b-d5f81a474536
📒 Files selected for processing (2)
.github/workflows/test.ymlsrc/common/m_model.fpp
|
|
||
| github: | ||
| name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, intel={3})', matrix.os, matrix.mpi, matrix.debug, matrix.intel) }} | ||
| name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, matrix.intel && 'intel' || 'GNU')', matrix.os, matrix.mpi, matrix.debug, matrix.intel) }} |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify malformed vs corrected expression pattern on the changed line.
set -euo pipefail
echo "Current Line 152:"
sed -n '152p' .github/workflows/test.yml
echo
echo "Check for malformed token placement (conditional inside quoted format string):"
rg -n "format\('Github \(\{0\}, \{1\}, \{2\}, matrix\.intel && 'intel' \|\| 'GNU'\)'" .github/workflows/test.yml || true
echo
echo "Expected after fix:"
echo "format('Github ({0}, {1}, {2}, {3})', ..., matrix.intel && 'intel' || 'GNU')"Repository: MFlowCode/MFC
Length of output: 675
🌐 Web query:
GitHub Actions format() function syntax expressions
💡 Result:
GitHub Actions expression format syntax 1) Where you use it - In workflow files, format is a built-in function you call inside a GitHub Actions expression, usually within ${{ ... }}. - Expressions are written as ${{ }}. 2) Syntax (parameter order) - format( string, replaceValue0, replaceValue1, ..., replaceValueN ) - The string contains placeholders in {N} form (0-based), where N is an integer. - You must provide at least one replaceValue and the string. - Curly braces must be escaped by doubling them (e.g., {{ and }}) when you want literal braces in the output. 3) Examples - Basic substitution: ${{ format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat') }} -> Hello Mona the Octocat - Escaping braces: ${{ format('{{Hello {0} {1} {2}!}}', 'Mona', 'the', 'Octocat') }} -> {Hello Mona the Octocat!} 4) Common usage pattern - You can pass contexts/variables as arguments to format; they’ll be substituted into the {N} placeholders. Example pattern: ${{ format('https://{0}.app.com', steps.env_target_prod.outputs.TARGET || steps.env_target_stage.outputs.TARGET) }} 5) Notes / pitfalls - Make sure you’re not treating the format call as plain text—wrap it in ${{ ... }} so GitHub evaluates it. - Placeholders must be exactly {0}, {1}, etc.; escaping with {{ / }} is required for literal braces.
Citations:
- 1: https://docs.github.com/actions/reference/workflows-and-actions/expressions
- 2: https://docs.github.com/en/actions/reference/workflows-and-actions/expressions
- 3: https://docs.github.com/en/actions/concepts/workflows-and-actions/expressions
- 4: Format function does not work with expression actions/toolkit#521
Fix malformed GitHub Actions expression in job name.
Line 152 embeds the conditional matrix.intel && 'intel' || 'GNU' as literal text inside the format string instead of evaluating it as an argument. This will cause the job name to display the literal conditional text rather than the intended value.
Proposed fix
- name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, matrix.intel && 'intel' || 'GNU')', matrix.os, matrix.mpi, matrix.debug, matrix.intel) }}
+ name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, {3})', matrix.os, matrix.mpi, matrix.debug, matrix.intel && 'intel' || 'GNU') }}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, matrix.intel && 'intel' || 'GNU')', matrix.os, matrix.mpi, matrix.debug, matrix.intel) }} | |
| name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, {3})', matrix.os, matrix.mpi, matrix.debug, matrix.intel && 'intel' || 'GNU') }} |
🧰 Tools
🪛 actionlint (1.7.12)
[error] 152-152: unexpected token "IDENT" while parsing arguments of function call. expecting ",", ")"
(expression)
|
Invalid workflow file: .github/workflows/test.yml#L1 |
Co-authored-by: Daniel Vickers <danieljvickers@login09.frontier.olcf.ornl.gov> Co-authored-by: Daniel Vickers <danieljvickers@frontier00007.frontier.olcf.ornl.gov> Co-authored-by: Daniel Vickers <danieljvickers@login12.frontier.olcf.ornl.gov> Co-authored-by: wilfonba <bwilfong3@gatech.edu> Co-authored-by: Daniel Vickers <danieljvickers@frontier01665.frontier.olcf.ornl.gov>
Co-authored-by: Dimitrios Adam <dimitriosadam@Dimitrioss-MacBook-Air.local> Co-authored-by: Dimitrios Adam <dimitriosadam@ipsec-10-2-192-204.vpn.gatech.edu> Co-authored-by: Spencer Bryngelson <sbryngelson@gmail.com> Co-authored-by: Spencer Bryngelson <shb@gatech.edu> Co-authored-by: sidkamat <siddharthbkamat@gmail.com>
9cc5b33 to
2b0aa63
Compare
|
@sbryngelson I confirmed that the code worked, and printed either |
|
What happened to your comment that vanished? I'm confused |

Description
I think it would be better to label tests by compiler name instead of if they are or are not intel compilers. That is all.
Type of change