mirror of
https://github.com/mandiant/capa.git
synced 2026-07-01 10:34:57 -07:00
linter: use posixpath to normalize slashes
This commit is contained in:
+2
-1
@@ -13,6 +13,7 @@ import hashlib
|
||||
import logging
|
||||
import os.path
|
||||
import itertools
|
||||
import posixpath
|
||||
|
||||
import argparse
|
||||
|
||||
@@ -87,7 +88,7 @@ class NamespaceDoesntMatchRulePath(Lint):
|
||||
if 'lib' in rule.meta:
|
||||
return False
|
||||
|
||||
return rule.meta['namespace'] not in rule.meta['capa/path'].replace('\\', '/')
|
||||
return rule.meta['namespace'] not in posixpath.normpath(rule.meta['capa/path'])
|
||||
|
||||
|
||||
class MissingScope(Lint):
|
||||
|
||||
Reference in New Issue
Block a user