Repository navigation
ci: use recommended-replacement format in cspell flagWords - #5
Conversation
Match the flagWords format already used in linuxfoundation/lfx-v1-sync-helper's .cspell.json, where each entry includes a suggested replacement (e.g. "master: controller, primary, main, leader, parent") instead of just the flagged word alone. This gives contributors an actionable suggestion instead of just a bare rejection. Also picks up the grandfathered entry that was missing here. Assisted-by: github-copilot:claude-sonnet-5 Signed-off-by: Eric Searcy <eric@linuxfoundation.org>
There was a problem hiding this comment.
Pull request overview
Standardizes cspell flagged-word entries with recommended replacements and adds the missing grandfathered term.
Changes:
- Adds replacement guidance to all flagged words.
- Adds
grandfatheredwith alternatives.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Replace the inline flagWords list with an empty placeholder pulled in at MegaLinter run time from linuxfoundation/lfx-public-workflows' cspell/flagwords.snippet.json (see that repo's cspell/README.md), instead of duplicating and drifting the list locally. Assisted-by: github-copilot:claude-sonnet-5 Signed-off-by: Eric Searcy <eric@linuxfoundation.org>
|
Updated to also adopt the new shared cspell flagWords mechanism (linuxfoundation/lfx-public-workflows#15) instead of keeping the list inline here — see that PR's |
…FXV2-3338) Address review feedback on the shared cspell flagWords mechanism: the sed substitution mutated the tracked .cspell.json in place. In CI this is harmless (ephemeral checkout), but a developer running MegaLinter locally via 'make megalinter' bind-mounts the real working directory, so the substitution would persist to disk and could get accidentally committed, and a second local run would silently no-op (placeholder already consumed) instead of re-fetching the latest shared list. Back up .cspell.json before the substitution and restore it via a global POST_COMMANDS entry once the run finishes, matching the fix landed in linuxfoundation/lfx-public-workflows#15. Assisted-by: github-copilot:claude-sonnet-5 Signed-off-by: Eric Searcy <eric@linuxfoundation.org>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
.cspell.json:8
- This reformatting is rejected by the repository's configured JSON Prettier check; the current MegaLinter run reports
.cspell.jsonas having code-style issues. Keep this short array on one line so the changed configuration passes the formatter.
"dictionaries": [
"companies",
"filetypes",
"fullstack",
"softwareTerms"
],
…rors (LFXV2-3338) Address review feedback on the shared cspell flagWords mechanism: - MegaLinter v9.6.0 supports per-linter <LINTER>_POST_COMMANDS. Use SPELL_CSPELL_POST_COMMANDS instead of the global POST_COMMANDS, so the restore runs immediately after cspell finishes rather than waiting for every other linter to complete, and can't fire in a run where cspell itself didn't execute. - MegaLinter's PRE_COMMANDS default to continue_if_failed: true, so a failed curl fetch or sed substitution would silently leave the placeholder-only flagWords: [] in place and let the run continue. Set continue_if_failed: false explicitly, and use curl -sSf (instead of -sf) so a fetch failure's error detail is preserved in logs. Matches the fix landed in linuxfoundation/lfx-public-workflows#15. Assisted-by: github-copilot:claude-sonnet-5 Signed-off-by: Eric Searcy <eric@linuxfoundation.org>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
.mega-linter.yml:25
- This URL currently returns 404 because
linuxfoundation/lfx-public-workflowsdoes not containcspell/flagwords.snippet.jsononmain; the file only exists in the still-open upstream PR #15. Sincecurl -fandcontinue_if_failed: falseare used, every MegaLinter run will fail this pre-command before cspell runs. Merge the upstream dependency before this PR (or reference an already-published, preferably pinned, artifact).
https://raw.githubusercontent.com/linuxfoundation/lfx-public-workflows/main/cspell/flagwords.snippet.json
The runtime injection via SPELL_CSPELL_PRE_COMMANDS fetched a flagwords snippet from a URL that does not exist on lfx-public-workflows's main branch, causing the MegaLinter cspell pre-command to fail on every run. Commit the recommended-replacement flagWords entries directly in .cspell.json instead, matching the lfx-v1-sync-helper reference configuration. Also add the MegaLinter env: hygiene comment, and megalinter-reports/ gitignore entry per the LFXV2-3338 standardization. LFXV2-3338 Assisted-by: github-copilot:claude-sonnet-5 Signed-off-by: Eric Searcy <eric@linuxfoundation.org>
Signed-off-by: Eric Searcy <eric@linuxfoundation.org>
Assisted-by: github-copilot:claude-sonnet-5 Signed-off-by: Eric Searcy <eric@linuxfoundation.org>
Assisted-by: github-copilot:claude-sonnet-5 Signed-off-by: Eric Searcy <eric@linuxfoundation.org>
|
@emsearcy Nice work iterating on this — the final shape is much cleaner than the runtime-injection approach. This PR standardizes All CI checks pass, including MegaLinter. Prior Copilot feedback on the empty placeholder, the 404 snippet URL, and the README Issue count
Revision tracking (prior rounds)
Bot reconciliation
✅ Approved with minor comments |
dealako
left a comment
There was a problem hiding this comment.
Review
Focused, low-risk CI/docs hygiene PR. Security and privacy dimensions are clean for the changed surface (config, workflow comment, gitignore, README, test string).
Findings
⚪ Nit — .cspell.json short-array formatting
Incidental multi-line reformat of dictionaries and ignoreRegExpList diverges from the pre-change repo style and lfx-v1-sync-helper's single-line short arrays. MegaLinter/Prettier passes on the current branch, so this is optional consistency only.
Prior feedback status
All earlier Copilot blocking concerns (empty flagWords placeholder, 404 snippet URL, README/test object_type drift) are resolved in later commits.
✅ Approved with minor comments
| { | ||
| "language": "en", | ||
| "dictionaries": ["companies", "filetypes", "fullstack", "softwareTerms"], | ||
| "dictionaries": [ |
There was a problem hiding this comment.
[nit] Short JSON arrays expanded to multi-line
Issue: dictionaries and ignoreRegExpList were reformatted from single-line arrays to multi-line without functional need.
Proof: .cspell.json:3-8 and .cspell.json:77-79 vs main's single-line equivalents.
Why it matters: Incidental churn; optional consistency with lfx-v1-sync-helper single-line short arrays.
Fix: Restore single-line formatting for those short arrays if you want to minimize diff noise; not required — MegaLinter passes as-is.
There was a problem hiding this comment.
that's prettier linting
Summary
Per LFXV2-3338, standardize this repo's
.cspell.jsonflagWordsformat to include recommended replacements (as used inlinuxfoundation/lfx-v1-sync-helper), rather than just the bare flagged word, e.g.:master→master: controller, primary, main, leader, parentwhitelist→whitelist: allowlistAlso adds the
grandfatheredentry that was missing here.Also fixes a pre-existing typo in the README's
lfx apiexample (object_type=projects→object_type=project, matching the actualmy-grantsAPI), with the correspondingapi_test.goexample updated to match.Jira
LFXV2-3338
🤖 Generated with GitHub Copilot (via OpenCode)