Automatic code formatting duplicates lines and blocks of code
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, python
- 領域
- tooling
調査の方向性
まず、ide-python 1.9.4 または 1.9.5 を使用し、保存時のフォーマットを有効にして、同じ Python ファイルを複数のペインで開いた状態で、Atom で問題を再現します。自動フォーマットと保存の経路を追跡し、追加した各タブが内容を重複させる理由を特定します。保存時のフォーマットによって行やブロックが重複しなくなり、1 回の保存後にファイルが変更済みのままにならなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
There seems to be a bug in automatic code formatting. The bug is triggered by opening the same code file into multiple tabs in separate panes. Having two tabs (of the same file) will cause the bug to occur once, three tabs will cause it to repeat twice, and so on.
I have been using the ide-python package only for a couple days, so I don't know about the specifics. This bug is present in both versions 1.9.4 and 1.9.5 at least. I turned off all checkboxes in the module's settings and restarted Atom, but this bug will still persist. I am using the "format on save" option.
Also, the file status is "modified" again after I save the file and automatic formatting is applied, so the file has to be manually saved twice. I don't think it should be like this.
Example 1
Original code
def foo():
pass
def bar():
pass
Result after automating formatting
def foo():
pass
def bar():
pass
pass
Here the keyword pass is duplicated inside function bar.
Example 2
Original code
def foo():
pass
def bar():
pass
Result after automating formatting
def foo():
pass
def bar():
pass
def bar():
pass
Here the whole function block for bar is duplicated. Formatting is also messed up.
- 主要言語
- JavaScript
- スター
- 238
- フォーク
- 41
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
atom-community/ide-python のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
atom-community/ide-python#575 · リアクション 5 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
atom-community/ide-python#570 · コメント 2 件 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
atom-community/ide-python#568 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
atom-community/ide-python#567 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
atom-community/ide-python#566 ·
atom-community/ide-python の issue をすべて見る
似ている issue
-
Complexity: Small P-Feature: Projects page ready for merge team role: back end/devOps role: front end size: 0.25pt
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 67/100
bellingcat/toolkit#905 ·
-
self-care self-care:docs-build-time-investigator
難易度 2/5 半日 初心者へのやさしさ 76/100
githubnext/gh-aw-cao#14191 ·
メンテナーはふだん 1 日以内に返信
-
effort:low impact:medium RAG status: auto-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
mastra-ai/mastra#25229 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
sugarlabs/musicblocks#8984 ·
メンテナーはふだん 1 日以内に返信