Skip to content

chore: order alphabetical error codes and constants in reference#569

Open
zimeg wants to merge 4 commits into
mainfrom
sort-slackerror-alphabetical
Open

chore: order alphabetical error codes and constants in reference#569
zimeg wants to merge 4 commits into
mainfrom
sort-slackerror-alphabetical

Conversation

@zimeg
Copy link
Copy Markdown
Member

@zimeg zimeg commented Jun 2, 2026

Changelog

N/A — no change to behavior but docs of #553 might keep new order 👁️‍🗨️ 📚

Summary

This pull request sorts the internal/slackerror/errors.go file alphabetically and ensures docgen produces deterministic output.

  • Constants block sorted by ErrXxx identifier name
  • ErrorCodeMap entries sorted by map key
  • docgen now explicitly sorts errors before rendering the template

Preview

$ slack docgen docs/reference

Testing

  • Confirm the removed diff of this PR has matching additions 🔬

Notes

The Go spec states (ref):

"The iteration order over maps is not specified and is not guaranteed to be the same from one iteration to the next."

Without explicit sorting, docgen output depends on undefined map iteration order, which can vary across Go versions and builds.

Requirements

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg added the semver:patch Use on pull requests to describe the release version increment label Jun 2, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.70%. Comparing base (76e4649) to head (1a9fe50).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #569      +/-   ##
==========================================
+ Coverage   71.68%   71.70%   +0.01%     
==========================================
  Files         226      226              
  Lines       19144    19150       +6     
==========================================
+ Hits        13723    13731       +8     
+ Misses       4216     4214       -2     
  Partials     1205     1205              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread internal/slackerror/errors.go
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg changed the title chore: sort slackerror constants and ErrorCodeMap alphabetically docs: order alphabetical error codes and constants in reference Jun 2, 2026
@zimeg zimeg self-assigned this Jun 2, 2026
@zimeg zimeg added the docs M-T: Documentation work only label Jun 2, 2026
zimeg and others added 2 commits June 2, 2026 14:04
The ErrorCodeMap is a Go map, so iteration order was random — the
generated errors.md output was non-deterministic. Sort entries by
their Code field before rendering the template.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg changed the title docs: order alphabetical error codes and constants in reference chore: order alphabetical error codes and constants in reference Jun 2, 2026
@zimeg zimeg added this to the Next Release milestone Jun 2, 2026
@zimeg zimeg marked this pull request as ready for review June 2, 2026 23:47
@zimeg zimeg requested a review from a team as a code owner June 2, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs M-T: Documentation work only semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant