-
Notifications
You must be signed in to change notification settings - Fork 42
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
Ignore the log files when they are generated #236
Conversation
Some additional information:
|
The tests failed because the stub of argParser does not work anymore with my change. |
Create two functions in the common module to get the full path of the log files (debug log and reporter log) anywhere in the script. It will avoid duplicate reference to the names of the log files. Then whitelist the log file(s) generated to avoid reporting warnings. Note that log files generated from another run will still be reported.
Fix the existing tests by adding the arguments "reporter" and "enable_debug_log" in the stub of argparser (Args()). Create new test cases to validate the log files are correctly ignored or reported. Also improve a bit the code in check_file_whitelist: check if the file needs to be ignored at the very beginning of the loop since the the other check (using regex) requires more lines to be executed.
e7813f8
to
9c52179
Compare
There are a lot of use cases for this tool, namely via pipelines. I am not sure I like the idea of ignoring specific files that may end up bundled with the addon submission. Another option is to make it platform dependent and make it log by default to the standard log location per platform (/var/log/addon-check on linux, ~/Library/Logs/ on osx, etc) and at the end of the execution state the log can be found in xxxx ? |
I came up with this solution because I thought requesting a path for the log files would break the compatibility with previous versions but your idea of using a default path solves this 🙂 I agree this PR adds a risk of submitting ignored files when used in pipelines so I will push a new update implementing your ideas. Thank you for suggesting them @enen92 👍 |
Should we close this until you find time to work on this again? |
I can't believe it's been 4 months already... |
Fixes #233
log files (debug log and reporter log) anywhere in the script. It
avoids duplicate reference to the names of the log files to keep the code DRY.