From 706f84c12d75ec5dca06e5cb6eefcb1146c14f15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 19:23:32 +0000 Subject: [PATCH 1/4] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/autotag-releases.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autotag-releases.yml b/.github/workflows/autotag-releases.yml index 44fbd19..4ca4ad5 100644 --- a/.github/workflows/autotag-releases.yml +++ b/.github/workflows/autotag-releases.yml @@ -15,7 +15,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Get version from tag id: tag_name run: | From 1ad726d02da4c07325b598aa0e9cbbd23616543a Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Tue, 3 Oct 2023 18:55:45 +0200 Subject: [PATCH 2/4] Update example workflow in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fa33146..2d2d5ac 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ jobs: name: cargo fmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Ensure rustfmt is installed and setup problem matcher - uses: actions-rust-lang/setup-rust-toolchain@v1 with: From 0704f9f8204deee774609c608a6fe3cacf6fc05b Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Tue, 1 Oct 2024 22:45:24 +0200 Subject: [PATCH 3/4] Parse new rustfmt filename:line format Adjust code for stripping ANSI escapes. A 0x0f character is included for switching character sets. The old "filename at line line" is still supported. --- CHANGELOG.md | 8 ++++++++ action.yml | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ba50ce..262eb8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +* Parse the new rustfmt file and line number format + + The format changed in https://github.com/rust-lang/rustfmt/pull/5971 + + Thanks to @0xcypher02 for pointing out the problem. + ## [1.1.0] - 2022-11-21 ### Added diff --git a/action.yml b/action.yml index 7b5816e..2ed6026 100644 --- a/action.yml +++ b/action.yml @@ -41,12 +41,12 @@ runs: echo "${CARGO_OUTPUT}" | # Strip color codes - sed 's/\x1B\[[0-9;]*[A-Za-z]//g' | + sed 's/\x1B\[[0-9;]*[A-Za-z]\x0f\?//g' | # Strip (some) cursor movements sed 's/\x1B.[A-G]//g' | tr "\n" "\r" | # Wrap each location into a HTML details - sed -E 's#Diff in ([^\r]*?) at line ([[:digit:]]+):\r((:?[ +-][^\r]*\r)+)#
\n\1:\2\n\n```diff\n\3```\n\n
\n\n#g' | + sed -E 's#Diff in ([^\r]*?)( at line |:)([[:digit:]]+):\r((:?[ +-][^\r]*\r)+)#
\n\1:\3\n\n```diff\n\4```\n\n
\n\n#g' | tr "\r" "\n" >> $GITHUB_STEP_SUMMARY fi From 559aa3035a47390ba96088dffa783b5d26da9326 Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Tue, 1 Oct 2024 22:55:39 +0200 Subject: [PATCH 4/4] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 262eb8d..04af258 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.1.1] - 2024-10-01 + ### Fixed * Parse the new rustfmt file and line number format