Skip to content

Commit

Permalink
Fix small error
Browse files Browse the repository at this point in the history
  • Loading branch information
kunaltyagi committed Sep 14, 2024
1 parent 0911cf3 commit f0391d0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions nsiqcppstyle_exe.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@ def main():

# if the target is file, analyze it without condition
if targetPath.is_file():
fileExtension = targetPath.suffix[1:]
if check_file_ext(fileExtension, cExtendstionSet):
if check_file_ext(targetPath, cExtendstionSet):
ProcessFile(ruleManager, targetPath, analyzedFiles)

# if the target is directory, analyze it with filefilter and
Expand All @@ -319,11 +318,10 @@ def main():
if ".hg" in dirs:
dirs.remove(".hg")
for fname in files:
fileExtension = fname[fname.rfind(".") + 1 :]
eachFile = os.path.join(root, fname)
basePart = eachFile[len(targetPath) :]
if (
check_file_ext(fileExtension, cExtendstionSet)
check_file_ext(Path(fname), cExtendstionSet)
and basefilelist.IsNewOrChanged(eachFile)
and filter.CheckFileInclusion(basePart)
):
Expand Down

0 comments on commit f0391d0

Please sign in to comment.