Opened 10 years ago
Closed 9 years ago
#11532 closed bug (fixed)
Fix CodingStyle checking tool for cached directories of vcs
Reported by: | LkpPo | Owned by: | nobody |
---|---|---|---|
Priority: | low | Milestone: | R1 |
Component: | - General | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Hello,
Now that development has migrated to git the checkstyle.py tool crashes when invoked on a file. This patch fixes this behaviour and adds support for the most common VCS if someone want to use the one that prefers to code.
I am looking for a sponsor for review and push the patch, please.
Thank you for your help.
-- Stéphane Aulery
Attachments (1)
Change History (9)
by , 10 years ago
Attachment: | 0001-CodingStyle-checking-tool-directory.patch added |
---|
comment:1 by , 10 years ago
patch: | 0 → 1 |
---|
comment:2 by , 10 years ago
comment:3 by , 10 years ago
I can also simplify the script by a single loop without exception:
for name in names: if name in vcsCacheDirectory: print(name + " cache directory has been ignored") names.remove(name) else: path = os.path.join(dir, name) if os.path.isfile(path) and os.path.splitext(name)[1] in extensions: print "adding", path result.append(path)
comment:5 by , 10 years ago
To avoid recursive exploration of part of the tree in the folder list passed to the function os.path.walk()
. See https://docs.python.org/2/library/os.path.html for more information.
comment:6 by , 10 years ago
Hi, Are there plans for an updated version of the patch applying the comments above or should we apply the existing one?
I think you can iterate over vcsCacheDirectory and use a try/except.