Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify validation, resolve gocognit warnings #172

Merged

Conversation

atc0005
Copy link
Owner

@atc0005 atc0005 commented Jul 1, 2022

Create internal validation helper and use it to replace existing
validation logic used in methods identified by gocognit. The end
result is that the larger, more complex validation methods are
(hopefully) more concise and readable now.

I began the process of replacing the logic used by other validation
methods with validation helper calls, but have not finished the
conversion work. I plan to return to this with a future PR once
I've reviewed the remaining (unconverted) validation logic further.

Credit to Fabrizio Milo for sharing the original implementation:

refs GH-157

Create internal validation helper and use it to replace existing
validation logic used in methods identified by gocognit. The end
result is that the larger, more complex validation methods are
(hopefully) more concise and readable now.

I began the process of replacing the logic used by other validation
methods with validation helper calls, but have not finished the
conversion work. I plan to return to this with a future PR once
I've reviewed the remaining (unconverted) validation logic further.

Credit to Fabrizio Milo for sharing the original implementation:

- https://stackoverflow.com/a/23960293/903870
- https://github.com/Mistobaan

refs GH-157
@atc0005 atc0005 added bug Something isn't working linting labels Jul 1, 2022
@atc0005 atc0005 added this to the v2.7.0 milestone Jul 1, 2022
@atc0005 atc0005 self-assigned this Jul 1, 2022
@atc0005 atc0005 merged commit faba5a5 into master Jul 1, 2022
@atc0005 atc0005 deleted the fix-gocognit-linting-errors-for-adaptivecard-support branch July 1, 2022 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working card format/adaptivecard Adaptive Card support linting validation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant