Open just-ero opened 1 year ago
I don't wanna hear any more about the dang config until the gosh darn MVP is done, or at least until ONE feature is done! 😠😆
@Dalet and @zysim have been talking about removing a selection of these rules from the file entirely. As mentioned in the original post, I believe this to be a bad idea, leading to inconsistent style (any contributor can just do whatever they feel like). This direction is harmful for the codebase in that it becomes difficult to browse and read the code in some places; a reader has to be constantly aware that the style can change at a whim and they have to adjust how they glance at member bodies. This adds unnecessary cognitive load on reading and contributing.
Beyond that, there are actually .editorconfig
severities which can suppress the suggestions in an IDE, which seemed to be @Dalet's main issue. Those are silent
(violations aren't visible to the user; still gets applied in formatting), and none
(rule is suppressed completely; this should not be used). This means that removing the rules is not necessary.
Leaving the rules in the file still shows intent.
I don't wanna hear any more about the dang config until the gosh darn MVP is done, or at least until ONE feature is done! 😠😆
Completely agree. I'm happy to have this issue lay dormant until a more appropriate time. I recommend adding a Post-MVP
milestone and issue label here on GitHub that can be applied to issues such as this.
Your effort is better spent on making some features instead so do that please. We can worry about this later. It really doesn't matter one bit at this stage.
Your effort is better spent on making some features instead so do that please. We can worry about this later. It really doesn't matter one bit at this stage.
I had already agreed with you, what gives?
What gives is that my phone is a bit far from the router and only your first message had shown up for me and I didn't know you were going to write another one.
142 introduced changes which have since been agreed-upon to be unfavorable; namely these lines in the root
.editorconfig
:https://github.com/leaderboardsgg/leaderboard-backend/blob/777ff4f40c66df16fe366a491972ce291d9b8ef3/.editorconfig#L102-L110
Expression-bodied members can break up the flow of reading and are otherwise detrimental to readability:
This issue's purpose is discussing and finding out which of these rules we truly want to enforce and which can be kept as-is. My opinion on this matter is that we should not simply remove any rules from the
.editorconfig
, as that will lead to inconsistent code style.My proposal is the following:
Properties and indexers (basically just special properties) often serve a simple, single purpose that can easily be simplified to a single line, much like their accessors:
The above raises some issues again; expression-bodied properties and indexers cannot be
set
methods ('value' does not exist in this context
). This is unlike methods, which indeed can bevoid
when expression-bodied. This is once again inconsistent and subject to further scrutiny.Expression-bodied lambdas when on a single line are obvious:
With all this said, I'm happy to hear the maintainers' thoughts and am happy to implement the changes myself accordingly.