From e3245385c128281fafe6d684d3eefbc00fe2b53d Mon Sep 17 00:00:00 2001 From: William Ballenthin Date: Sun, 28 Jun 2020 08:52:30 -0600 Subject: [PATCH] linter: use posixpath to normalize slashes --- scripts/lint.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/lint.py b/scripts/lint.py index 25b6b464..0a25f731 100644 --- a/scripts/lint.py +++ b/scripts/lint.py @@ -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):