-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Start actual parsing * Remove walk export because it is Go specific * Add method to append targets 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. * Refactor parser and update tests 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. * Added Codecov validation and configuration 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%. * Enhanced parsing functionality 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. * Added default file handling in parser and scanner 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. * Updated README with new usage instructions 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. * Updated AST test and added new tests - 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 * Updated coverage targets in codecov config 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.
- Loading branch information
1 parent
b378b8d
commit e2fa3ed
Showing
10 changed files
with
373 additions
and
42 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: 75% | ||
threshold: 3% | ||
patch: | ||
target: 60% | ||
threshold: 10% |
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
Oops, something went wrong.