tests: Start linting tests
See original GitHub issueI believe we should enable linting (tox -e lint
) for new test files (maybe even for some recent additions). Possibly some exceptions are needed but in general I think the tests would be better if they were linted.
Good start for this would be test_updater_with_simulator.py and repository_simulator.py: it’s new code and files are small so the changes are easy – the real job is figuring out how to select what to lint… Possible options:
- separate directory for legacy (unlinted) tests?
- define list of linted files in tox.ini / setup.cfg ? (I don’t like this one as it means default for new files is no lint)
- define list of files excluded from lint in tox.ini & setup.cfg ?
- some other strategy?
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
How Unit Testing, Linting, and Continuous Integration in ...
Lint would go through your program and look for errors, bugs, stylistic issues, etc. This idea is that our “linter” would pick up...
Read more >Lint Check Unit Testing - Google Samples
Everything is kept together, so it's easier to look at a test and see what it analyzes and what the expected results are....
Read more >Unit Tests - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >Automated Code Linting and Testing | by Harsh Verma - Medium
1)Setup husky · 2)Install lint-staged · 3)Now lets setup “Prettier” to format our code · 4)Adding Jest as well · 5)Adding “.editorconfig” file....
Read more >How to Test Custom Lint Checks - Infinum
Lint checks are tested with the JUnit framework. The only part that's a bit different is that your class must extend LintDetectorTest class ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Splitting tests across multiple directories may make sense, but I think the right combination of simple and not prone to error is a list of files excluded from lint? That way, new test files are linted and there’s no ambiguity about where to place new tests.
Also, the no-lint list gets shorter as we replace/remove existing tests.
TODO items left to close this issue:
pylint
andmypy
warnings | #1657