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

[Feature Request] new lint rule to require a comment #. at end each code block. #564

Closed
EdSaleh opened this issue Jun 2, 2024 · 2 comments
Labels
bug Issue identified by VS Code Team member as probable bug triage-needed Issue is not triaged.

Comments

@EdSaleh
Copy link

EdSaleh commented Jun 2, 2024

Create a new rule to require that each block must end with # or #.
This would work as a curly braces blocks found in C style languages.
Also, this could also be used to reformat python code by code editor to fix any indentation issues.

Users can also use a different word symbol or use a new line for this purpose. (#., #/, newline, etc). The user has the option to select the keyword they would like to have for the project.

Example:

import string
def atbash(sequence: str) -> str:
    """
    Example
    """
    output = ""
    for i in sequence:
        extract = ord(i)
        if 65 <= extract <= 90:
            output += chr(155 - extract)
        #.
        elif 97 <= extract <= 122:
            output += chr(219 - extract)
        #.
        else:
            output += i
        #.
    #.
    return output
#.
@EdSaleh EdSaleh added the bug Issue identified by VS Code Team member as probable bug label Jun 2, 2024
@github-actions github-actions bot added the triage-needed Issue is not triaged. label Jun 2, 2024
@karthiknadig
Copy link
Member

This is just a wrapper around pylint for VS Code, please file this feature request on https://github.com/pylint-dev/pylint/issues

@karthiknadig karthiknadig closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
@Pierre-Sassoulas
Copy link

(pylint maintainer here), you should create your custom pylint plugin for that, enforcing a kind of 'end' keyword to make python look like pascal or ada is going to not be pythonic enough / too controversial for pylint core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug triage-needed Issue is not triaged.
Projects
None yet
Development

No branches or pull requests

3 participants