Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Fixes to main branch + fixes to previously merged features #7

Merged
merged 5 commits into from Oct 12, 2021

Conversation

kittyandrew
Copy link
Contributor

@kittyandrew kittyandrew commented Aug 30, 2021

List of changes:

  • Added --inline flag which hides an error line when the number of lines to show is set to 0. Since it's an offset for additional lines IMO 0 should still show the line with an error itself. At least I need this feature, if you don't like it, use the --inline flag, when setting number of additional lines to 0;
  • Fix to previously merged 'finalize' feature;
  • Fix for the empty regex warning, fixed an issue that complainers were mapped to regex string, but than tried to access them through Regex object (This is not working for regex for some reason. #6);
  • Fix to module imports
  • and some more (please, refer to commit messages)

P.S.: Even though module import seems to be fixed and is working as of now, I still couldn't manage to make renag pre-commit hook to import module properly, so had to remove the __init__.py file.
P.S. 2: There are still issues with examples folder and examples in the readme, but I really don't feel like fixing it as of today.

kittyandrew added 4 commits August 30, 2021 00:04
* fixed a bug in a finalize feature logic, which was caused by using a variable from previous loop, instead of properly-scoped variable. this lead to misbehavior (which is very hard to reproduce in different environments);
* fixed message for the complaints loading directory.
* put __init__.py back in the 'complaints' module, now it's working;
* added explicit option to enable 'inline' mode when the number of lines is 0, otherwise still show the error;
* fixed module import code (still broken for commit-hook, somehow);
* display full paths in errors;
* warn about 'glob' that is going to cause an error, because it's empty (the error will happen when renag tries to read the file, but it's a dir).
@kittyandrew
Copy link
Contributor Author

Appreciate the move to pyparsing btw, seems like a perfect solution to your proprietary iregex library (even though I just learned about it yesterday too).

When git executable is not present, renag should behave in the same way as it does in a normal directory.

But since it might lead to unexpected result, we warn user about the fact that executable is missing without checking whether it was intended to be a git repo or not.
@ryanpeach ryanpeach merged commit ec3adb1 into ryanpeach:main Oct 12, 2021
@ryanpeach
Copy link
Owner

Thanks for your contribution! It's great work.

Yeah I like "iregex" but pyparsing is better for this use case. I like iregex when I actually want to see regex string output.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants