feat: add structured error codes (PLB-XXXX) with documentation links#93
Open
stephrobert wants to merge 1 commit intogetplumber:mainfrom
Open
feat: add structured error codes (PLB-XXXX) with documentation links#93stephrobert wants to merge 1 commit intogetplumber:mainfrom
stephrobert wants to merge 1 commit intogetplumber:mainfrom
Conversation
- Add control/codes.go with 14 error codes (PLB-0101 to PLB-0501) - Add Code and DocURL fields to all issue structs - Display [PLB-XXXX] prefix and docs link in CLI output - Add Codes column to summary table with docs footer - Include error codes and doc links in MR comments Closes getplumber#92
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Add structured error codes (
PLB-XXXX) to every issue detected by Plumber, with direct links to dedicated documentation pages.Changes
New file
control/codes.go— Central error code registry with 14 codes (PLB-0101toPLB-0501),ErrorCodetype,ErrorCodeInfostruct, and lookup/listing functionsModified files
control/types.go— AddedCode ErrorCodeandDocURL stringfields to issue structscmd/analyze.go— Display[PLB-XXXX]prefix on each issue line +↳ docs:link + Codes column in summary tablecontrol/mrcomment.go— Include error codes and doc links in MR commentsError Codes
PLB-0101PLB-0102PLB-0103PLB-0201PLB-0202PLB-0301PLB-0302PLB-0303PLB-0401PLB-0402PLB-0403PLB-0404PLB-0501CLI Output Example
Summary table now includes a Codes column with links to documentation.
Documentation
Companion PR for doc pages: getplumber/getplumber.io#77
Closes #92