-
Notifications
You must be signed in to change notification settings - Fork 35
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @pablosichert ,
we are happy that you proactively go about improving the codebase, but think that this PR is too much at once..
- there are a some ongoing issue branches and we expect there will be merge conflicts, so someone would need to coordinate with @ottosichert and @wiadev to make sure those conflicts are dealt with (e.g. by also running those tool(s) in the respective branches)
- Both codeclimate and codacy see a lot of new issues..now I don't know javascript myself and I trust humans more than static code review tools, but still this makes me very nervous..
At least in java, so far when I saw both the issue-count raise and the GPA drop at the same time, and then looked at the changes, it never looked well.. - ..and here, because of the mass of changes, I can't even see what the tools actually complain about.
- We can't see any "real" code changes because of the formatting change. There might be stuff that worked the way it was, even if the code was bad (just ask the openSSL guys :-) )
- I'm also all in favour of a standardized formatting scheme, but then
- it would imho make sense to coordinate with and get agreement from the other devs that this formatting schema shall be used from now on and
- make one PR that contains only the formatting change. Then we could integrate that without looking that the changes, and still be sure that no logic changed.
I'm not sure if I made it clear enough: I appreciate your effort a lot. Still, I'm afraid it might cause more trouble than good.
WDYT?
Hi @metas-ts, thanks for having a look at this - your concerns are more than valid.
I really think it would be beneficial in the long run to apply this PR now, even though we can't be sure that nothing breaks. We might run into a couple of bugs along the way, but those we'll finally be able to tackle in a automated regression test. I can't estimate the potential short-term business impact on this one, and would like to defer that question to those holding a stake in this regard. But I advise that going forward with such an unhealthy code base will lead to choking in the long run. I have no intention to merge this until we didn't actually get the total number of issues down that are reported by the external tools. @ottosichert, @wiadev - please join in on this discussion. |
Summary
Hello,
This morning @pablosichert informed me about this PR he had planned - there are no branches open I work on which would conflict with this PR (I will continue with #1239 after this discussion). I don't know about @wiadev but I see there still is this PR open: #1229. But also:
l looked through the changes made by prettier in b5d6723 and I couldn't spot any severe issues. I've personally never used prettier or a similar tool as I always start with a strict eslint config such as
I can confirm codebeat collapses under the amount of issues and doesn't show anything. My experience with codebeat showed that some rules are too strict when used with react, e.g. if (foo) {
list.forEach((item) => {
// good?
item.bar && item.baz();
// bad
if (item.bar) {
item.baz();
}
}
}
AFAIK prettier only applies fixes for formatting rules and no real codemods like
I totally agree here. I sent @pablosichert my preferred Also a dedicated PR for the eslint rules allows for fine-grained coordination of all team members by review comments per line. The only concern I really have is the missing testing suite.
Setting it up is essential and will benefit this codebase more than any new feature. This is why I also think it is a good idea to resolve this issue now. I am aware this workload will prevent us from delivering new features and important bugfixes for at least two days (excluding setting up the testing suite) but I strongly suggest this move as it's only a question of time when this step has to be done. The point is, you, @metas-ts and maybe @metasnw, have to approve this step as you can assess the economic practicability. |
Just to be clear on this one: I don't think we need to rush a decision immediately - I can discard the changes and apply them at a later point, since most of the changes are done automatically anyway. But I propose that we pin down a specific date, as soon as possible, where we apply those drastic changes spanning over the whole code base. In any case, there won't be a perfect point in time to do it. |
Hi @pablosichert @ottosichert Some further notes from my side:
|
agree |
Sounds good 👍🏻 Let‘s aim to not have any open PRs on Friday evening, so we can make the transition as easy as possible. |
until friday, let's see how many conflicts we will accumulate here. If it's easy to do it, i would suggest to redo this instead of handling conflicts if they are to many (i find it error prone). |
Yes, there is no point in picking this up when master has moved on. Closing this and will reevaluate again on Friday evening. |
This PR introduces a plugin that transforms all code automatically to conform with linting rules.
With this change we can run
on the CI build and fail it if there's some inconsistency caught by the linter.
There's about 1500 errors left that need to be resolved manually.
EDIT: If we leave out
prop-type
checking, there's only about 100 errors left.(edit by ts: #1206)