Change:
Generally: log-lines start with capital letters; error strings do not (unless it starts with an acronym like IP). We're not consistent with this. It should be relatively easy to audit these and fix-up.
Maybe an update/validate script so we can keep this consistent in the future too? See for example
Ideally this could be to golint or something, although sometimes it does make sense to start it with a capital letter. Running is not happy times.
Due to acronyms or are you thinking of something else?
Say you have some function that needs an environment variable set. It makes sense to see or something. You could argue that we could try to enforce something like , but it's not totally clear. There are other similar cases.
Replacing with where appropriate:
we could check if the first letter is part of a word that is capitalized and ignore lowercasing it in such a case. Maybe python would be better than sed in that case? Or extend golint? Not sure.
Right but what about if you're checking that a public struct member is set? . It might be worth just enforcing the check and rewriting error statements even for cases where it makes sense. Extend golint add some gometalinter python sed.
Ooh, notes that already does this, but you have to lower the . Then you get errors like this:
That message triggers on errors that end with punctuation with a 0.8 confidence level. It triggers on capitalized messages with a 0.6 confidence level.
if you're parsing Go source and taking actions from it you should really use  and do it "right"
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
/remove-lifecycle stale
/remove-priority awaiting-more-evidence I don't think and labels should be on the same issue. :) This issue looks like it's got sufficient evidence already.
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
/remove-lifecycle stale
I'm going to label this as a good first issue because it involves changing the error/log messages. /good-first-issue
This request has been marked as suitable for new contributors. Please ensure the request meets the requirements listed . If this request no longer meets these requirements, the label can be removed by commenting with the command. <detailsIn response to : I'm going to label this as a good first issue because it involves changing the error/log messages. Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
Hello. How can I identify all the places where this change needs to be done?
you can use something like
Thanks.
for an approach that will remain relevant to the future, it seems like an edit program using paired with a validation would be more appropriate than a one-off
So should we consider errors like "PublicStructMember must be set" legal?
Yes, they should be remain as-is and be considered legal. Thanks for your PR, that's a big change! :D
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
/remove-lifecycle stale
for eg: c.t.Fatalf("got encryptionConfig:n%qn, want encryptionConfig:n%q", got, want) needs to be changed to: c.t.Fatalf("Got encryptionConfig:n%qn, want encryptionConfig:n%q", got, want) or only strings in error.New() and fmt.Errorf() needs to be changed?
GitHub didn't allow me to assign the following users: ShivangGoswami. Note that only and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time. For more information please see <detailsIn response to : /assign Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
GitHub didn't allow me to assign the following users: ShivangGoswami. Note that only and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time. For more information please see <detailsIn response to : /assign </details
GitHub didn't allow me to assign the following users: ShivangGoswami. Note that only and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time. For more information please see <detailsIn response to : /assign </details
Only Kubernetes GitHub org members can be assigned. Even though you can't be assigned to the issue, please feel free to work on it. :)
Hello, I am interested to work on this. As far as my understanding goes, there is two issues here: existing cases a script that could be to CI to ensure compliance with this convention. While the first issue seems easy enough to approach (but quite long), I don't really know how to approach the second one properly. Does anyone have an idea about how this should be approached ?
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
I'm willing to pick this up.
Stale issues rot after 30d of inactivity. Mark the issue as fresh with . Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle rotten
Rotten issues close after 30d of inactivity. Reopen the issue with . Mark the issue as fresh with . Send feedback to sig-testing, kubernetes/test-infra and/or . /close
Closing this issue. <detailsIn response to : Rotten issues close after 30d of inactivity. Reopen the issue with . Mark the issue as fresh with . /close Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details

Discussion:
labels, err := cloud.GetVolumeLabels(name) if err != nil { // We don't really want to leak the volume here... <del> klog.Errorf("error building labels for new EBS volume %q: %v", name, err) </del> <ins> klog.Errorf("Error building labels for new EBS volume %q: %v", name, err) </ins> } fstype := ""

// and we have to get the volume id from the nvme interface awsVolumeID, err := volumeID.MapToAWSVolumeID() if err != nil { <del> klog.Warningf("error mapping volume %q to AWS volume: %v", volumeID, err) </del> <ins> klog.Warningf("Error mapping volume %q to AWS volume: %v", volumeID, err) </ins> } else { // This is the magic name on which AWS presents NVME devices under /dev/disk/by-id/ // For example, vol-0fab1d5e3f72a5e23 creates a symlink at /dev/disk/by-id/nvme-Amazon_Elastic_Block_Store_vol0fab1d5e3f72a5e23 nvmeName := "nvme-Amazon_Elastic_Block_Store_" + strings.Replace(string(awsVolumeID), "-", "", -1) nvmePath, err := findNvmeVolume(nvmeName) if err != nil { <del> klog.Warningf("error looking for nvme volume %q: %v", volumeID, err) </del> <ins> klog.Warningf("Error looking for nvme volume %q: %v", volumeID, err) </ins> } else if nvmePath != "" { devicePaths = append(devicePaths, nvmePath) }

return devicePaths } <del> // Return cloud provider </del> <ins> // Returns cloud provider </ins> func getCloudProvider(cloudProvider cloudprovider.Interface) (*aws.Cloud, error) { awsCloudProvider, ok := cloudProvider.(*aws.Cloud) if !ok || awsCloudProvider == nil { <del> return nil, fmt.Errorf("Failed to get AWS Cloud Provider. GetCloudProvider returned %v instead", cloudProvider) </del> <ins> return nil, fmt.Errorf("failed to get AWS Cloud Provider. GetCloudProvider returned %v instead", cloudProvider) </ins> } return awsCloudProvider, nil

} volName := names[length-1] if !strings.HasPrefix(volName, "vol-") { <del> return "", fmt.Errorf("Invalid volume name format for AWS volume (%q)", volName) </del> <ins> return "", fmt.Errorf("invalid volume name format for AWS volume (%q)", volName) </ins> } if length == 2 { sourceName = awsURLNamePrefix + "" + "/" + volName // empty zone label