Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coding style for mock #806

Merged
merged 30 commits into from
Nov 10, 2020
Merged

Conversation

hlts2
Copy link
Contributor

@hlts2 hlts2 commented Oct 29, 2020

Signed-off-by: hlts2 hiroto.funakoshi.hiroto@gmail.com

Description:

I fixed coding style for mock and GitHub action.

WHY

  • In Vald, There are a lot of dependencies between libraries.
    As a result, the complexity of the test has increased, and it has become more difficult to determine whether or not to mock dependent objects and how to create mock.

  • if there are a lot of review dog comment, we can not see pr page. (review dog output warning because document has alot of example code. but we want to ignore it)

WHAT

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.15.2
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.12.1

Types of changes:

  • Bug fix [type/bug]
  • New feature [type/feature]
  • Add tests [type/test]
  • Security related changes [type/security]
  • Add documents [type/documentation]
  • Refactoring [type/refactoring]
  • Update dependencies [type/dependency]
  • Update benchmarks and performances [type/bench]
  • Update CI [type/ci]

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked open Pull Requests for the similar feature or fixes?
  • I have added tests and benchmarks to cover my changes.
  • I have ensured all new and existing tests passed.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly.

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
@hlts2 hlts2 requested a review from kevindiu October 29, 2020 03:19
@hlts2 hlts2 self-assigned this Oct 29, 2020
@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - add changelog comment
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase master

docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Show resolved Hide resolved
docs/contributing/coding-style.md Show resolved Hide resolved
docs/contributing/coding-style.md Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
hlts2 and others added 8 commits November 4, 2020 17:59
Co-authored-by: Kevin Diu <kevindiujp@gmail.com>
Co-authored-by: Kevin Diu <kevindiujp@gmail.com>
Co-authored-by: Kevin Diu <kevindiujp@gmail.com>
Co-authored-by: Kevin Diu <kevindiujp@gmail.com>
Co-authored-by: Kevin Diu <kevindiujp@gmail.com>
Co-authored-by: Kevin Diu <kevindiujp@gmail.com>
Co-authored-by: Kevin Diu <kevindiujp@gmail.com>
Co-authored-by: Kevin Diu <kevindiujp@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
hlts2 and others added 3 commits November 10, 2020 16:21
Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
hlts2 and others added 2 commits November 10, 2020 16:23
Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
docs/contributing/coding-style.md Show resolved Hide resolved
type MockEncoder struct {
EncoderFunc func(interface{}) ([]byte, error)
}

Copy link
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
This sentence does not start with an uppercase letter (UPPERCASE_SENTENCE_START)
Suggestions: Func
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING

docs/contributing/coding-style.md Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved

- Incomplete implementation
- I/O
- e. g. Network access, disk operation, or etc.
Copy link
Contributor

@kevindiu kevindiu Nov 10, 2020

Choose a reason for hiding this comment

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

Suggested change
- e. g. Network access, disk operation, or etc.
- e.g. Network access, disk operation, etc.

docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
kevindiu
kevindiu previously approved these changes Nov 10, 2020
Copy link
Contributor

@kevindiu kevindiu left a comment

Choose a reason for hiding this comment

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

LGTM

Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
@vankichi
Copy link
Contributor

/rebase
/format
/approve

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by vankichi for branch: documentation/fix-mock-codingstyle

@vdaas-ci
Copy link
Collaborator

[REBASE] Failed to rebase.

@vankichi vankichi merged commit 1b5fb94 into master Nov 10, 2020
@vankichi vankichi deleted the documentation/fix-mock-codingstyle branch November 10, 2020 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants