-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix #78: log all warnings #101
Conversation
ddc0a88
to
c97d763
Compare
type LogLevel int | ||
|
||
const ( | ||
// debug message, write to debug logs only by logutils.Debug |
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.
comment on exported const LogLevelDebug should be of the form "LogLevelDebug ..."
// debug message, write to debug logs only by logutils.Debug | ||
LogLevelDebug LogLevel = 0 | ||
|
||
// information messages, don't write too much messages, |
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.
comment on exported const LogLevelInfo should be of the form "LogLevelInfo ..."
// only useful ones: they are shown when running with -v | ||
LogLevelInfo LogLevel = 1 | ||
|
||
// hidden errors: non critical errors: work can be continued, no need to fail whole program; |
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.
comment on exported const LogLevelWarn should be of the form "LogLevelWarn ..."
// tests will crash if any warning occured. | ||
LogLevelWarn LogLevel = 2 | ||
|
||
// only not hidden from user errors: whole program failing, usually |
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.
comment on exported const LogLevelError should be of the form "LogLevelError ..."
c97d763
to
c2bad40
Compare
1. Log all warnings, don't hide none of them 2. Write fatal messages (stop analysis) with error log level 3. Remove ugly timestamp counter from logrus output 4. Print nested module prefix in log 5. Make logger abstraction: no global logging anymore 6. Refactor config reading to config.FileReader struct to avoid passing logger into every function 7. Replace exit codes hardcoding with constants in exitcodes package 8. Fail test if any warning was logged 9. Fix calculation of relative path if we analyze parent dir ../ 10. Move Runner initialization from Executor to NewRunner func 11. Log every AST parsing error 12. Properly print used config file path in verbose mode 13. Print package files if only 1 package is analyzedin verbose mode, print not compiling packages in verbose mode 14. Forbid usage of github.com/sirupsen/logrus by DepGuard linter 15. Add default ignore pattern to folint: "comment on exported const"
c2bad40
to
2bfd746
Compare
No description provided.