p4t5h3 / purebasic-language-for-sublime-text

PureBasic support for Sublime Text.
MIT License
4 stars 1 forks source link

Repository Configuration #35

Closed tajmone closed 2 years ago

tajmone commented 2 years ago
p4t5h3 commented 2 years ago

Oops. Now I messed up something with my removal of the PureBasic IDE preferences at the end of the test file. This is the first time I use GitHub for reviewing a pull request to something I maintain. A rebase and a simple conflict resolution of that file should be sufficient.

p4t5h3 commented 2 years ago

Just now I had the idea that the EditorConfig utilization might be worth mentioning in the README. As far as I know it also requires the third-party package to be installed. That is not something users might be aware of. In fact I did not know about EditorConfig until a few weeks ago. I would consider it a feature because it takes care about some things.

tajmone commented 2 years ago

Oops. Now I messed up something with my removal of the PureBasic IDE preferences at the end of the test file.

It's fine, I've rebased the commit and solved all conflicts using --ours.

Just now I had the idea that the EditorConfig utilization might be worth mentioning in the README. As far as I know it also requires the third-party package to be installed.

On many modern editors it's supported out of the box, whereas others require a third party plug-in (e.g. Sublime Text).

That is not something users might be aware of. In fact I did not know about EditorConfig until a few weeks ago.

It might be worth mentioning in the CONTRIBUTING document that we use EditorConfig for code style consistency and provide a link to the official repository, which also lists all the plugins, etc. I've already written this text in many repositories, so I can reuse the paragraph and paste it in CONTRIBUING.md.

I would consider it a feature because it takes care about some things.

In most repositories I use the .editorconfig settings to validate commits and PRs for code consistency; we also use it on the PB IDE repository to filter out noise from PRs — you wouldn't believe how many PRs add noise such as switching from space indentations to tabs every changed file, and other aesthetic changes which make it impossible to see read through the commits diffs.

Unfortunately, the validation tool I've been using so far is a bit buggy and has been discontinued for a long time. I've found a replacement tool, but it had a bug that prevented using it on Windows; the bug was now fixed, and I'm just waiting that the Node package is updated with the new version then I'll switch all my repositories to use the new validator (it's a matter of weeks and it should be ready).

Locally, I use a tweaked version of the validation script as a pre-commit Git hook to check all modified files for code consistency, so I don't push cluttered contents on my own repositories.

tajmone commented 2 years ago

Updated CONTRIBUTING.md

I've updated CONTRIBUTING.md, as you suggested, mentioning the use of EditorConfig to enforce code styles consistency, and providing a link to the EditorConfig package for Sublime Text.

I've also pasted over the instructions that I wrote for the PB IDE repository on how to correctly set the PD IDE to prevent settings from being saved in the tests sources files (see: original doc on PB repos).