aws / aws/amazon-q-developer-cli

bug: diffs show trailing newline differences

Open
#923 2 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

> There's an annoying bug where Q chat shows diffs for files it modifies, but the last line of the diff always has (what i'm guessing is) a newline difference, so it clutters the context, and also I have to scroll up to actually see what the real change was.

Example:
```
73, 73: local role_name="$1"
74, 74:
75, 75: # Validate environment
76, 76: if ! validate_environment; then
77, 77: echo "Error: Invalid environment configuration" >&2
78, 78: return 1
79, 79: fi
80, 80:
81, 81: # Export role-specific variables
82, 82: export QDT_ROLE="$role_name"
83, 83: export QDT_ROLE_SCRIPT_DIR="$QDT_SCRIPT_DIR"
84, 84:
85, 85: return 0
86, 86: }
87, 87:
88, 88: # Main initialization
89, 89: if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
90, 90: echo "This script should be sourced, not executed directly" >&2
91, 91: exit 1
- 92 : fi
+ 92: fi
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.