Skip to content

Conversation

okhowang
Copy link
Contributor

@okhowang okhowang commented Jun 1, 2022

close #693

Copy link
Collaborator

@chavacava chavacava left a comment

Choose a reason for hiding this comment

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

Hi @okhowang, thanks for the PR.
I've left some comments on it.
I've also tested the rule on kubernetes codebase and some problems shown-up:

  1. nil pointer dereferences
  2. data-races (on checkPackageCommentCache)

@okhowang okhowang force-pushed the feat/package-comment branch 3 times, most recently from e3775e5 to d74bab7 Compare June 2, 2022 03:42
@okhowang okhowang force-pushed the feat/package-comment branch 2 times, most recently from 168ad3b to 8c25370 Compare June 2, 2022 07:40
@chavacava
Copy link
Collaborator

chavacava commented Jun 18, 2022

Hi @okhowang thanks for the PR updates.
At its current state, the PR does not pass rule's tests

@okhowang okhowang force-pushed the feat/package-comment branch from 8c25370 to d84cde1 Compare June 19, 2022 08:40
@okhowang
Copy link
Contributor Author

@chavacava just because outdate matching pattern. updated

@chavacava chavacava merged commit 387d727 into mgechev:master Jun 19, 2022
subham-deepsource pushed a commit to DeepSourceCorp/revive that referenced this pull request Aug 5, 2022
Signed-off-by: subham sarkar <subham@deepsource.io>
subham-deepsource pushed a commit to DeepSourceCorp/revive that referenced this pull request Aug 5, 2022
Signed-off-by: subham sarkar <subham@deepsource.io>
subham-deepsource pushed a commit to DeepSourceCorp/revive that referenced this pull request Aug 5, 2022
Signed-off-by: subham sarkar <subham@deepsource.io>
subham-deepsource added a commit to DeepSourceCorp/revive that referenced this pull request Aug 5, 2022
* Separating lib from cli (mgechev#655)

* Separating lib from cli

* Renamed NewRevive to New

* Added GetLintFailures helper function

* Moved formatter to call to format since that's when it's needed

* makes fields of Revive struct non-public

* minor modifs in tests: remove unnamed constats

* Added lint package management to lint command

* README message for using revive as a library

* README formatting

* Removed unused method

* Slightly improved wording in README

* Handling format errors

* Renaming file to better reflect intent

* Refactoring pattern usage

* README heads

* renames excludePaths into excludePatterns

Co-authored-by: Bernardo Heynemann <bernardo.heynemann@coinbase.com>
Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
Signed-off-by: subham sarkar <subham@deepsource.io>

* Update the contributors list

Signed-off-by: subham sarkar <subham@deepsource.io>

* Remove debugging output (mgechev#672)

Noticed during migration from our heavily modified "go-lint" to "revive" that there is an additional line printed. I am unsure that the convention for this project is on this, we do not allow adding such a call.

Signed-off-by: subham sarkar <subham@deepsource.io>

* Remove built-in types that existing only for the Go documentation (mgechev#675)

Since these types only exist for documenting Go's standard library there
should be no reason to mark them.

Closes mgechev#673

Signed-off-by: subham sarkar <subham@deepsource.io>

* Fix/677 (mgechev#678)

Signed-off-by: subham sarkar <subham@deepsource.io>

* Lint cleanup (mgechev#679)

Signed-off-by: subham sarkar <subham@deepsource.io>

* add rule datarace (mgechev#683)

Signed-off-by: subham sarkar <subham@deepsource.io>

* Fixes issue mgechev#619 imports-blacklist support regex (mgechev#684)

* Fixes issue mgechev#619 imports-blacklist support regex

* refactors method name and error message

* restores original test cases

Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
Signed-off-by: subham sarkar <subham@deepsource.io>

* fix(var-naming): set node to package name for underscore in package name (mgechev#689)

Setting the entire file AST as the node causes golangci-lint to print
the entire file source as the context, and line and column numbers set
to 1. Point to the package name node instead.

Closes mgechev#688

Signed-off-by: subham sarkar <subham@deepsource.io>

* fix(deps): update module golang.org/x/tools to v0.1.11 (mgechev#696)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Signed-off-by: subham sarkar <subham@deepsource.io>

* fix(deps): update github.com/chavacava/garif digest to 908ad76 (mgechev#695)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Signed-off-by: subham sarkar <subham@deepsource.io>

* fix(receiver-naming): distinguish types with parameters (mgechev#692)

* fix(receiver-naming): distinguish types with parameters

* chore: run tests using supported Go versions matrix

Signed-off-by: subham sarkar <subham@deepsource.io>

* Make package comment more confident (mgechev#694)

Signed-off-by: subham sarkar <subham@deepsource.io>

* fix(deps): update github.com/chavacava/garif digest to d6fd61e (mgechev#699)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: subham sarkar <subham@deepsource.io>

* fix issue mgechev#691 (mgechev#700)

Signed-off-by: subham sarkar <subham@deepsource.io>

* fix(deps): update github.com/chavacava/garif digest to 9351721 (mgechev#702)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: subham sarkar <subham@deepsource.io>

* Allow to customize user functions in rule `error-strings` (mgechev#703)

* Allow to customize user functions in rule `error-strings`

* Rollback the Available Rules table format in README

* adds memoization of the rule's configuration

Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
Signed-off-by: subham sarkar <subham@deepsource.io>

* doc: add devlake to README usage (mgechev#704)

Co-authored-by: linyh <yanghui@meri.co>
Signed-off-by: subham sarkar <subham@deepsource.io>

* Check whether the tag name is duplicate or not (mgechev#706)

* Check whether the tag name is duplicate or not

* - minor refactoring
- continues checking tag even if name is repeated

* adds test cases for duplicated tag names

* adds test case with two tag types (json & yaml)

* Fix allow the same tag name in different tag key

* fix checks on protobuf tag names

Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
Signed-off-by: subham sarkar <subham@deepsource.io>

* fix mgechev#670 (mgechev#708)

Signed-off-by: subham sarkar <subham@deepsource.io>

* Fix module name

Signed-off-by: subham sarkar <subham@deepsource.io>

Co-authored-by: Bernardo Heynemann <heynemann@gmail.com>
Co-authored-by: Bernardo Heynemann <bernardo.heynemann@coinbase.com>
Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
Co-authored-by: mgechev <mgechev@gmail.com>
Co-authored-by: Markus Zimmermann <markus.zimmermann@symflower.com>
Co-authored-by: Markus Zimmermann <markus.zimmermann@nethead.at>
Co-authored-by: Yudai Takada <13041216+ydah@users.noreply.github.com>
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ivan Trubach <mr.trubach@icloud.com>
Co-authored-by: okhowang <3352585+okhowang@users.noreply.github.com>
Co-authored-by: hulk <hulk.website@gmail.com>
Co-authored-by: likyh <l@likyh.com>
Co-authored-by: linyh <yanghui@meri.co>
phlogistonjohn added a commit to phlogistonjohn/go-ceph that referenced this pull request Aug 10, 2022
A recent change in revive broke the package-comments rule when .go files
are input individually.
(see mgechev/revive#694)

See the comment within for more info.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
phlogistonjohn added a commit to phlogistonjohn/go-ceph that referenced this pull request Aug 11, 2022
A recent change in revive broke the package-comments rule when .go files
are input individually.
(see mgechev/revive#694)

See the comment within for more info.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
mergify bot pushed a commit to ceph/go-ceph that referenced this pull request Aug 12, 2022
A recent change in revive broke the package-comments rule when .go files
are input individually.
(see mgechev/revive#694)

See the comment within for more info.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
@okhowang okhowang deleted the feat/package-comment branch October 25, 2022 02:17
gilesbradshaw pushed a commit to gilesbradshaw/try-tea that referenced this pull request Oct 26, 2023
There was an unintended change to the rule in revive that now makes our CI trip:
mgechev/revive#694
The package-comments now expected are not really worth writing as these are tiny internal packages, so this change just disables that rule for now.

Co-authored-by: Norwin <git@nroo.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/494
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package comment is not confidence
3 participants