- 
                Notifications
    You must be signed in to change notification settings 
- Fork 8
confgen(table): add a specifier to ignore some rows #259
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
base: master
Are you sure you want to change the base?
Conversation
         Kybxd
  
      
      
      commented
      
            Kybxd
  
      
      
      commented
        Jun 19, 2025 
      
    
  
- close confgen(IgnoreRows): add a specifier to ignore some rows of data #256
| Codecov ReportAttention: Patch coverage is  
 
 Additional details and impacted files@@            Coverage Diff             @@
##           master     #259      +/-   ##
==========================================
+ Coverage   71.28%   71.31%   +0.03%     
==========================================
  Files          83       83              
  Lines       10342    10353      +11     
==========================================
+ Hits         7372     7383      +11     
  Misses       2404     2404              
  Partials      566      566              ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
|  | ||
| func (r *RowCells) Ignored() bool { | ||
| if cell, err := r.Cell("#IGNORE", false); err == nil { | ||
| if ok, _ := xproto.ParseBool(cell.Data); ok { | 
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.
DO NOT ignore func returned error!
If encounterd error, the process should crash and report the error.
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.
This is meant to accept any values on #IGNORE column, but only those where xproto.ParseBool returns true are recognized as ignoring this line.
| return "" | ||
| } | ||
|  | ||
| func ParseBool(value string) (bool, error) { | 
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.
For public func, should add func comment.
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.
done
| // trim integer boring suffix matched by regexp `.0+$` | ||
| if matches := types.MatchBoringInteger(value); len(matches) > 1 { | ||
| return strconv.ParseBool(matches[1]) | ||
| } | 
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.
Any reason to do this special converting?
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.
This is the original logic in purifyInteger, which is deleted by this merge request.