openrewrite / openrewrite/rewrite

Change preview in moderne.io shows tabs vs spaces substitutions as actual changes whereas generated diffs or PRs do not include those

Open
#8,722 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
3.7k
Forks
570
Avg merge
13h 12m
Merged PRs (30d)
261

Description

Problem

When applying a recipe that is changing tabs to spaces in a line, this change gets rendered as a real change in the UI even though the PR or patch created will not contain that change:

Image
  • screenshot from this page
Expected behavior

Have the same diff / visual diff everywhere

Example diff

From: .github/workflows/codeql.yml

     contents: read

jobs:
-  analyze:
+  analyze:
 name: Analyze (${{ matrix.language }})
 runs-on: "ubuntu-latest"
 permissions:
      uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Initialize CodeQL
-        uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4.37.8
+        uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.8
with:
  languages: ${{ matrix.language }}
  config-file: ./.github/codeql/codeql-config.yml

- name: Perform CodeQL Analysis
-        uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4.37.8
+        uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.8
with:
  category: "/language:${{matrix.language}}"
  output: results-${{matrix.language}}
      uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
  name: codeql-results-${{matrix.language}}
-          path: results-${{matrix.language}}
+          path: results-${{matrix.language}}

Recipes in example diff:
  • org.openrewrite.github.GitHubActionsBestPractices
  • org.openrewrite.github.FindMissingTimeout
  • org.openrewrite.github.UpgradeOfficialGitHubActions
References:
  • View original result
  • Recipe ID: org.openrewrite.github.FindMissingTimeout
  • Recipe Name: Find jobs missing timeout
  • Repository: langchain-ai/langchainjs/main
  • Created at Sun Aug 30 2026 13:56:09 GMT+0200 (Central European Summer Time)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the moderne.io change preview for .github/workflows/codeql.yml with the generated PR for langchain-ai/langchainjs#11504, focusing on tabs-versus-spaces rendering. Reproduce with org.openrewrite.github.FindMissingTimeout and the listed GitHub Actions recipes. Done means the preview and generated PR or patch show the same diff.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.