• Kubernetes Submit Queue's avatar
    Merge pull request #51684 from tcharding/lint-plugins-env · 9793bb30
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 51031, 51705, 51888, 51727, 51684). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..
    
    kubectl: Fix golint warnings for plugins/*
    
    **What this PR does / why we need it**:
    
    We currently have an entry in `hack/.golint_failures` for `pkg/kubectl/plugins`. If we lint the files in `plugins/` then we can safely remove this entry.
     
    `golint` emits the following warnings (only one of each type shown)
    ```
    exported method EnvList.Slice should have comment or be unexported
    error var IncompletePluginError should have name of the form ErrFoo
    func name will be used as plugins.PluginsEnvVarPluginLoader by other packages, and that stutters; consider calling this EnvVarPluginLoader
    ```
    
    This PR clears all `golint` warnings from `kubectl/plugins/`.
    
    1. Remove entry from `hack/.golint_failures`
    2. Add missing documentation to exported types and functions.
    3. Rename error variables to `ErrFoo`.
    4. Rename `PluginsEnvVarPluginLoader` to `KubectlPluginsPathPluginLoader` (mirrors env var name).
    5. Rename `XDGDataPluginLoader` to `XDGDataDirsPluginLoader` (to make uniform change above).
    
    **Special notes for your reviewer**:
    
    Felt a bit dirty doing this cleanup because the code in `plugins/` is particularly clean and well written already.
    
    **Release note**:
    
    ```release-note
    NONE
    ```
    /sig cli
    /kind cleanup
    9793bb30
Name
Last commit
Last update
..
api Loading commit data...
apimachinery/tests Loading commit data...
apis Loading commit data...
auth Loading commit data...
bootstrap/api Loading commit data...
capabilities Loading commit data...
client Loading commit data...
cloudprovider Loading commit data...
controller Loading commit data...
credentialprovider Loading commit data...
features Loading commit data...
fieldpath Loading commit data...
generated Loading commit data...
hyperkube Loading commit data...
kubeapiserver Loading commit data...
kubectl Loading commit data...
kubelet Loading commit data...
kubemark Loading commit data...
master Loading commit data...
printers Loading commit data...
probe Loading commit data...
proxy Loading commit data...
quota Loading commit data...
registry Loading commit data...
routes Loading commit data...
security Loading commit data...
securitycontext Loading commit data...
serviceaccount Loading commit data...
ssh Loading commit data...
util Loading commit data...
version Loading commit data...
volume Loading commit data...
watch Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...