Skip to content

Write KindName instead of kind_name on error values - #3655

Merged
BaseMax merged 1 commit into
mainfrom
fix/kind-name-pascal
Nov 18, 2026
Merged

BaseMax merged 1 commit into
mainfrom
fix/kind-name-pascal

Conversation

@BaseMax

@BaseMax BaseMax commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Tests and website examples still called the error method with its old snake_case spelling, which draws W175. They now use KindName. Free functions that only share the substring (docgen, semantic, toml, graphql, editor, gui_style test helpers) are untouched, as is the generated stdlib index.

Summary by CodeRabbit

  • Documentation
    • Updated error-handling examples across the guides to display error kinds consistently with the current API.
  • Tests
    • Updated error-reporting checks across the test suite to use the same API, while keeping existing scenarios and expected output unchanged.

@BaseMax
BaseMax requested a review from a team as a code owner November 18, 2026 19:05
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Tests and website examples now retrieve error kind names with KindName() instead of kind_name(). Other error details, messages, and test expectations remain unchanged.

Changes: Error-kind accessor updates

Layer / File(s) Summary
Update error-kind accessor calls
tests/en/{errors,exec,llvm,stdlib,translate}/*.salam, website/content/en/examples/*.salam, website/content/en/std-examples/*/*.salam
Tests and examples use KindName() instead of kind_name() or direct kind_name field access. Other printed details and behavior remain unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

  • SalamLang/Salam#2476: Adds website examples for Error methods, including kind_name; this change updates overlapping examples to use KindName().

Suggested reviewers: bdadmehr0

Merge Risk: Minimal · up to e622c

This change renames the error-kind accessor calls in tests and website examples to the canonical spelling. No production behavior changes, and no concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the primary change: error values now use the KindName method instead of kind_name. The raw summary and PR description both show the changeset is a rename of this call across tests …
Description check Passed The description states the purpose: tests and website examples used the snake_case kind_name spelling, which triggers warning W175, and they now use KindName. It also explains which similarly name…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the primary change: error values now use the KindName method instead of kind_name. The raw summary and PR description both show the changeset is a rename of this call across tests and website examples, so the title matches the main change.

Full details: Description check

Explanation

The description states the purpose: tests and website examples used the snake_case kind_name spelling, which triggers warning W175, and they now use KindName. It also explains which similarly named free functions and the generated stdlib index were left unchanged. It does not fill in the template's Related Issue, Proposed Changes list, How Was This Tested, or Checklist sections, so it is only partly complete against the template.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8b9c4eb5-27bb-4776-b58a-f8daf095f41e
Commits

Reviewing files that changed from the base of the PR and between 76b50de and e622c21.

Files selected for processing: 57

  • tests/en/errors/encoding_error_persian_field.salam
  • tests/en/exec/json_derive_exec.salam
  • tests/en/llvm/throw_str.salam
  • tests/en/stdlib/binary_demo.salam
  • tests/en/stdlib/binary_errors_demo.salam
  • tests/en/stdlib/conv_errors_demo.salam
  • tests/en/stdlib/csv_errors_demo.salam
  • tests/en/stdlib/data_csv_demo.salam
  • tests/en/stdlib/data_idx_demo.salam
  • tests/en/stdlib/encoding_demo.salam
  • tests/en/stdlib/encoding_errors_demo.salam
  • tests/en/stdlib/envfile_strict.salam
  • tests/en/stdlib/gguf_demo.salam
  • tests/en/stdlib/json_errors_demo.salam
  • tests/en/stdlib/jwt_errors_demo.salam
  • tests/en/stdlib/nn_ckpt_demo.salam
  • tests/en/stdlib/npy_demo.salam
  • tests/en/stdlib/protobuf_errors_demo.salam
  • tests/en/stdlib/regex_errors_demo.salam
  • tests/en/stdlib/tensor_io_demo.salam
  • tests/en/stdlib/time_duration_demo.salam
  • tests/en/stdlib/time_errors_demo.salam
  • tests/en/stdlib/time_parse_demo.salam
  • tests/en/stdlib/toml_errors_demo.salam
  • tests/en/stdlib/url_errors_demo.salam
  • tests/en/stdlib/xml_dom_api.salam
  • tests/en/stdlib/xml_errors_demo.salam
  • tests/en/translate/throws.salam
  • website/content/en/examples/encoding-guide-strict.salam
  • website/content/en/examples/encoding-json-guide-errors.salam
  • website/content/en/examples/encoding-msgpack-guide-errors.salam
  • website/content/en/examples/encoding-protobuf-decode-loop.salam
  • website/content/en/examples/encoding-serde-guide-errors.salam
  • website/content/en/examples/gguf-guide-errors.salam
  • website/content/en/examples/npy-errors.salam
  • website/content/en/std-examples/conv/conv-ParseInt.salam
  • website/content/en/std-examples/core/core-Error.New.salam
  • website/content/en/std-examples/core/core-Error.kind_name.salam
  • website/content/en/std-examples/core/core-Error.salam
  • website/content/en/std-examples/core/core-Error.wrap.salam
  • website/content/en/std-examples/core/core-ErrorKind.salam
  • website/content/en/std-examples/data/data-Batch.salam
  • website/content/en/std-examples/data/data-Table.salam
  • website/content/en/std-examples/encoding-binary/encoding-binary-ReadWrite.salam
  • website/content/en/std-examples/encoding-json/encoding-json-Marshal.salam
  • website/content/en/std-examples/encoding-json/encoding-json-Value.salam
  • website/content/en/std-examples/encoding-protobuf/encoding-protobuf-Parse.salam
  • website/content/en/std-examples/encoding-protobuf/encoding-protobuf-Wire.salam
  • website/content/en/std-examples/encoding-serde/encoding-serde-Transcode.salam
  • website/content/en/std-examples/encoding-toml/encoding-toml-Decode.salam
  • website/content/en/std-examples/encoding-url/encoding-url-Parse.salam
  • website/content/en/std-examples/encoding-value/encoding-value-Value.field.salam
  • website/content/en/std-examples/encoding-xml/encoding-xml-XPath.salam
  • website/content/en/std-examples/encoding/encoding-Base64.salam
  • website/content/en/std-examples/regex/regex-Compile.salam
  • website/content/en/std-examples/time/time-Duration.salam
  • website/content/en/std-examples/time/time-UTC.salam

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@BaseMax
BaseMax merged commit e215a10 into main Nov 18, 2026
13 of 14 checks passed
@BaseMax
BaseMax deleted the fix/kind-name-pascal branch November 18, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant