Skip to content

Commit 2e5ed94

Browse files
Farighkunaltyagi
authored andcommitted
nsiqcppstyle_exe: Fix indentation bug (#13)
Restore proper indentation based on the code prior to this commit : f5767c1 nsiqcppstyle_exe.py#L266 This else was attached to the previous for instead of the if as the comment suggests
1 parent 1774ad4 commit 2e5ed94

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

nsiqcppstyle_exe.py

+18-18
Original file line numberDiff line numberDiff line change
@@ -263,24 +263,24 @@ def main(argv=None):
263263
ProcessFile(ruleManager, targetPath, analyzedFiles, ciMode)
264264

265265
# if the target is directory, analyze it with filefilter and basefilelist
266-
else:
267-
for root, dirs, files in os.walk(targetPath):
268-
if '.cvs' in dirs:
269-
dirs.remove('.cvs')
270-
if '.svn' in dirs:
271-
dirs.remove('.svn')
272-
if '.git' in dirs:
273-
dirs.remove('.git')
274-
if '.hg' in dirs:
275-
dirs.remove('.hg')
276-
for fname in files:
277-
fileExtension = fname[fname.rfind('.') + 1: ]
278-
eachFile = os.path.join(root, fname)
279-
basePart = eachFile[len(targetPath): ]
280-
if fileExtension in cExtendstionSet and basefilelist.IsNewOrChanged(eachFile) and filter.CheckFileInclusion(basePart):
281-
nsiqcppstyle_reporter.StartFile(os.path.dirname(basePart), fname)
282-
ProcessFile(ruleManager, eachFile, analyzedFiles, ciMode)
283-
nsiqcppstyle_reporter.EndFile()
266+
else:
267+
for root, dirs, files in os.walk(targetPath):
268+
if '.cvs' in dirs:
269+
dirs.remove('.cvs')
270+
if '.svn' in dirs:
271+
dirs.remove('.svn')
272+
if '.git' in dirs:
273+
dirs.remove('.git')
274+
if '.hg' in dirs:
275+
dirs.remove('.hg')
276+
for fname in files:
277+
fileExtension = fname[fname.rfind('.') + 1: ]
278+
eachFile = os.path.join(root, fname)
279+
basePart = eachFile[len(targetPath): ]
280+
if fileExtension in cExtendstionSet and basefilelist.IsNewOrChanged(eachFile) and filter.CheckFileInclusion(basePart):
281+
nsiqcppstyle_reporter.StartFile(os.path.dirname(basePart), fname)
282+
ProcessFile(ruleManager, eachFile, analyzedFiles, ciMode)
283+
nsiqcppstyle_reporter.EndFile()
284284
ruleManager.RunProjectRules(targetPath)
285285
nsiqcppstyle_reporter.EndTarget()
286286

0 commit comments

Comments
 (0)