Skip to content

scons lint #5918

@derekriemer

Description

@derekriemer

I propose a linter to be built into NVDA's scons fscontruct file. Here are reasons I feel this way.

  1. Code reviews already take a while to complete.
  2. Once complete, the code review can be held up by contributers having to fix simple things like "x=4" to "x = 4"
  3. A whole step could be taken from the equation, and NVDA's source code could be much cleaner indeed if a linter were included in NVDA's development packages.
  4. Adding a note to the contributers guide, telling people to simply run scons lint before they make a PR, because code reviews that don't pass scons lint won't be excepted.

For background knowledge, a linter is a program that does static analysis of code, to ensure quality by forcing a certain structure. I believe linters can either fix the errors for you, or can give an error like
"c:\users\derek\nvda\source\browseMode.py 55:3,
Illegal use of spaces around equals signs, ensure a space is padding both sides of an equals sign instead"
This both improves the quality of code, and helps to ensure that code reviews take less time.

References:

PyLint
[What are the comprehensive lint checkers for python | stack overflow](http://stackoverflow.com/questions/5611776/what-are-the-comprehensive-lint-che
ckers-for-python)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions