-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Migrated the Ruby Linter to NodeJS Linter #16316
base: master
Are you sure you want to change the base?
Conversation
Hi @Ajay-singh1. Thanks for your PR. I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@craigbox The previous PR got cluttered up so I had to create a new one.Regarding the MD007 rule the ruby based linter doesnt strictly enforce the MD007 rule and allows mixed indentation while the node based linter enforces strict MD007 rule so a much better solution will be to disable the MD007 rule.Once the check passes here I will update the common files so that the change is applied to all istio repos.The linting is sucessful now:- |
I actually strongly disagree with disabling MD007. This should be something we enforced, it's been something I have been fixing in PRs that I review, it'd be much better to enforce and resolve the issues. |
@dhawton I need a couple of days to come up with a solution.Will be right back. |
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.
/ok-to-test
/retest |
@dhawton markdownlint-cli2 is not being recognized. |
/retest-required |
Complex Issue unable to resolve closing this. |
@Ajay-singh1 are you intending to pick this up elsewhere? I think you have everything you need to proceed, and I can help steward it. Otherwise I can move it onto another maintainer. |
@craigbox Yes , this will work and will pass all the lint checks.I am waiting for the PR to be merged in istio/tools once it is approved the checks will pass here and we are good to go. |
I don't see a PR. Can you link one if it exists? Else, do you want to add it to istio/tools#3161 ? |
Yes this specific PR I was talking about istio/tools#3161.It is in pending state once it merges the lint checks will pass here I am completely confident about it. |
/retest |
You may have to wait a day or so for the automator to build a new container and update this repo to use it. |
👍 |
/retest |
Try pushing an empty commit. it will probably retest on an existing image
otherwise
|
Nice! The build is working. The gencheck error is because you added a I would also like to standardize on using a |
@@ -81,6 +81,7 @@ spec: | |||
mtls: | |||
mode: STRICT | |||
--- | |||
<!-- markdownlint-disable-file MD007 --> |
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 content is now in the YAML files that are used for testing, which will almost certainly cause all the tests to fail.
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.
I agree with you I will fix this within a day.After reviewing the documentation I found that it doesnt`t support rules in doc frontmatter disabling the rules through inline html comments is the optimal way.
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.
Yeah, that's confirmed here: DavidAnson/markdownlint#1250
unfortunate.
@Ajay-singh1: The following tests failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
{ | ||
"default": false, | ||
"MD002": { "level": 2 }, | ||
"MD007": { "indent": 4 }, |
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 rule is disabled in many files. Can you look into why they are failing, and if we can just change the markup to pass correctly? Did we not have this rule in the old config?
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.
We did have this rule in the old configuration.It is failing because markdownlint-cli2 enforces strict MD007 rules while the previous linter allows for mixed indentation for the MD007 rule.Changing markup will have several breaking changes.
@@ -0,0 +1,13 @@ | |||
{ | |||
"default": false, |
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.
Does this turn off the default rules? Wouldn't we want them on?
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.
Yes this will turn off the default rules , no turning them on is not a good way because all the rules will be applied by default which is used by the linter and we dont want them right?We will explicitly define the rules which we want to use to lint our markdown files.
Description
This PR replaces the Ruby linter to a modern NodeJS linter which is more flexible and advanced.
The linter passes all the docs test successfully and also it resolves #7906.
This PR fixes issue No. #15148
Reviewers