зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1578673 - [mozlint] Skip the file-perm linter on Windows r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D44635 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
4914daa1d0
Коммит
4203206dd6
|
@ -5,6 +5,7 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
import os
|
||||
import platform
|
||||
|
||||
from mozlint import result
|
||||
from mozlint.pathutils import expand_exclusions
|
||||
|
@ -13,6 +14,12 @@ results = []
|
|||
|
||||
|
||||
def lint(paths, config, fix=None, **lintargs):
|
||||
|
||||
if platform.system() == 'Windows':
|
||||
# Windows doesn't have permissions in files
|
||||
# Exit now
|
||||
return results
|
||||
|
||||
files = list(expand_exclusions(paths, config, lintargs['root']))
|
||||
for f in files:
|
||||
if os.access(f, os.X_OK):
|
||||
|
|
Загрузка…
Ссылка в новой задаче