Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: cron parser #19
feat: cron parser #19
Changes from 17 commits
9442a9b
9fba9c0
93188f4
125e9a2
2b11319
e645c9d
83b96f2
2085e6e
8c5bdd2
04b5bac
2127c8b
b3e8e86
fa1eeb7
85b972e
c801e43
71d6ceb
d1aa972
6004c79
1aca175
63204c5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Add unit tests for
replaceAll
.The function
replaceAll
is not covered by unit tests. It's crucial to add comprehensive unit tests for this function to ensure its reliability and correctness.Tools
GitHub Check: codecov/patch
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.
Add unit tests for
sanitizeLineBreaker
.The function
sanitizeLineBreaker
is not covered by unit tests. It's crucial to add comprehensive unit tests for this function to ensure its reliability and correctness.Tools
GitHub Check: codecov/patch
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.
Add unit tests for
sanitizeEmptyLine
.The function
sanitizeEmptyLine
is not covered by unit tests. It's crucial to add comprehensive unit tests for this function to ensure its reliability and correctness.Tools
GitHub Check: codecov/patch
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.
Add unit tests for
sanitizeComments
.The function
sanitizeComments
is not covered by unit tests. It's crucial to add comprehensive unit tests for this function to ensure its reliability and correctness.Tools
GitHub Check: codecov/patch
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.
Add unit tests for
sanitize
.The function
sanitize
is not covered by unit tests. It's crucial to add comprehensive unit tests for this function to ensure its reliability and correctness.Tools
GitHub Check: codecov/patch
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.
Add unit tests for
lines
.The function
lines
is not covered by unit tests. It's crucial to add comprehensive unit tests for this function to ensure its reliability and correctness.Tools
GitHub Check: codecov/patch
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.
Improve error handling and logging in
parseAsSpec
.The function
parseAsSpec
handles errors but does not log them, which could make debugging difficult. Consider adding logging before returning errors to provide more context about the failure.Committable suggestion
Tools
golangci-lint
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.
Validate configuration before returning in
ParseConfig
.The method
ParseConfig
constructs a configuration but does not perform any validation on the resulting configuration. It's a good practice to validate the configuration to catch any potential issues before the configuration is used elsewhere.Additionally, add unit tests for
ParseConfig
to ensure its reliability and correctness.Tools
GitHub Check: codecov/patch
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.
Add unit tests for
buildMapper
.The function
buildMapper
is not covered by unit tests. It's crucial to add comprehensive unit tests for this function to ensure its reliability and correctness.Tools
GitHub Check: codecov/patch
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.
Consider direct YAML serialization instead of using JSON as an intermediate format.
The function
generateYamlFromCfg
uses JSON marshaling and unmarshaling as intermediate steps before converting to YAML. This could lead to inefficiencies or potential data loss if the data types inconfig.Config
do not map cleanly to JSON. Consider using direct YAML marshaling if possible to avoid these issues.Committable suggestion