Opened 5 years ago

Closed 5 years ago

#7263 closed enhancement (fixed)

test.check_whitespace.get_issues not being used correctly.

Reported by: eoinof Owned by: atagar
Priority: Low Milestone:
Component: Core Tor/Stem Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

This checkin expanded the scope of the check_whitespace function https://gitweb.torproject.org/stem.git/commit/c1450e440e388295a329e84b3e935bf86f88e673

However the arg passed can only be a path, not a filename so the 3rd line of this checkin has no effect.
https://gitweb.torproject.org/stem.git/blobdiff/c52042c44b5a157dceb6013743fdea40bbc3f52c..c1450e440e388295a329e84b3e935bf86f88e673:/run_tests.py

A easier approach would be to scan all python files in the project?
I've made this change here:
https://github.com/eoinof/stem/commit/5c64a755590a275265665cf082a2fc928ac0972b#run_tests.py

And fixed 2 whitespace issues in run_tests.py here:
https://github.com/eoinof/stem/commit/b458b667913f4b4e89fb1d11afea68a15fef3f84#run_tests.py

Child Tickets

Change History (1)

comment:1 Changed 5 years ago by atagar

  • Resolution set to fixed
  • Status changed from new to closed

Hi Eoin. Great catch! I'd rather not go with a check of '.' for a couple reasons...

  • Not everything in our directory might be part of the library. For instance, I have a couple scratch scripts I've used for testing.
  • When we have a setup.py our build directory will be in here too, and I don't really want to check its contents.

Made an alternate fix for this...
https://gitweb.torproject.org/stem.git/commitdiff/54e3970b674665d58b786b52af02b18bdb686136

... and also corrected another bug in this code...
https://gitweb.torproject.org/stem.git/commitdiff/d46292f0dce4a189457b02a1ea951e845094c509

Thanks! -Damian

Note: See TracTickets for help on using tickets.