Skip to content

Change .editorconfig to use indent = 8 for Makefiles#1038

Open
mhucka wants to merge 4 commits intoquantumlib:mainfrom
mhucka:undo-indent-size-for-makefiles
Open

Change .editorconfig to use indent = 8 for Makefiles#1038
mhucka wants to merge 4 commits intoquantumlib:mainfrom
mhucka:undo-indent-size-for-makefiles

Conversation

@mhucka
Copy link
Copy Markdown
Collaborator

@mhucka mhucka commented Apr 5, 2026

This undoes a previous change that set the indent size to 4 in .editorconfig. Per discussion with other people, setting it to 4 makes editing Makefiles more error-prone.

In addition, this sets tab_width = 8 for Makefiles. This is to avoid leaving the tab width to whatever the user's default may be, so that they get the value expected in this project.

@github-actions github-actions bot added the size: XS <10 lines changed label Apr 5, 2026
gemini-code-assist[bot]

This comment was marked as resolved.

@mhucka mhucka force-pushed the undo-indent-size-for-makefiles branch from 61c743b to 48a537c Compare April 5, 2026 18:03
@mhucka
Copy link
Copy Markdown
Collaborator Author

mhucka commented Apr 5, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modifies the .editorconfig file by removing the indent_size = 4 specification for Makefiles. Feedback suggests explicitly setting the indentation size to 8 to ensure consistency across different editors and to align with the stated intent of the pull request.

Although tabs usually default to 8 columns, people who set their editors
to a different value for the tab width may see different indentation in
project files unless we explicitly specify a tab width of 8 in
`.editorconfig`.
@mhucka
Copy link
Copy Markdown
Collaborator Author

mhucka commented Apr 5, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modifies the .editorconfig file by reordering properties and adjusting indentation settings. The review feedback suggests that the global tab_width setting may cause inconsistent indentation for unspecified file types and recommends explicitly setting indent_size for Makefiles to maintain project consistency and readability.

.editorconfig Outdated
insert_final_newline = true
max_line_length = 80
spelling_language = en-US
tab_width = 8
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Adding tab_width = 8 to the global [*] section can lead to inconsistent indentation across the project. In many editors, tab_width is used as a fallback for indent_size when the latter is not specified, even for indent_style = space. This would cause any file types not explicitly defined in this file to default to an 8-space indentation, which is inconsistent with the 2 or 4 spaces used throughout the rest of the project. To maintain Consistency (Repository Style Guide, line 14), it is better to specify the indentation width only within the relevant file-type blocks.

References
  1. Consistency: Be consistent with naming convention, style, and other patterns in the code base. (link)

@mhucka
Copy link
Copy Markdown
Collaborator Author

mhucka commented Apr 7, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request reorders properties in the .editorconfig file and updates Makefile indentation to use tab_width. A review comment suggests adding a global tab_width default to ensure consistency as intended by the PR description.

charset = utf-8
indent_style = space
insert_final_newline = true
max_line_length = 80
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The pull request description states that an explicit global default for tab_width = 8 is being set, but this setting is missing from the [*] section. This should be added to ensure consistent tab rendering across all file types as intended.

max_line_length = 80
tab_width = 8
References
  1. Consistency: Be consistent with naming convention, style, and other patterns in the code base. (link)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XS <10 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant