-
-
Notifications
You must be signed in to change notification settings - Fork 8
Glob ignores #103
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
Glob ignores #103
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #103 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 21 22 +1
Lines 1506 1648 +142
==========================================
+ Hits 1506 1648 +142 ☔ View full report in Codecov by Sentry. |
f637f79 to
1d32faf
Compare
92e38c6 to
d303b8d
Compare
cpp_linter/common_fs/file_filter.py
Outdated
| Results are added accordingly to the `ignored` and `not_ignored` attributes. | ||
| """ | ||
| if paths: | ||
| for path in paths.split("|"): |
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.
I have to make sure that | is not a part of the Unix glob style syntax. If it is, then we'll have to change the pattern here (|) to something that isn't part of the glob style syntax (maybe like ;|).
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.
- https://en.wikipedia.org/wiki/Glob_(programming)
- https://man7.org/linux/man-pages/man7/glob.7.html
Both don't mention | as part of the Unix style glob syntax. I think we're good to go here?
fix version remove unused import use the file filter class instance better
- allow specifying `./` as pattern in CLI positional args - improve memory footprint on FileFilter objects - derive from UserDict to keep instances of Args unique - remove obsolete test
Now, each FileObj gets its own tidy_advice and format_advice attributes. No more passing around advice arrays and expecting to match them to a file.
|
I know this one got a little out of control. One small refactor led to another and another... With the goal of cpp-linter/cpp-linter-action#233 accomplished, I'm ready to do a second round of testing and then begin merging this upstream. |
satisfy ideas stated in cpp-linter/cpp-linter-action#233
This basically allows better reuse of code for filtering files. We can now filter all files (globally) and further filter files based on tool-specific patterns given by the new
--ignore-tidyand/or--ignore-formatoptions.Any generated advice from clang tools is now stored in
FileObjattributes. This allows better handling of advice per file. Previously, clang-tidy and clang-format were expected to run on all files, but this is not guaranteed now.The collection of parsed CLI args is passed around instead of passing only relevant argument values. This keeps