1 # SPDX-License-Identifier: EPL-1.0
2 ##############################################################################
3 # Copyright (c) 2018 The Linux Foundation and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Eclipse Public License v1.0
7 # which accompanies this distribution, and is available at
8 # http://www.eclipse.org/legal/epl-v10.html
9 ##############################################################################
10 """Ensures that the prefix MUST be set to blank.
12 The production prefix MUST always be a blank string.
15 __author__ = 'Thanh Ha'
23 def check_prefix(filename):
24 with open(filename, 'r') as _file:
25 for num, line in enumerate(_file, 1):
26 if re.search('prefix:', line):
29 'ERROR: A non-blank prefix is defined in '
30 'jjb/defaults.yaml. The prefix MUST be set to blank '
36 if __name__ == "__main__":
37 check_prefix(os.path.join('jjb', 'defaults.yaml'))