Skip to content
This repository was archived by the owner on Jan 13, 2026. It is now read-only.

Consistent log/error capitalization#6673

Merged
antgamdia merged 6 commits into
vmware-tanzu:mainfrom
antgamdia:6672-consistent-log-error-case
Aug 23, 2023
Merged

Consistent log/error capitalization#6673
antgamdia merged 6 commits into
vmware-tanzu:mainfrom
antgamdia:6672-consistent-log-error-case

Conversation

@antgamdia
Copy link
Copy Markdown
Contributor

Description of the change

The log traces and the error messages have an inconsistent capitalization across the codebase; this PR is to fix it.
I have used some regexes like fmt.(New|Debug|Warn||Warning|Info|Error|Fatal|Panic)(f?)(S?)\(("|')\p{Ll}, connect\.\w+, fmt.(New|Debug|Warn||Warning|Info|Error|Fatal|Panic)(f?)(S?)\(("|')\p{Ll} to find any possible offending occurrence.

The rationale behind the transformation is:

  • fmt.errorf -> lowercase
    • exception: those errors using connect.... will be returned to the user, these ones remain capitalized (converted some existing ones which wasn't)
  • log.xxxx -> uppercase

Benefits

Consistent capitalization.

Possible drawbacks

Some tests might fail, but will fix them straight away.

Applicable issues

Additional information

The next step would be unifying the actual messages, but this is another yak to shave...

Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>

Conflicts:
	cmd/apprepository-controller/cmd/root.go
@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 22, 2023

Deploy Preview for kubeapps-dev canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 1742510
🔍 Latest deploy log https://app.netlify.com/sites/kubeapps-dev/deploys/64e4a0c9ecff3f0008366df5

@antgamdia antgamdia force-pushed the 6672-consistent-log-error-case branch from adec462 to 0e7b927 Compare August 22, 2023 11:41
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
@antgamdia antgamdia force-pushed the 6672-consistent-log-error-case branch from 0e7b927 to 1742510 Compare August 22, 2023 11:49
Copy link
Copy Markdown
Contributor

@absoludity absoludity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Antonio.

@antgamdia antgamdia merged commit 4a7ab79 into vmware-tanzu:main Aug 23, 2023
@antgamdia antgamdia deleted the 6672-consistent-log-error-case branch August 23, 2023 03:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Normalize log/error capitalization

3 participants