Skip to content

style: POSIX character classes in tr (5q6.7)#2

Merged
R0SEWT merged 1 commit into
mainfrom
style/scaffold-tr-locale
Jun 4, 2026
Merged

style: POSIX character classes in tr (5q6.7)#2
R0SEWT merged 1 commit into
mainfrom
style/scaffold-tr-locale

Conversation

@R0SEWT

@R0SEWT R0SEWT commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Closes project-kit-5q6.7.

ShellCheck (the lint CI job) was failing on scripts/scaffold.sh:57: tr 'A-Z' 'a-z' trips SC2019/SC2018 (plain ranges don't cover accented/foreign alphabets). The action exits 1 on any finding, so main was red and the repo's first PR (#1) inherited it.

Fix: tr '[:upper:]' '[:lower:]'. No behavior change for ASCII project names; turns lint green.

Pre-existing since 964a15b (the 5q6.2 scaffold feat), discovered while landing the 5q6.3 doc. Kept out of the docs PR to preserve one-intention-per-branch.

Copilot AI review requested due to automatic review settings June 4, 2026 06:17
@sourcery-ai

sourcery-ai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the package name normalization in the scaffold script to use POSIX character classes in tr, resolving ShellCheck SC2018/SC2019 while preserving behavior for ASCII names.

File-Level Changes

Change Details Files
Use POSIX character classes in package name normalization to satisfy ShellCheck and keep behavior consistent for ASCII inputs.
  • Replace tr 'A-Z' 'a-z' with tr '[:upper:]' '[:lower:]' in the package name derivation pipeline.
  • Retain the preceding sed replacement that maps non-alphanumeric characters to underscores, so overall normalization semantics are unchanged apart from improved locale/charset correctness.
scripts/scaffold.sh

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the scaffold script’s case-normalization step to satisfy ShellCheck’s guidance around locale-aware character ranges, restoring a green lint job without changing behavior for ASCII-only project names.

Changes:

  • Replace tr 'A-Z' 'a-z' with tr '[:upper:]' '[:lower:]' when deriving PKG from NAME.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ShellCheck SC2018/SC2019 on scaffold.sh:57 — tr 'A-Z' 'a-z' is flagged
because plain ranges don't cover accents/foreign alphabets. Switch to
tr '[:upper:]' '[:lower:]'. No behavior change for ASCII names; turns the
lint CI job green so PR #1 can merge.
@R0SEWT R0SEWT force-pushed the style/scaffold-tr-locale branch from 2561789 to 0c5578a Compare June 4, 2026 06:26
@R0SEWT R0SEWT merged commit c3faf1a into main Jun 4, 2026
4 checks passed
@R0SEWT R0SEWT deleted the style/scaffold-tr-locale branch June 4, 2026 06:28
R0SEWT added a commit that referenced this pull request Jun 4, 2026
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