Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use editorconfig to check for indentation #9653

Merged
merged 1 commit into from
Oct 11, 2022

Conversation

matejak
Copy link
Member

@matejak matejak commented Oct 10, 2022

Fix editorconfig - make rules effective for all files, not just the top project level.

The main motivation is to stop enforcing 4-space indentation in Python, as it is not valid in some cases.

@matejak matejak added this to the 0.1.65 milestone Oct 10, 2022
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Used by openshift-ci bot. label Oct 10, 2022
@openshift-ci
Copy link

openshift-ci bot commented Oct 10, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@github-actions
Copy link

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@matejak matejak force-pushed the tune_editorconfig branch 2 times, most recently from 25953b0 to a4e7dd5 Compare October 10, 2022 12:36
@matejak
Copy link
Member Author

matejak commented Oct 10, 2022

Research has shown that the editorconfig is respected - setting the indent_size to 2 fixed many issues. Sadly, the absence of indent_size = 4 still results in requiring 4-space indentation - that's probably some sort of a default value.
Working around by setting indent_size = 1 would not work well either, as editors that use editorconfig would pick this setting up as well, which would mess up the editor workflow for the user.

The only solution is to explicitly switch the check off as described in https://editorconfig-specification.readthedocs.io/

@matejak matejak marked this pull request as ready for review October 10, 2022 12:42
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Used by openshift-ci bot. label Oct 10, 2022
@matejak matejak changed the title Tune editorconfig Remove editorconfig from codeclimate Oct 10, 2022
Use double asterisks in the path spec - single ones make rules effective
only for top-level files.
Next, disable check for indentation width for Python files due to
editorconfig/editorconfig#412
@matejak matejak changed the title Remove editorconfig from codeclimate Don't use editorconfig to check for indentation Oct 10, 2022
@Mab879 Mab879 self-assigned this Oct 10, 2022
@Mab879 Mab879 added the Infrastructure Our content build system label Oct 10, 2022
@codeclimate
Copy link

codeclimate bot commented Oct 10, 2022

Code Climate has analyzed commit 6adf7de and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 40.8% (0.0% change).

View more on Code Climate.

@matejak
Copy link
Member Author

matejak commented Oct 11, 2022

@Mab879 Could we merge this? It would fix a lot of CodeClimate false positives

@Mab879 Mab879 merged commit 1210c43 into ComplianceAsCode:master Oct 11, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Our content build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants