From e7856e96d2a5c9135bdb60db83a4ad7017c99802 Mon Sep 17 00:00:00 2001 From: toyeshhm Date: Fri, 16 Oct 2026 09:50:23 -0500 Subject: [PATCH] Fix Docker install snippet and typos The README Docker snippet used `JohnnyMorganz/StyLua:2.6.0` as the `COPY --from` image. Docker image references must be lowercase, so this fails with "invalid reference format: repository name must be lowercase". Use `johnnymorganz/stylua`, the name the release workflow publishes to Docker Hub, and update the matching needle in .github/release.py so the version keeps being bumped on release. Also fix typos: - README.md: preseve -> preserve - src/shape.rs: expontential -> exponential - src/formatters/functions.rs: COMPATABILITY -> COMPATIBILITY - src/cli/main.rs: Covert -> Convert --- .github/release.py | 2 +- README.md | 4 ++-- src/cli/main.rs | 2 +- src/formatters/functions.rs | 2 +- src/shape.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/release.py b/.github/release.py index 611f2b009..4e7d7fae3 100755 --- a/.github/release.py +++ b/.github/release.py @@ -69,7 +69,7 @@ # Update version in README.md README_REPLACEMENTS = ( ("rev: v{old}", "rev: v{new}"), - ("StyLua:{old}", "StyLua:{new}"), + ("stylua:{old}", "stylua:{new}"), ("stylua@{old}", "stylua@{new}"), ) diff --git a/README.md b/README.md index 8f1111bdd..d0e11551a 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ StyLua is available on the [Docker Hub](https://hub.docker.com/r/johnnymorganz/s If you are using Docker, the easiest way to install StyLua is: ```dockerfile -COPY --from=JohnnyMorganz/StyLua:2.6.0 /stylua /usr/bin/stylua +COPY --from=johnnymorganz/stylua:2.6.0 /stylua /usr/bin/stylua ``` ### Homebrew @@ -198,7 +198,7 @@ Note that this may produce false positives and negatives - we recommend manual v ### Ignoring parts of a file To skip formatting a particular part of a file, you can add `-- stylua: ignore` before it. -This is useful if there is a particular style you want to preseve for readability, e.g.: +This is useful if there is a particular style you want to preserve for readability, e.g.: ```lua -- stylua: ignore diff --git a/src/cli/main.rs b/src/cli/main.rs index 643005355..cc360376c 100644 --- a/src/cli/main.rs +++ b/src/cli/main.rs @@ -119,7 +119,7 @@ fn create_diff( vec.push(b'\n'); vec }) - // Covert to anyhow::Error + // Convert to anyhow::Error .map_err(|err| err.into()) }) .transpose() diff --git a/src/formatters/functions.rs b/src/formatters/functions.rs index ab3244e1f..ab0e47b35 100644 --- a/src/formatters/functions.rs +++ b/src/formatters/functions.rs @@ -322,7 +322,7 @@ fn function_args_multiline_heuristic( expression => { current_state = current_state.record_standard_arg(); - // TODO: BACKWARDS COMPATABILITY - THIS CODEPATH WAS ONLY FOLLOWED THROUGH WHEN + // TODO: BACKWARDS COMPATIBILITY - THIS CODEPATH WAS ONLY FOLLOWED THROUGH WHEN // IT WASN'T PARENTHESES / UNOP, AND THE PATHS MERGED WHEN REMOVING EXPRESSION::VALUE // WE SHOULD SEE IF THIS IS ACTUALLY NECESSARY if !matches!( diff --git a/src/shape.rs b/src/shape.rs index 7ac6164c6..9b9f7dee8 100644 --- a/src/shape.rs +++ b/src/shape.rs @@ -189,7 +189,7 @@ impl Shape { } /// Whether simple heuristics should be used when calculating formatting shape - /// This is to reduce the expontential blowup of discarded test formatting + /// This is to reduce the exponential blowup of discarded test formatting #[must_use] pub fn using_simple_heuristics(&self) -> bool { self.simple_heuristics