Repository navigation
fix: single quote support #1362 - #1560
Conversation
📝 WalkthroughWalkthroughAdds a lazy-quote retry to CSV parsing, trims matching surrounding single/double quotes and normalizes inner escaped quotes, removes empty tokens, extends unit tests for quoting edge cases, bumps an azidentity dependency, and expands YAML function docs with guidance on quoting and bracket notation. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Caller as Caller
participant Split as SplitStringByDelimiter
participant CSV as csv.Reader
Note over Split: Initial parse attempt (LazyQuotes=false)
Caller->>Split: Split(input, delim)
Split->>CSV: read(lazy=false)
CSV-->>Split: parts or csv.ParseError
alt csv.ParseError contains ErrBareQuote
Note over Split: Retry with LazyQuotes=true
Split->>CSV: read(lazy=true)
CSV-->>Split: parts or error
else other error
Split-->>Caller: return error
end
Note over Split: Post-processing: trimMatchingQuotes + remove empty tokens
Split-->>Caller: return tokens
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
pkg/utils/string_utils.go (2)
33-41: Consider wrapping the returned error with context.The error from
read()is returned directly without wrapping. Per the coding guidelines, errors should be wrapped with context usingfmt.Errorf("context: %w", err)or wrapped with static errors fromerrors/errors.go.As per coding guidelines.
Consider applying this pattern:
parts, err := read(false) if err != nil { if parseErr, ok := err.(*csv.ParseError); ok && parseErr.Err == csv.ErrBareQuote { parts, err = read(true) } } if err != nil { - return nil, err + return nil, fmt.Errorf("failed to parse string by delimiter: %w", err) }
55-64: Consider adding a doc comment for the helper.The logic correctly strips matching single or double quotes from both ends. While doc comments are required only for exported functions per the guidelines, adding a brief comment here would improve maintainability.
+// trimMatchingQuotes removes matching single or double quotes from the start and end of a string. func trimMatchingQuotes(value string) string { if len(value) >= 2 {
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
pkg/utils/string_utils.go(1 hunks)pkg/utils/string_utils_test.go(1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
pkg/**/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
Place business logic in pkg rather than in cmd
Target >80% coverage for packages, focusing on pkg/ and internal/exec/.
Files:
pkg/utils/string_utils.gopkg/utils/string_utils_test.go
**/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*.go: All code must pass golangci-lint checks
Follow Go error handling idioms and use meaningful error messages
Wrap errors with context using fmt.Errorf("context: %w", err)
Consider custom error types for domain-specific errors
Follow standard Go coding style; run gofmt and goimports
Use snake_case for environment variables
Document complex logic with inline comments
**/*.go: All comments must end with periods.
Wrap all returned errors with static errors from errors/errors.go; never return dynamic errors directly.
Use fmt.Errorf with %w to wrap the static error first, then add context details.
Always bind environment variables via viper.BindEnv, providing an ATMOS_ alternative for each external var.
All new configurations must support Go templating using the shared FuncMap(); test template rendering with various contexts.
Prefer SDKs over shelling out to binaries; use standard library for cross-platform behavior (filepath.Join, os.PathSeparator, runtime.GOOS).
For non-standard execution paths, capture telemetry via telemetry.CaptureCmd or telemetry.CaptureCmdString without user data.
Files:
pkg/utils/string_utils.gopkg/utils/string_utils_test.go
**/!(*_test).go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
Document all exported functions, types, and methods with Go doc comments
Files:
pkg/utils/string_utils.go
**/*_test.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*_test.go: Every new feature must include comprehensive unit tests
Test both happy paths and error conditions
Use table-driven tests for multiple scenarios
**/*_test.go: Use table-driven tests for unit tests where applicable.
Always use t.Skipf() with a reason; do not use t.Skip() or t.Skipf() without explanation.
TestMain must call os.Exit(m.Run()) to propagate test exit code for CLI tests.
Files:
pkg/utils/string_utils_test.go
{pkg,cmd}/**/*_test.go
📄 CodeRabbit inference engine (CLAUDE.md)
Co-locate unit/command tests with implementation files using _test.go naming.
Files:
pkg/utils/string_utils_test.go
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (go)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Build (macos-latest, macos)
- GitHub Check: Run pre-commit hooks
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (go)
- GitHub Check: Summary
🔇 Additional comments (4)
pkg/utils/string_utils_test.go (2)
48-54: Good test coverage for the single quote fix.This test case validates the core behavior: single quotes are stripped while preserving nested double quotes. The expected output correctly shows the inner JSON path with its double quotes intact.
55-61: No changes needed for unmatched-quote handling. The code retries with LazyQuotes onErrBareQuoteand only trims matching quotes, so the leading lone quote is correctly preserved.pkg/utils/string_utils.go (2)
25-31: Clean refactoring of the reader setup.The inline helper eliminates duplication and makes the retry logic straightforward. Good use of a closure to parameterize LazyQuotes.
43-50: Post-processing logic looks solid.The filtering and trimming steps are clear. The comment accurately describes both operations, and the implementation correctly handles empty strings before trimming.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1560 +/- ##
==========================================
+ Coverage 64.46% 64.56% +0.09%
==========================================
Files 330 330
Lines 37011 37039 +28
==========================================
+ Hits 23859 23913 +54
+ Misses 11242 11214 -28
- Partials 1910 1912 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
pkg/utils/string_utils_test.go (1)
48-82: Strong test coverage overall; consider a few more edge cases.The five new tests provide excellent coverage of the quoting scenarios and directly address the previous feedback. Consider adding tests for:
- Mixed single and double quotes in the same field:
"foo'bar'baz"- Trailing unmatched quote:
foo bar'- Multiple consecutive delimiters with quotes:
foo '' barThese would further strengthen confidence in the parser's robustness.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
pkg/utils/string_utils.go(2 hunks)pkg/utils/string_utils_test.go(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- pkg/utils/string_utils.go
🧰 Additional context used
📓 Path-based instructions (4)
pkg/**/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
Place business logic in pkg rather than in cmd
Target >80% coverage for packages, focusing on pkg/ and internal/exec/.
Files:
pkg/utils/string_utils_test.go
**/*_test.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*_test.go: Every new feature must include comprehensive unit tests
Test both happy paths and error conditions
Use table-driven tests for multiple scenarios
**/*_test.go: Use table-driven tests for unit tests where applicable.
Always use t.Skipf() with a reason; do not use t.Skip() or t.Skipf() without explanation.
TestMain must call os.Exit(m.Run()) to propagate test exit code for CLI tests.
Files:
pkg/utils/string_utils_test.go
**/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*.go: All code must pass golangci-lint checks
Follow Go error handling idioms and use meaningful error messages
Wrap errors with context using fmt.Errorf("context: %w", err)
Consider custom error types for domain-specific errors
Follow standard Go coding style; run gofmt and goimports
Use snake_case for environment variables
Document complex logic with inline comments
**/*.go: All comments must end with periods.
Wrap all returned errors with static errors from errors/errors.go; never return dynamic errors directly.
Use fmt.Errorf with %w to wrap the static error first, then add context details.
Always bind environment variables via viper.BindEnv, providing an ATMOS_ alternative for each external var.
All new configurations must support Go templating using the shared FuncMap(); test template rendering with various contexts.
Prefer SDKs over shelling out to binaries; use standard library for cross-platform behavior (filepath.Join, os.PathSeparator, runtime.GOOS).
For non-standard execution paths, capture telemetry via telemetry.CaptureCmd or telemetry.CaptureCmdString without user data.
Files:
pkg/utils/string_utils_test.go
{pkg,cmd}/**/*_test.go
📄 CodeRabbit inference engine (CLAUDE.md)
Co-locate unit/command tests with implementation files using _test.go naming.
Files:
pkg/utils/string_utils_test.go
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Run pre-commit hooks
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (go)
- GitHub Check: Summary
🔇 Additional comments (5)
pkg/utils/string_utils_test.go (5)
48-54: Excellent coverage of the primary bug fix.This test directly addresses issue #1362 where single quotes wrap expressions containing nested double quotes. The expected behavior correctly strips the outer single quotes while preserving the inner double quotes.
55-61: Good response to previous feedback.This test addresses the earlier request for coverage of nested single quotes. The CSV-style escaping (doubled quotes) is handled correctly, converting
''to a literal single quote in the output.
62-68: Solid symmetrical coverage.This test properly validates the CSV-style escaping for double quotes, mirroring the single quote escaping test. The expected behavior is correct.
69-75: Good edge case for empty quoted values.This test validates that both single and double quoted empty strings are filtered from the result. The expected behavior aligns with the implementation's post-processing step.
76-82: Verify that retaining unmatched leading quotes is intentional.This test demonstrates that when an input contains an unmatched leading quote, it’s preserved instead of causing an error—confirm that this matches the desired parsing semantics.
|
Vinicius C. (@Cerebrovinny) also need to update the docs that this is supported |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (4)
website/docs/functions/yaml/env.mdx(1 hunks)website/docs/functions/yaml/include.mdx(2 hunks)website/docs/functions/yaml/terraform.output.mdx(1 hunks)website/docs/functions/yaml/terraform.state.mdx(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- website/docs/functions/yaml/terraform.output.mdx
🧰 Additional context used
📓 Path-based instructions (1)
website/**
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
website/**: Update website documentation in website/ when adding features
Ensure consistency between CLI help text and website documentation
Follow the website's documentation structure and style
Keep website code in website/ and follow its architecture/style; test changes locally
Keep CLI and website documentation in sync; document new features with examples and use cases
Files:
website/docs/functions/yaml/terraform.state.mdxwebsite/docs/functions/yaml/include.mdxwebsite/docs/functions/yaml/env.mdx
🧠 Learnings (3)
📚 Learning: 2024-12-01T00:33:20.298Z
Learnt from: aknysh
PR: cloudposse/atmos#810
File: examples/tests/stacks/catalog/terraform/template-functions-test2/defaults.yaml:28-32
Timestamp: 2024-12-01T00:33:20.298Z
Learning: In `examples/tests/stacks/catalog/terraform/template-functions-test2/defaults.yaml`, `!exec atmos terraform output` is used in examples to demonstrate its usage, even though `!terraform.output` is the recommended approach according to the documentation.
Applied to files:
website/docs/functions/yaml/terraform.state.mdxwebsite/docs/functions/yaml/env.mdx
📚 Learning: 2025-01-19T22:30:27.600Z
Learnt from: aknysh
PR: cloudposse/atmos#0
File: :0-0
Timestamp: 2025-01-19T22:30:27.600Z
Learning: The Atmos YAML function `!include` allows downloading local or remote files from different sources and assigning their contents to sections in stack manifests. It supports various protocols (file, http, git, s3, etc.) and can filter content using YQ expressions.
Applied to files:
website/docs/functions/yaml/include.mdx
📚 Learning: 2025-01-19T22:30:27.600Z
Learnt from: aknysh
PR: cloudposse/atmos#0
File: :0-0
Timestamp: 2025-01-19T22:30:27.600Z
Learning: The Atmos YAML function `!env` is used to retrieve environment variables and assign them to sections in stack manifests. It supports both simple types (string, number, boolean) and complex types (JSON-encoded lists, maps, objects).
Applied to files:
website/docs/functions/yaml/env.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Build (ubuntu-latest, linux)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Run pre-commit hooks
- GitHub Check: website-deploy-preview
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (go)
- GitHub Check: autofix
- GitHub Check: Summary
🔇 Additional comments (2)
website/docs/functions/yaml/env.mdx (1)
76-90: Guidance aligns with the parser fix nicely.The single-quote wrapping advice matches the new CSV parsing path and will spare folks from the bare-quote errors. 👍
website/docs/functions/yaml/terraform.state.mdx (1)
127-173: Nice cross-linking and defaults coverage.The bracket-notation reminder plus the expanded default-value patterns mirror the parser rules cleanly—this should save a lot of trial-and-error.
Andriy Knysh (aknysh)
left a comment
There was a problem hiding this comment.
LGTM, one comment
|
CodeRabbit (@coderabbitai) full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (7)
go.mod(1 hunks)pkg/utils/string_utils.go(2 hunks)pkg/utils/string_utils_test.go(1 hunks)website/docs/functions/yaml/env.mdx(1 hunks)website/docs/functions/yaml/include.mdx(2 hunks)website/docs/functions/yaml/terraform.output.mdx(1 hunks)website/docs/functions/yaml/terraform.state.mdx(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-01-19T22:30:27.600Z
Learnt from: aknysh
PR: cloudposse/atmos#0
File: :0-0
Timestamp: 2025-01-19T22:30:27.600Z
Learning: The Atmos YAML function `!include` allows downloading local or remote files from different sources and assigning their contents to sections in stack manifests. It supports various protocols (file, http, git, s3, etc.) and can filter content using YQ expressions.
Applied to files:
website/docs/functions/yaml/include.mdx
📚 Learning: 2025-01-19T22:30:27.600Z
Learnt from: aknysh
PR: cloudposse/atmos#0
File: :0-0
Timestamp: 2025-01-19T22:30:27.600Z
Learning: The Atmos YAML function `!env` is used to retrieve environment variables and assign them to sections in stack manifests. It supports both simple types (string, number, boolean) and complex types (JSON-encoded lists, maps, objects).
Applied to files:
website/docs/functions/yaml/env.mdx
📚 Learning: 2024-12-01T00:33:20.298Z
Learnt from: aknysh
PR: cloudposse/atmos#810
File: examples/tests/stacks/catalog/terraform/template-functions-test2/defaults.yaml:28-32
Timestamp: 2024-12-01T00:33:20.298Z
Learning: In `examples/tests/stacks/catalog/terraform/template-functions-test2/defaults.yaml`, `!exec atmos terraform output` is used in examples to demonstrate its usage, even though `!terraform.output` is the recommended approach according to the documentation.
Applied to files:
website/docs/functions/yaml/env.mdxwebsite/docs/functions/yaml/terraform.output.mdxwebsite/docs/functions/yaml/terraform.state.mdx
📚 Learning: 2025-09-30T19:03:50.738Z
Learnt from: Cerebrovinny
PR: cloudposse/atmos#1560
File: pkg/utils/string_utils.go:43-64
Timestamp: 2025-09-30T19:03:50.738Z
Learning: In the Atmos codebase, YAML tags like !terraform.output rely on positional arguments, so the SplitStringByDelimiter function in pkg/utils/string_utils.go must preserve empty strings (even after trimming quotes) to maintain the correct number of positional arguments. Filtering out empty values after trimming would collapse the array and break these function calls.
Applied to files:
pkg/utils/string_utils.go
📚 Learning: 2024-12-03T04:01:16.446Z
Learnt from: aknysh
PR: cloudposse/atmos#810
File: website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx:0-0
Timestamp: 2024-12-03T04:01:16.446Z
Learning: In the `terraform.output.mdx` documentation file (`website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx`), the cache invalidation and cache scope behavior for the `!terraform.output` function are already described.
Applied to files:
website/docs/functions/yaml/terraform.output.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Lint (golangci)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Summary
🔇 Additional comments (10)
pkg/utils/string_utils.go (4)
5-5: LGTM!The
errorsimport is correctly added to support the new error checking logic.
32-38: LGTM!The
readhelper function eliminates duplication and makes the lazy-quote retry logic clean.
63-88: LGTM!The
trimMatchingQuotesfunction correctly:
- Handles matching quotes (single or double)
- Normalizes escaped quotes (
''→',""→")- Returns early for non-quoted or mismatched values
Good implementation.
50-58: Confirm intentional empty‐string removal vs. positional args
Filtering now drops trimmed‐empty parts (tests “Quoted empty values are removed”), which may shift positional arguments for YAML tags like !terraform.output; verify no tag functions rely on empty args or adjust accordingly.pkg/utils/string_utils_test.go (1)
52-88: LGTM!The new test cases provide solid coverage of quoting edge cases:
- Nested double quotes inside single quotes
- Escaped single quotes
- Escaped double quotes
- Empty value removal
- Unmatched quote handling
Test expectations align with the implementation.
website/docs/functions/yaml/terraform.output.mdx (1)
128-160: LGTM!The new section clearly explains:
- Why single quotes are needed around expressions with bracket notation
- Concrete examples with special characters in keys
- Quote escaping rules
- Cross-function applicability
Well-documented with practical examples.
website/docs/functions/yaml/env.mdx (1)
76-90: LGTM!The nested quotes guidance is clear with practical examples. The cross-reference to
!terraform.outputdocumentation avoids duplication and helps users find detailed escaping rules.website/docs/functions/yaml/terraform.state.mdx (1)
127-129: LGTM!Concise cross-reference avoids documentation duplication while ensuring users can find the quoting guidance.
website/docs/functions/yaml/include.mdx (1)
244-278: LGTM!The expanded quoting guidance provides:
- Platform-specific examples (Windows vs macOS/Linux)
- Bracket notation handling
- Cross-reference to detailed escaping rules
The wording "around the whole expression" refers to the arguments passed to
!include, not the YAML tag itself—the examples demonstrate this correctly.go.mod (1)
9-9: Confirm intentional bump of github.com/Azure/azure-sdk-for-go/sdk/azidentity to v1.13.0
No known security advisories affect v1.13.0 (first patched was v1.6.0-beta…), but this update is unrelated to YAML parsing—ensure it’s required for this PR or revert it.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
pkg/utils/string_utils_test.go (1)
52-110: Add nested single quotes test
The TestSplitStringByDelimiter suite passes existing cases but lacks coverage for inputs like'foo 'bar' baz'. Add a test case to verify this scenario.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
pkg/utils/string_utils.go(2 hunks)pkg/utils/string_utils_test.go(5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- pkg/utils/string_utils.go
🧰 Additional context used
📓 Path-based instructions (5)
pkg/**/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
Place business logic in pkg rather than in cmd
Files:
pkg/utils/string_utils_test.go
**/*_test.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*_test.go: Every new feature must include comprehensive unit tests
Test both happy paths and error conditions
Use table-driven tests for multiple scenarios
**/*_test.go: Use table-driven tests for unit tests; focus on pure functions; generate and use mocks for external dependencies.
Test behavior, not implementation; avoid tautological or stub tests; remove always-skipped tests; ensure tests validate real behavior.
Always use t.Skipf() with a reason for skipped tests; never call t.Skipf without a reason; CLI tests build a temp binary and TestMain must call os.Exit(m.Run()).
Files:
pkg/utils/string_utils_test.go
**/*.go
📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)
**/*.go: All code must pass golangci-lint checks
Follow Go error handling idioms and use meaningful error messages
Wrap errors with context using fmt.Errorf("context: %w", err)
Consider custom error types for domain-specific errors
Follow standard Go coding style; run gofmt and goimports
Use snake_case for environment variables
Document complex logic with inline comments
**/*.go: All comments must end with periods; comments should be complete sentences (golangci-lint godot).
Organize imports into three groups separated by blank lines: standard library, third-party, and github.com/cloudposse/atmos packages; sort alphabetically within each group and preserve existing aliases.
Wrap all errors using static errors from errors/errors.go; prefer errors.Join for multiple errors; use fmt.Errorf with %w for context; check with errors.Is; never use dynamic errors directly.
Distinguish structured logging from UI output: use stderr for prompts/status/errors needing user action, stdout only for data; never use logging for UI elements.
Most text UI must go to stderr; only data/results go to stdout; prefer utils.PrintfMessageToTUI for UI messages.
Ensure cross-platform compatibility: prefer SDKs over external binaries; use filepath.Join, os.PathSeparator, and runtime.GOOS for OS-specific logic; add build constraints if needed.
Files:
pkg/utils/string_utils_test.go
pkg/**/*_test.go
📄 CodeRabbit inference engine (CLAUDE.md)
Unit test files should mirror implementation structure within pkg/ (test naming symmetry).
Files:
pkg/utils/string_utils_test.go
@(cmd|internal|pkg)/**/*.go
📄 CodeRabbit inference engine (CLAUDE.md)
Bind environment variables with viper.BindEnv() and provide ATMOS_ alternatives for every env var.
Files:
pkg/utils/string_utils_test.go
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (go)
- GitHub Check: Build (ubuntu-latest, linux)
- GitHub Check: Build (macos-latest, macos)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Run pre-commit hooks
- GitHub Check: website-deploy-preview
- GitHub Check: Summary
🔇 Additional comments (3)
pkg/utils/string_utils_test.go (3)
166-185: Solid edge case additions.The new test cases for
nilinput, single elements, order preservation, and empty string handling provide good coverage of boundary conditions and expected behavior.
196-271: Comprehensive test coverage for quote trimming.The new
TestTrimMatchingQuotesfunction thoroughly exercises the quote trimming logic with excellent coverage of edge cases including escaped quotes, mismatched quotes, empty inputs, and boundary conditions. The table-driven structure aligns with coding guidelines.
311-322: Good boundary and multi-character separator coverage.These additions properly test the separator-at-end edge case and multi-character separator handling, rounding out the test suite for this function.
|
These changes were released in v1.194.0. |
what
!terraform.outputarguments that use single quotes around expressions with nested double quoteswhy
bare " in non-quoted-fieldtesting
Issue output

After the fix single quote

Summary by CodeRabbit