-
Notifications
You must be signed in to change notification settings - Fork 104
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
[FEATURE] Code analysis tool #313
[FEATURE] Code analysis tool #313
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So how does this work and what does it do? Any badges for README?
.github/workflows/code-analysis.yml
Outdated
@@ -0,0 +1,34 @@ | |||
name: Codacy Analysis CLI |
Check notice
Code scanning / Checkov (reported by Codacy)
Ensure top-level permissions are not set to write-all
I'm good with this! Do you want to try to address the above complaints from codacy before merging or leave them alone/dismiss them? |
@Jakob3xD are you ok with adding codacy here? any reasons not to? |
I added my concerns to the issue but in general I am okay with merging it and seeing how its works. |
Tasks fail due to problems on the side of the tool itself. Here is the link to the issue, I will follow the fix until I need to merge |
It seems that the problem has been solved, who has access to restart jobs, please restart |
README.md
Outdated
@@ -1,4 +1,11 @@ | |||
[![Go Reference](https://pkg.go.dev/badge/github.com/opensearch-project/opensearch-go.svg)](https://pkg.go.dev/github.com/opensearch-project/opensearch-go/v2) [![Build](https://github.com/opensearch-project/opensearch-go/actions/workflows/lint.yml/badge.svg)](https://github.com/opensearch-project/opensearch-go/actions/workflows/lint.yml) [![Unit](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-unit.yml/badge.svg)](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-unit.yml) [![Integration](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-integration.yml/badge.svg)](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-integration.yml) [![codecov](https://codecov.io/gh/opensearch-project/opensearch-go/branch/main/graph/badge.svg?token=MI9g3KYHVx)](https://codecov.io/gh/opensearch-project/opensearch-go) [![Chat](https://img.shields.io/badge/chat-on%20forums-blue)](https://discuss.opendistrocommunity.dev/c/clients/) ![PRs welcome!](https://img.shields.io/badge/PRs-welcome!-success) | |||
[![Go Reference](https://pkg.go.dev/badge/github.com/opensearch-project/opensearch-go.svg)](https://pkg.go.dev/github.com/opensearch-project/opensearch-go/v2) |
Check warning
Code scanning / Markdownlint (reported by Codacy)
First line in a file should be a top-level heading
README.md
Outdated
**opensearch-go** is | ||
[a community-driven, open source fork](https://aws.amazon.com/blogs/opensource/introducing-opensearch/) | ||
of go-elasticsearch licensed under the [Apache v2.0 License](LICENSE.txt). For | ||
more information, see [opensearch.org](https://opensearch.org/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems unrelated, and can we please not fold markdown?
https://code.dblock.org/2021/06/07/to-wrap-or-not-to-wrap-in-markdown.html
README.md
Outdated
@@ -31,7 +39,9 @@ | |||
|
|||
## Code of Conduct | |||
|
|||
This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUCT.md). For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq), or contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | |||
This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUCT.md). For more information see the [Code of Conduct FAQ] |
Check notice
Code scanning / Remark-lint (reported by Codacy)
Warn when references to undefined definitions are found.
README.md
Outdated
@@ -31,7 +39,9 @@ | |||
|
|||
## Code of Conduct | |||
|
|||
This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUCT.md). For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq), or contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | |||
This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUCT.md). For more information see the [Code of Conduct FAQ] |
Check warning
Code scanning / Markdownlint (reported by Codacy)
Expected: 80; Actual: 137
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to disable all or these?
README.md
Outdated
@@ -31,7 +39,9 @@ | |||
|
|||
## Code of Conduct | |||
|
|||
This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUCT.md). For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq), or contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | |||
This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUCT.md). For more information see the [Code of Conduct FAQ] | |||
(https://aws.github.io/code-of-conduct-faq), or contact [[email protected]](mailto:[email protected]) |
Check warning
Code scanning / Markdownlint (reported by Codacy)
Bare URL used
README.md
Outdated
@@ -12,7 +19,8 @@ | |||
|
|||
## Welcome! | |||
|
|||
**opensearch-go** is [a community-driven, open source fork](https://aws.amazon.com/blogs/opensource/introducing-opensearch/) of go-elasticsearch licensed under the [Apache v2.0 License](LICENSE.txt). For more information, see [opensearch.org](https://opensearch.org/). | |||
**opensearch-go** is | |||
[a community-driven, open source fork](https://aws.amazon.com/blogs/opensource/introducing-opensearch/) of go-elasticsearch licensed under the [Apache v2.0 License](LICENSE.txt). For more information, see [opensearch.org](https://opensearch.org/). |
Check warning
Code scanning / Markdownlint (reported by Codacy)
Expected: 80; Actual: 247
README.md
Outdated
@@ -31,7 +39,9 @@ OpenSearch Go Client | |||
|
|||
## Code of Conduct | |||
|
|||
This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUCT.md). For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq), or contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | |||
This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUCT.md). For more information see the [Code of Conduct FAQ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still looks wrapped.
@dblock I research this topic more deeply, and as far as I understood, large tools are not particularly suitable for us. SonarQube, for example, is practically the most popular solution, but integration with SonarCloud is unlikely to please the community. And the solution with codacy actually turned out to be not so subject to customization. e.g. I could not turn off the check for markdown wrapping. So maybe we should stick with golint for now, as suggested by @Jakob3xD? The most interesting thing to note integration with github |
I'm good with whatever you and @Jakob3xD can agree on! |
@zethuman can you please rebase and maybe remove the changes from |
9f59154
to
5831f1f
Compare
Signed-off-by: Rakhat Zhuman <[email protected]>
@Jakob3xD done |
Signed-off-by: Rakhat Zhuman <[email protected]>
The MR it self LGTM but I am concerned about the current linting issues. Will the current complains occur on every PR that gets created? |
@Jakob3xD no, it is possible to remove it by specifying an optional parameter
It also seems to me that it is a little illogical to raise the entire project and show all the issues |
Signed-off-by: Rakhat Zhuman <[email protected]>
Description
This PR adds option to check overall quality of code.
Issues Resolved
Closes [#307].
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.