Skip to content

[Tests] Deduplicate error prefix in examples#28

Merged
mrz1836 merged 1 commit into
masterfrom
feat/run-linter-and-tests-to-validate
Oct 9, 2025
Merged

[Tests] Deduplicate error prefix in examples#28
mrz1836 merged 1 commit into
masterfrom
feat/run-linter-and-tests-to-validate

Conversation

@mrz1836
Copy link
Copy Markdown
Collaborator

@mrz1836 mrz1836 commented Oct 9, 2025

What Changed

  • Introduced a shared errorPrefix constant for the example tests to remove the repeated string literal.
  • Updated each example's error logging to use the shared constant for consistency.

Why It Was Necessary

  • Resolves the lint warning that flagged the repeated "error:" literal across the example suite.

Testing Performed

  • go test ./...
  • golangci-lint run (fails: unknown linters arangolint, embeddedstructfieldcheck, wsl_v5 in the current toolchain)

Impact / Risk

  • Breaking Changes: None.
  • Regression Risk: Low; only constant reuse in examples.
  • Performance: No impact.
  • Developer Experience: Reduces future lint noise.

https://chatgpt.com/codex/tasks/task_e_68e81be1e1d48321a0fbbf3325040218

Copilot AI review requested due to automatic review settings October 9, 2025 20:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR deduplicates a repeated string literal "error:" across example test functions by introducing a shared constant. The change resolves a lint warning about repeated string literals and improves maintainability.

  • Introduced a shared errorPrefix constant containing "error:"
  • Updated all example functions to use the constant instead of the string literal

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions github-actions Bot added the size/S Small change (11–50 lines) label Oct 9, 2025
@github-actions github-actions Bot added bug-P3 Lowest rated bug, affects nearly none or low-impact feature Any new significant addition labels Oct 9, 2025
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Oct 9, 2025

@mrz1836 mrz1836 removed the feature Any new significant addition label Oct 9, 2025
@mrz1836 mrz1836 merged commit b9742bd into master Oct 9, 2025
38 checks passed
@github-actions github-actions Bot deleted the feat/run-linter-and-tests-to-validate branch October 9, 2025 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-P3 Lowest rated bug, affects nearly none or low-impact codex size/S Small change (11–50 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants