mojaloop / design-authority-project

This is the Issue and Decision Log for tracking mojaloop and related Designs
1 stars 2 forks source link

OSS-Core coding discussion points #60

Closed NicoDuvenage closed 1 year ago

NicoDuvenage commented 3 years ago

Request:

Claudio Viola raised some discussion points which is scheduled to be discussed on 29 July 2020.

1) I see a lot of big functions and big files, would be useful to discuss linting for cyclomatic complexity , function length, module length, newspaper order. Not sure if standard.js supports it… but we could see if it is possible to add the rule without affecting existing code

2) Is there any background behind not ordering database seeds file by datetime in the filenames e.g. 202005011037_seedname.js instead of just seedname.js? should we start doing that?

3) I noticed we always return true when we are consuming kafka messages and I am wondering if there is some history behind return true in case of an error? Here are some links https://github.com/mojaloop/central-ledger/blob/master/src/handlers/positions/handler.js#L241 https://github.com/mojaloop/central-services-stream/blob/master/src/kafka/consumer.js#L393 . Also the tests existing since they test for ‘true’ will always be passing even if some function inside is throwing as we are not checking correctly the stubs arguments. I have seen this in many places, example https://github.com/mojaloop/central-ledger/blob/master/test/unit/handlers/positions/handler.test.js#L296

Artifacts:

Decision(s):

Follow-up:

Dependencies:

Accountability:

Notes:

elnyry-sam-k commented 3 years ago

For #2 here: https://github.com/mojaloop/project/issues/1444

godfreykutumela commented 3 years ago

Hi, @elnyry-sam-k, do you perhaps know the status of this issue?

elnyry-sam-k commented 3 years ago

hi @godfreykutumela , let me follow this up with Miguel, this will need some implementation support and will fall under 'technical-debt', I suppose.

MichaelJBRichards commented 1 year ago

MdB: can't change names of seeds, because builds use them. MdB: lint is fine, don't think anything needs to be done. MdB: 3 can be fixed by adopting the vNext library. This is not a simple thing (PSB) PSB: 3 is fixed in vNext. MdB: this is not for the Kafka library to fix. Agreed that nothing needs to be done.