Visitar URL original
Fix all initialism errors in the codebase · Issue #16623 · mattermost/mattermost · GitHub
Skip to content

Fix all initialism errors in the codebase #16623

Open

Description

@agnivade

Summary

This ticket is about fixing any variable naming issues that do not follow the initialism convention as laid out in: https://github.com/golang/go/wiki/CodeReviewComments#initialisms.

The way to go about it would be to make the following change to .golangci.yml

diff --git a/.golangci.yml b/.golangci.yml
index 29d9a4622..662931923 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -49,7 +49,7 @@ issues:
 
     - linters:
       - golint
-      text: "should have|should be|should replace|stutters|underscore|annoying|error strings should not be capitalized"
+      text: "should replace|stutters|underscore|annoying|error strings should not be capitalized"
 
     - linters:
       - golint      

And then fix all issues that arise until make golangci-lint passes with no errors.

Activity

  1. simoncampion commented on Jan 4, 2021

    @simoncampion
    Contributor

    I'd like to work on this.

  2. agnivade commented on Jan 4, 2021

    @agnivade
    ContributorAuthor

    All yours @SimonSimonB !

  3. agnivade commented on Feb 5, 2021

    @agnivade
    ContributorAuthor

    Reopening this is not yet fully fixed.

  4. haardikdharma10 commented on Feb 5, 2021

    @haardikdharma10
    Contributor

    Hi @agnivade, I have managed to fix few of the errors (Mainly in /utils). Can I open a draft PR?

  5. agnivade commented on Feb 6, 2021

    @agnivade
    ContributorAuthor

    You are most welcome to do that. But ensure to coordinate with @SimonSimonB so that work is not duplicated. :)

  6. 31 remaining items

  7. removed their assignment
    on Sep 17, 2024
  8. drashtiv03 commented on Apr 7, 2025

    @drashtiv03

    Hey @amyblais! I would like to work on this issue. Could you please assign it to me?

  9. art1-code commented on Nov 17, 2025

    @art1-code

    Hi! Is this issue still open for contribution, @amyblais ? If so, I’d like to work on it . Will be my first contribution.

  10. amyblais commented on Nov 17, 2025

    @amyblais
    Member
  11. art1-code commented on Nov 17, 2025

    @art1-code

    Hi @amyblais, I identified the following line in the .golangci.yml:

    - linters: - revive text: var-naming|error-naming|exported|increment-decrement|error-strings|if-return|unused-parameter|blank-imports|empty-block

    It seems that revive is explicitly ignoring var-naming, which also suppresses initialism errors.
    To work on this issue, would it be acceptable for me to temporarily remove var-naming from this exclusion so I can properly surface and fix the initialism warnings?

  12. amyblais commented on Nov 18, 2025

    @amyblais
    Member

    Hi @art1-code, I'm not a developer and I won't be able to adequately answer the question. Please come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

  13. hanzei commented on Nov 18, 2025

    @hanzei
    Contributor

    Yes @art1-code that approach is fine 👍

  14. art1-code commented on Nov 24, 2025

    @art1-code

    I had some issues (just as expected) with the golangci-lint version, but i resolved them and now i'm working on the solution.

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