Skip to content

Don't use underscores in function names #9586

Closed

Activity

  1. juanvallejo commented on Jun 27, 2016

    @juanvallejo
    Contributor

    @smarterclayton There are a few api files with functions that have underscores in them as well, should all of these be targeted as well?

    I have used this line to target all files containing functions with underscores, hope it helps:
    ack --ignore-file=match:/.+\_test\.go/ --type-set=bargo:match:/.+\.go/ --bargo "([a-zA-Z0-9]+\_[a-zA-Z0-9]+)\(" --ignore-dir=Godeps --ignore-dir=openshift.local.config --ignore-dir=pkg/assets 2>/dev/null

  2. smarterclayton commented on Jun 27, 2016

    @smarterclayton
    ContributorAuthor

    Only generated functions are allowed to have underscores. No other
    function, constant, or variable name in Kube or Openshift should have them
    except in special cases.

    On Jun 27, 2016, at 5:31 PM, Juan Vallejo [email protected] wrote:

    @smarterclayton https://github.com/smarterclayton There are a few api
    files with functions that have underscores in them as well, should all of
    these be targeted as well?

    I have used this line to target all files containing functions with
    underscores, hope it helps:
    ack --ignore-file=match:/.+test.go/ --type-set=bargo:match:/.+.go/
    --bargo "([a-zA-Z0-9]+
    [a-zA-Z0-9]+)(" --ignore-dir=Godeps
    --ignore-dir=openshift.local.config --ignore-dir=pkg/assets 2>/dev/null

    —
    You are receiving this because you were mentioned.
    Reply to this email directly, view it on GitHub
    #9586 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe/ABG_p0FUPkT4RMm56nS3JsPTTMyytMInks5qQEEogaJpZM4I_MkK
    .

  3. deads2k commented on Jun 28, 2016

    @deads2k
    Contributor
    pkg/serviceaccounts/controllers/create_dockercfg_secrets.go:137:func (e *DockercfgController) worker_inner() bool {
    pkg/cmd/server/origin/master.go:731:func (c *MasterConfig) api_v1beta3(all map[string]rest.Storage) *apiserver.APIGroupVersion {
    pkg/cmd/server/origin/master.go:750:func (c *MasterConfig) api_v1(all map[string]rest.Storage) *apiserver.APIGroupVersion {
    pkg/router/f5/f5.go:378:func (f5 *f5LTM) rest_request(verb string, url string, payload io.Reader,
    pkg/router/f5/f5.go:428:func (f5 *f5LTM) rest_request_payload(verb string, url string,
    pkg/service/controller/servingcert/controller.go:146:func (sc *ServiceServingCertController) worker_inner() bool {
    

    Fine, I might have done most of those.

  4. smarterclayton commented on Jun 29, 2016

    @smarterclayton
    ContributorAuthor

    MasterConfig is ok (since api_v1 might be different than apiv1)

    On Jun 28, 2016, at 4:51 AM, David Eads [email protected] wrote:

    pkg/serviceaccounts/controllers/create_dockercfg_secrets.go:137:func
    (e *DockercfgController) worker_inner() bool {
    pkg/cmd/server/origin/master.go:731:func (c *MasterConfig)
    api_v1beta3(all map[string]rest.Storage) *apiserver.APIGroupVersion {
    pkg/cmd/server/origin/master.go:750:func (c *MasterConfig) api_v1(all
    map[string]rest.Storage) *apiserver.APIGroupVersion {
    pkg/router/f5/f5.go:378:func (f5 *f5LTM) rest_request(verb string, url
    string, payload io.Reader,
    pkg/router/f5/f5.go:428:func (f5 *f5LTM) rest_request_payload(verb
    string, url string,
    pkg/service/controller/servingcert/controller.go:146:func (sc
    *ServiceServingCertController) worker_inner() bool {

    Fine, I might have done most of those.

    —
    You are receiving this because you were mentioned.
    Reply to this email directly, view it on GitHub
    #9586 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe/ABG_p86DaZdJvplsVe6qUoU7ySaeHidhks5qQQq1gaJpZM4I_MkK
    .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions