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

Add markdown linter #261

Merged
merged 6 commits into from
Apr 4, 2023

Conversation

zethuman
Copy link
Contributor

Description

Add a linter that formats markdown files with prettier

Issues Resolved

Closes [#260].

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.

@zethuman
Copy link
Contributor Author

zethuman commented Mar 23, 2023

@dblock can we open permissions to write repository? It is necessary to push formatted code
settings > actions > general

image

P.S. tests are failed, since they are runs in this repository and looks up source branch (zethuman:feature/markdown-linter)
I checked this by opening another pull request from my main branch (#262 ), I got an error related to authorization, which will be solved if you give write access as shown at the top

@dblock
Copy link
Member

dblock commented Mar 23, 2023

@zethuman zethuman closed this Mar 24, 2023
@zethuman zethuman force-pushed the feature/markdown-linter branch from 9529ee0 to 0da56b2 Compare March 24, 2023 15:48
Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>
@zethuman zethuman reopened this Mar 24, 2023
Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>
@zethuman
Copy link
Contributor Author

@dblock ok, agree with this. Added --prose-wrap never option to never wrap md files

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Let's add to the developer guide that one is supposed to run a markdown linter before committing?

.github/workflows/lint.yml Show resolved Hide resolved
.github/workflows/lint.yml Outdated Show resolved Hide resolved
Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>
@zethuman
Copy link
Contributor Author

Add makefile script to check for format and updated developer guide

.github/workflows/lint.yml Show resolved Hide resolved
.github/workflows/lint.yml Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>
@zethuman zethuman requested a review from dblock March 31, 2023 18:50
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Looks good! Just needs to actually fix the violations :)

[warn] Code style issues found in 7 files. Forgot to run Prettier?

zethuman and others added 2 commits April 4, 2023 07:18
Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>
@zethuman zethuman requested a review from dblock April 4, 2023 01:27
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Is there an option to prettier to format tables? Many editors auto-format those these days.

@dblock dblock merged commit 7cc5fa8 into opensearch-project:main Apr 4, 2023
@zethuman zethuman deleted the feature/markdown-linter branch April 4, 2023 15:57
@zethuman
Copy link
Contributor Author

zethuman commented Apr 7, 2023

@dblock sorry, lost your message.

Can you provide an example of how it is now and how it should be. For me, everything works pretty well in terms of table formatting

@dblock
Copy link
Member

dblock commented Apr 10, 2023

Yeah it's NBD, if you look at the diff here you will see that prettier got rid of spaces, so it's harder to read in an editor.

@zethuman
Copy link
Contributor Author

zethuman commented Apr 11, 2023

I opened an issue on the developer side of the tool, we will figure it out what is wrong

zethuman added a commit to zethuman/opensearch-go that referenced this pull request Apr 12, 2023
* Add linter for markdown files

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Updated CHANGELOG.md

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Add make-script and update DEVELOPER_GUIDE.md

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Updated linter options

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Fixed mmarkdown files format

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

---------

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>
zethuman added a commit to zethuman/opensearch-go that referenced this pull request Apr 12, 2023
* Add linter for markdown files

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Updated CHANGELOG.md

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Add make-script and update DEVELOPER_GUIDE.md

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Updated linter options

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Fixed mmarkdown files format

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

---------

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>
zethuman added a commit to zethuman/opensearch-go that referenced this pull request Apr 12, 2023
* Add linter for markdown files

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Updated CHANGELOG.md

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Add make-script and update DEVELOPER_GUIDE.md

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Updated linter options

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Fixed mmarkdown files format

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

---------

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>
zethuman added a commit to zethuman/opensearch-go that referenced this pull request Apr 12, 2023
* Add linter for markdown files

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Updated CHANGELOG.md

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Add make-script and update DEVELOPER_GUIDE.md

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Updated linter options

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Fixed mmarkdown files format

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

---------

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>
dblock added a commit that referenced this pull request Apr 14, 2023
* Added @Jakob3xD as a co-maintainer. (#270)

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Bump github.com/aws/aws-sdk-go from 1.44.230 to 1.44.235 (#271)

* Bump github.com/aws/aws-sdk-go from 1.44.230 to 1.44.235

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.230 to 1.44.235.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](aws/aws-sdk-go@v1.44.230...v1.44.235)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update changelog

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Add markdown linter (#261)

* Add linter for markdown files

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Updated CHANGELOG.md

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Add make-script and update DEVELOPER_GUIDE.md

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Updated linter options

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Fixed mmarkdown files format

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

---------

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Added Jakob3xD to CODEOWNERS, removed @svencowart. (#272)

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Add index_lifecycle guide

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Updated CHANGELOG.md

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* opensearchapi: Fix handling of errors without error response body (#286)

Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Add bulk guide

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Update CHANGELOG.md

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Add document_lifecycle guide

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Add indent to go code

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

* Add indent to go code

Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>

---------

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: Rakhat Zhuman <zhumanrakhat01@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
Co-authored-by: Daniel (dB.) Doubrovkine <dblock@dblock.org>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jakob <jakob.hahn@hetzner.com>
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.

2 participants