-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Modularize pre_commit_linter #6024
Labels
Comments
apb7
pushed a commit
that referenced
this issue
Jan 2, 2019
* Fix hola's multiple choice question. * introduce utils.cache with tests * import operator * add trailing newline * trailing newlines * introduce FileCache to speed up lint checks * remove old open * fixes * fix superfluous-parens * nit fixes * reorganization * revert utils.cache * remove unused import * s/readlines/read_lines/ * use readlines on builtin file obj * merge get_data with get_lock * improvements to _FileCache * make FileCache public * avoid locking as much as possible * access FileCache directly * simpler naming * remove unused import * improve str usages * get lock in separate method
@brianrodri #6023 is complete now. Are you working on the other sub-tasks? |
@brianrodri how is this going? |
De-assigning for now; please re-assign to resume work. |
Linking #7305 since this is what we are trying to achieve |
seanlip
pushed a commit
that referenced
this issue
Aug 8, 2019
* Draft refactor similar logic * Compile regex in advance * Doc string for _check_file_type_specific_bad_pattern
7 tasks
kevintab95
added
the
enhancement
Label to indicate an issue is a feature/improvement
label
Aug 30, 2022
I'm going to close this as too-low priority since the linter seems to be working fine atm. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pre_commit_linter.py
currently suffers from a lot of duplicate/complicated code. As a consequence, the file is extremely hard to optimize, and only grows harder to do so as time goes on. We'd like to split the functions into smaller modules (classes, functions, new files/modules), anything to help make the code more reasonable and easier to update and maintain.Here are a list of starter items that could be improved:
Ideally, each of these issues should be managed by some sort of new module/class/set of functions which provides an interface that allows us to make optimizations without changing the overall behavior of the linter. Crucially, we should also be able to add tests to make that behavior provably correct moving forward.
The text was updated successfully, but these errors were encountered: