Closed petrspelos closed 2 years ago
@petrspelos We missed this during the planning because the issue is not added to the project. My bad. For the future, feel free to add it into to project in the sidebar on the right :)
This is an important issue so the project can stay clean and healthy. I will try to incorporate it inside the current sprint but need to check how we are doing regarding capacity. I could probably take this on myself.
Mentioning @TomasNiemczyk98 @TerezaSkutova. Please look into sonar cloud or GitHub PRs and you can see there is a lot of warning regarding this problem. Read it through and give us any feedback if you find Peter's proposed solution as not ideal.
@PlesnikJakub I am going to modify the input objects according @petrspelos's suggestion
Summary
We are currently experiencing the following code smell as reported by Sonarcloud:
Parameter validation in "async"/"await" methods should be wrapped
This can be fixed by a couple of data type changes.
Describe the solution you'd like: Changing every Input Objects' type to
readonly struct
would mean it cannot be null. This would remove the need for parameter validation (specifically checking if input is null in every use case), which would in turn resolve the Sonarcloud problem.All input validation should be done in its constructor!
Describe alternatives you've considered: Removing / Altering the Sonarcloud rule