Fix IRF-ATN-006 and IRF-ATN-009: Extract naming patterns and enforce file size limits#88
Conversation
…file size limits - IRF-ATN-006: Return CodingPattern objects from _extract_naming_patterns - IRF-ATN-009: Check min_file_size and max_file_size in train() - Adjust tests to not skip small mock files
AI Quality Gate ReportMode:
Duplication
Security
Logic
Advisory mode does not block merge. Review findings before strict mode is enabled. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b7a4672454
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| type=PatternType.NAMING, | ||
| name=f"function_{case}", | ||
| description=f"Uses {case} for function names", | ||
| frequency=count, |
There was a problem hiding this comment.
Aggregate naming pattern counts across files
When the default min_examples=3 is used, this stores each naming CodingPattern with only the count from the current file, while get_style_profile() filters profile.patterns by that per-pattern frequency. A codebase with three files that each contain one snake_case function has three examples overall, but no function_snake_case pattern is returned by extract_patterns()/patterns_found, so common naming conventions disappear unless enough examples happen to be in a single file.
Useful? React with 👍 / 👎.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Resolves IRF-ATN-006 and IRF-ATN-009.