mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
[fix] don't take comments into account
This commit is contained in:
parent
9c2aec8746
commit
ef437e255e
1 changed files with 3 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
import json
|
||||
|
||||
|
||||
|
@ -53,7 +54,8 @@ def check_file_exist(file_path):
|
|||
|
||||
def read_file(file_path):
|
||||
with open(file_path) as f:
|
||||
file = f.read().splitlines()
|
||||
# remove every comments from the file content to avoid false positives
|
||||
file = re.sub("#.*[^\n]", "", f.read()).splitlines()
|
||||
return file
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue