Opened 5 years ago

Closed 3 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:
Has a Patch: yes Platform: All



Now that development has migrated to git the 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)

0001-CodingStyle-checking-tool-directory.patch (1.3 KB) - added by LkpPo 5 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 5 years ago by LkpPo

Has a Patch: set

comment:2 Changed 5 years ago by korli

I think you can iterate over vcsCacheDirectory and use a try/except.

comment:3 Changed 5 years ago by LkpPo

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")
             path = os.path.join(dir, name)
             if os.path.isfile(path) and os.path.splitext(name)[1] in extensions:
                 print "adding", path

comment:4 Changed 5 years ago by korli

ok, but what's the point in removing name from names then?

comment:5 Changed 5 years ago by LkpPo

To avoid recursive exploration of part of the tree in the folder list passed to the function os.path.walk(). See for more information.

comment:6 Changed 5 years ago by pulkomandy

Hi, Are there plans for an updated version of the patch applying the comments above or should we apply the existing one?

comment:7 Changed 4 years ago by phoudoin

Sounds good to me.

comment:8 Changed 3 years ago by pulkomandy

Resolution: fixed
Status: newclosed

Applied in hrev50090.

Note: See TracTickets for help on using tickets.