-
Notifications
You must be signed in to change notification settings - Fork 0
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
Basic parsing #9
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A new method has been added to the TargetList struct. This method allows appending a target to the existing list of targets in an efficient manner.
The Parser has been refactored for improved readability and efficiency. The NewParser function now directly initializes the Scanner within the Parser struct, eliminating an unnecessary variable. The parseRule function has been streamlined to handle target parsing inline, removing the need for a separate parseTargets function. Error handling is also improved with early returns on error conditions. Corresponding changes have been made in parser_test.go to reflect these modifications in the Parser structure and behavior.
Introduced a new makefile target 'validate_codecov' to validate the codecov.yml file. Also, added a new codecov.yml file with project coverage settings - setting the target coverage at 75% and threshold at 3%.
Added new methods to the Parser struct in parser.go for improved parsing of rules, prerequisites and recipes. Also added corresponding tests in parser_test.go to ensure correct functionality. The ast.go file was updated with a method to append prerequisites to PreReqList.
In this update, we've added a check for nil files in both the Parser and Scanner constructors. If a nil file is passed, a new one is created with maximum integer size. Additionally, we've exposed the NewFileSet function from the token package for external use.
The README has been updated to reflect changes in the usage of the make.Parser, make.Scanner, and make.ScanTokens. The previous scanning utilities section has been replaced with a more detailed explanation on how to use these functions. Additionally, redundant future plans have been removed from the document.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9 +/- ##
==========================================
- Coverage 95.72% 93.57% -2.15%
==========================================
Files 7 7
Lines 374 436 +62
==========================================
+ Hits 358 408 +50
- Misses 12 21 +9
- Partials 4 7 +3 ☔ View full report in Codecov by Sentry. |
- Corrected the expected position after final recipe in AST test - Added a new test to check if given target is appended correctly - Fixed typo in PreReqList description - Added a new test to verify if given prereq is appended as expected - Extended Parser and Scanner tests to support nil *token.File value
Added new patch coverage target and threshold to the codecov configuration. The patch target is set at 60% and the threshold at 10%. This will help ensure that new code changes maintain a certain level of test coverage.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.