feat: add .editorconfig for consistent formatting across editors#112
feat: add .editorconfig for consistent formatting across editors#112mohdfarhanakram wants to merge 2 commits intocamaraproject:mainfrom
Conversation
Covers .md, .yaml, and .feature files, aligned with existing yamllint and gherkin-lintrc configurations. Fixes camaraproject#10
|
@mohdfarhanakram Thank you for taking the time to open this PR. We're genuinely glad you're contributing to CAMARA! I think we need to briefly document the presence of .editorconfig file in the repository. Since it is quite simple we can keep it in the root folder and update the README.md (esp. Repository Structure section). Once PR is merged the .editorconfig file should be added to repository template and deploy it into current CAMARA repos. |
@rartych I think the authoritative .editorconfig (and .gitattributes file for enforcement on git layer) should live near to the linting rule artifacts (as it has to be in line with e.g. the YAML linting). The operative copy will be in /root.
That's right, but we need also to think about the migration of existing repository, as we have today a mix of files with LF and CRLF line endings. I encountered that within the Release Automation as the current transformation function is normalizing to LF line endings ... with the effect that the files are looking like completely replaced in diffs which are whitespace sensitive. I created #113 to discuss the approach we want to take to introduce .editorconfig and .gitattribute to get all CAMARA files aligned on LF line endings. Please have a view. @mohdfarhanakram @Kevsy |
|
Thanks @rartych and @hdamker for the review! I have prepared a README update to add Regarding the root vs linting/config/ question: Also happy to help with the broader |
|
Yes, I agree that Taking into account #113 the suggestion from AI for storing shared config files that should be placed in the root of each repo (like |
|
The |
Move .editorconfig into workspace-config/ and add .gitattributes (LF enforcement, binary markers) and .gitignore-template. Update README with new repository structure. Fixes camaraproject#10
|
Moved The folder now has its own README covering adoption steps and how the configs relate to existing linting rules. Let me know if the |
What type of PR is this?
enhancement/feature
What this PR does / why we need it:
Adds an .editorconfig file to enforce consistent formatting across different editors and IDEs. Rules are aligned with the existing yamllint and gherkin-lintrc configurations in the repo:
Which issue(s) this PR fixes:
Fixes #10
Special notes for reviewers:
Single new file, no existing files modified. The .editorconfig settings were derived from the existing yamllint.yaml and .gherkin-lintrc configs to avoid any conflicts.
Changelog input
Additional documentation
N/A