-
-
Notifications
You must be signed in to change notification settings - Fork 209
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 sphinx-lint to the ci workflow and Makefile. #496
Conversation
I suggest that we run the lint tool before proceeding with the full HTML build. This way, we can detect any issues earlier. Also, I am concerned about potential false alarms that may block pull requests. @mattwang44 currently do we have a such setting that requires all checks to pass before PR merge? |
yes, and I tend not to change the setting. I think we should look into the current lint issues first before merging this PR. The one in the readme.rst can be ignored (just fix it) but the other two in sphinx.po seem to be false alarms. Not sure if sphinx-lint has support any syntax that allows users to ignore the issues (like |
I now moved this before the validate step in 6f7d53b. I also verified that
I'm looking at the I can also prepare another PR to fix all the issues so that we can merge it before this PR. Finally, in c5462a9, I added a |
Could we just add Makefile to this commit? If so, I agree to merge this PR. I don't think we are ready to integrate this with CI. The benefits are not clear now, we still need to check many common errors specific to CJK text. |
My plan is to leave the CI for now so that we can see if the changes we make work or not -- I can remove it before merging. I now backported python/cpython#107067:
Next I'll fix the other errors. |
I've fixed the trailing whitespace issue in sphinx.po (#504) |
.github/workflows/ci.yml
Outdated
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Lint |
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.
@ezio-melotti may you remove this? We can provide this linter in our tool set but I don't think it is ready for production use.
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 now removed this. Let me know if there is anything else I should do before we merge this. You can also ping me on Discord if you want to talk about what should be changed in the workflow and/or sphinx-lint
to make it suitable for this repo.
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.
It looks great! Thanks, Ezio!
Maybe the next step is trying to use it as a pre-commit hook (ref).
@cschan1828 I believe we can merge this PR, right? |
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.
Sorry for late response. It looks good to me. Thanks for your contribution!
* Add sphinx-lint to the Makefile.
This is an attempt to add a linter, as suggested in #494.