You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add AGENTS.md, a Makefile and lint checks in CI - #280
AGENTS.md sets out how to evolve the examples: keep them minimal, keep comments to a minimum, keep the five languages and the tutorials in sync, and run make check before a pull request.
The Makefile wraps the toolchain-native checks plus Ruff (ruff, tsc --noEmit, gofmt and go vet, rustfmt and clippy -D warnings, ruby -wc), rebuilds the compiled examples before the smoke tests so they never run stale binaries, and adds per-language targets. CI now runs make lint and make test.
The Rust examples did not pass rustfmt or clippy on main, so this also formats them and collapses one nested if.
How Has This Been Tested?
Locally
Breaking Changes
N/a
Types of changes
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to change)
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Parallel checks can race npm installation and compilation, while Windows smoke tests can run stale Go binaries because rebuilds omit the executable suffix.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The Makefile exits before printing captured Ruby syntax errors, leaving CI failures without the diagnostic needed to identify the problem.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Print captured Ruby syntax diagnostics before exiting
Makefile:98
When ruby -wc reports a syntax error, set -e exits at this assignment before echo runs. Since stderr is captured, the Ruby diagnostic is discarded and CI shows only Make's failure status, without the offending line or syntax error. Print the captured output on the failure path before exiting.
The reason will be displayed to describe this comment to others. Learn more.
AGENTS.md, the Makefile and the CI change all look good, and I'd like to merge this. It needs a rebase first: #279 merged just now and removed the payload block in mcp-client-rust/src/main.rs that this PR reformats, so the branch conflicts with main on that file. After the rebase the if payload.is_empty() && let Some(...) hunk can be dropped, since that code no longer exists.
For what it's worth, I ran cargo fmt --check, cargo clippy --all-targets -- -D warnings, ruff check, ruff format --check, gofmt -l, go vet and ruby -wc on main with #278 and #279 merged. The only failures are the pre-existing rustfmt differences this PR already fixes (block_type, base_url, the println! in main, and the serde import order in the weather server), so once rebased make lint should be green.
One optional nit from Copilot's last pass: in lint-ruby, out=$$(ruby -wc $$f 2>&1) under set -e exits before the echo, so a syntax error would fail CI without printing Ruby's diagnostic. Something like out=$$(ruby -wc $$f 2>&1) || { echo "$$out"; exit 1; } keeps the message.
AGENTS.md sets out how to evolve the examples: keep them minimal,
keep comments to a minimum, keep the five languages and the tutorials
in sync, and run `make check` before a pull request. CLAUDE.md imports
it so Claude Code reads the same guidance.
The Makefile wraps the toolchain-native checks plus Ruff (ruff, tsc
--noEmit, gofmt and go vet, rustfmt and clippy -D warnings, ruby -wc),
rebuilds the compiled examples before the smoke tests so they never run
stale binaries, and adds per-language targets. CI now runs `make lint`
and `make test`.
The Rust examples did not pass rustfmt or clippy on main, so this also
formats them and collapses one nested `if`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NkL34oWhufSSqj9FbPx5dr
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the rebase. The conflicting hunk is gone, the lint-ruby target now prints Ruby's diagnostic on a syntax error, and the new make lint and make test steps pass in CI on top of #278 and #279. Merging.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
AGENTS.md sets out how to evolve the examples: keep them minimal, keep comments to a minimum, keep the five languages and the tutorials in sync, and run
make checkbefore a pull request.The Makefile wraps the toolchain-native checks plus Ruff (ruff, tsc --noEmit, gofmt and go vet, rustfmt and clippy -D warnings, ruby -wc), rebuilds the compiled examples before the smoke tests so they never run stale binaries, and adds per-language targets. CI now runs
make lintandmake test.The Rust examples did not pass rustfmt or clippy on main, so this also formats them and collapses one nested
if.How Has This Been Tested?
Locally
Breaking Changes
N/a
Types of changes
Checklist
Additional context
Assisted by Claude Code