Skip to content
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

Merged
merged 1 commit into from
Jun 14, 2018
Merged

Fix #78: log all warnings #101

merged 1 commit into from
Jun 14, 2018

Conversation

jirfag
Copy link
Member

@jirfag jirfag commented Jun 13, 2018

No description provided.

type LogLevel int

const (
// debug message, write to debug logs only by logutils.Debug
Copy link
Collaborator

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,
Copy link
Collaborator

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;
Copy link
Collaborator

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
Copy link
Collaborator

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 ..."

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"
@jirfag jirfag merged commit 9181ca7 into master Jun 14, 2018
@golangci golangci deleted the feature/log-all-warnings branch June 16, 2018 09:49
@ldez ldez added this to the v1.7 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants