-
Notifications
You must be signed in to change notification settings - Fork 106
Lint checker for 1.x/2.x terms #933
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
Conversation
|
||
VARIANT_PATTERNS = [] | ||
SKIP_DIRS = {".git", "venv", "__pycache__", ".pytest_cache"} |
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.
Let's skip ./ci directories too.
[Forbidden Term] ./.ci/scripts/check_deprecated_terms.py:9: "provision-configs",
[Forbidden Term] ./.ci/scripts/check_deprecated_terms.py:10: "provision-config-instances",
[Forbidden Term] ./.ci/scripts/check_deprecated_terms.py:11: "results-publishing",
[Forbidden Term] ./.ci/scripts/check_deprecated_terms.py:12: "results-publisher",
[Forbidden Term] ./.ci/scripts/check_deprecated_terms.py:13: "load-worker-coordinator-hosts",
[Forbidden Term] ./.ci/scripts/check_deprecated_terms.py:14: "execute-test",
Any ideas on how we can skip some of these too?
[Forbidden Term] ./tests/worker_coordinator/worker_coordinator_test.py:2052: async def test_execute_request_success(self):
[Forbidden Term] ./tests/worker_coordinator/worker_coordinator_test.py:2084: async def test_execute_request_with_throttling(self):
[Forbidden Term] ./osbenchmark/benchmark.py:1234: DEPRECATED_SUBCOMMANDS = ["execute-test", "execute"]
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.
hmm would you want to skip unit tests dir as well @IanHoang ?
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.
Left one comment
Signed-off-by: Michael Oviedo <[email protected]>
Signed-off-by: Michael Oviedo <[email protected]>
Signed-off-by: Michael Oviedo <[email protected]>
Update: Had offline chat with Michael. We should add ways to bypass lines with certain comments, similar to PyPi. If users present
To do this, just add this to script:
Ran it locally with these changes and got no more errors. |
osbenchmark/utils/console.py
Outdated
""" | ||
CmdLineProgressResultsPublisher supports displaying an updating progress indication together with an information message. | ||
CmdLineProgressResultsPublisher supports displaying an updating progress indication together with an information message. |
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.
@OVI3D0 Can you remove this trailing white space to unblock the lint checker?
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.
Should be fixed now 👍
osbenchmark/utils/console.py
Outdated
class CmdLineProgressResultsPublisher: | ||
# check-deprecated-terms-disable-1x | ||
""" | ||
CmdLineProgressResultsPublisher supports displaying an updating progress indication together with an information message. |
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.
@OVI3D0 Can you remove comment on line 175 and just replace CmdLineProgressResultsPublisher
on line 177 with "This class supports..."
Signed-off-by: Michael Oviedo <[email protected]>
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.
LGTM
Signed-off-by: Michael Oviedo <[email protected]>
Signed-off-by: Michael Oviedo <[email protected]>
Signed-off-by: Michael Oviedo <[email protected]>
Description
Adds a lint checker for both 1.x and 2.x terms. If the
check-1.x-terms
flag is passed then the lint checker will check for any 1.x terms, which include:And if the
check-2.x-terms
flag is passed, it'll check for:Issues Resolved
[List any issues this PR will resolve]
Testing
[Describe how this change was tested]
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.