Skip to content

feat: add configurable path suffix cleanup and heredoc formatting#20

Open
h4rk8s wants to merge 1 commit intosteipete:mainfrom
h4rk8s:jawa/pr-heredoc-path-cleanup
Open

feat: add configurable path suffix cleanup and heredoc formatting#20
h4rk8s wants to merge 1 commit intosteipete:mainfrom
h4rk8s:jawa/pr-heredoc-path-cleanup

Conversation

@h4rk8s
Copy link
Copy Markdown

@h4rk8s h4rk8s commented Feb 28, 2026

Summary

  • add trimPathSuffix and formatHeredoc settings in General preferences
  • implement path suffix cleanup (e.g. /path/file.swift:42: -> /path/file.swift)
  • implement heredoc block formatting with early return to preserve multiline structure
  • keep existing path quoting behavior and merge all related transformations in pipeline
  • add test coverage for path quoting, heredoc formatting, and path suffix cleanup

Validation

  • swift test passes locally
  • pnpm check currently fails on repository-wide baseline SwiftFormat issues in untouched files

@h4rk8s
Copy link
Copy Markdown
Author

h4rk8s commented Feb 28, 2026

@codex

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e0c8c51d9a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


// Pattern: path followed by optional :line:col and trailing colon
// Matches: /path/file: or /path/file:42: or /path/file:42:10:
let pathPattern = #"^([/~][\S]*?)(:\d+)?(:\d+)?:$"#
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Match path suffixes on paths containing spaces

The new suffix-cleanup regex only allows non-whitespace characters in the path ([\S]*), so inputs like /Users/me/My Project/file.swift:42: never match and the cleanup silently returns nil. In this case the next pipeline step can still quote the path, but it preserves the :42: suffix, so users still get an unusable path when directories contain spaces (a common macOS case).

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants