extend docs#334
Merged
Merged
Conversation
- Rename --coloredLog flag to --color for better CLI convention - Auto-disable colors when logging to file to prevent ANSI codes - Support manual override with --color=true/false flag - Fix flag detection by checking root command flags for subcommands Tests: - Add 5 unit tests for logging behavior in cmd/root_test.go - Add 8 e2e tests for comprehensive logging verification - Update existing tests to use new --color flag name Documentation: - Update getting_started.md with Linux and Windows installation/usage - Update scanning.md to use new --color flag - Add container registry scanning section to GitLab methodology All tests passing (13/13 logging tests, all cmd tests pass)
- Check error return from FlagSet.Set() to satisfy errcheck linter - No functional changes, test still passes
- Replace hardcoded /tmp paths with t.TempDir() in logger tests - Fixes test failures on Windows where /tmp doesn't exist - All tests now pass on both Linux and Windows
- Removed TestInitLogger_ConsoleDefault, TestInitLogger_FileOutputAutoDisablesColor, TestInitLogger_FileOutputWithExplicitColor, TestInitLogger_JsonOutput - These tests provided no value as they only called initLogger() without assertions - E2e tests already cover logging behavior by checking actual log file contents - Removed unused cobra import from root_test.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.