style.py (11403:e8949ea6961f) | style.py (11468:e7d41fcc291a) |
---|---|
1#! /usr/bin/env python 2# Copyright (c) 2014, 2016 ARM Limited 3# All rights reserved 4# 5# The license below extends only to copyright in the software and shall 6# not be construed as granting a license to any other intellectual 7# property including but not limited to intellectual property relating 8# to a hardware implementation of the functionality of the software --- 99 unchanged lines hidden (view full) --- 108# if a file should be excluded from the style matching rules or 109# not. The functions are called with the file name relative to the 110# repository root (without a leading slash) as their argument. A file 111# is excluded if any function in the list returns true. 112style_ignores = [ 113 # Ignore external projects as they are unlikely to follow the gem5 114 # coding convention. 115 _re_ignore("^ext/"), | 1#! /usr/bin/env python 2# Copyright (c) 2014, 2016 ARM Limited 3# All rights reserved 4# 5# The license below extends only to copyright in the software and shall 6# not be construed as granting a license to any other intellectual 7# property including but not limited to intellectual property relating 8# to a hardware implementation of the functionality of the software --- 99 unchanged lines hidden (view full) --- 108# if a file should be excluded from the style matching rules or 109# not. The functions are called with the file name relative to the 110# repository root (without a leading slash) as their argument. A file 111# is excluded if any function in the list returns true. 112style_ignores = [ 113 # Ignore external projects as they are unlikely to follow the gem5 114 # coding convention. 115 _re_ignore("^ext/"), |
116 # Ignore test data, as they are not code 117 _re_ignore("^tests/(?:quick|long)/"), |
|
116] 117 118def check_ignores(fname): 119 """Check if a file name matches any of the ignore rules""" 120 121 for rule in style_ignores: 122 if rule(fname): 123 return True --- 26 unchanged lines hidden --- | 118] 119 120def check_ignores(fname): 121 """Check if a file name matches any of the ignore rules""" 122 123 for rule in style_ignores: 124 if rule(fname): 125 return True --- 26 unchanged lines hidden --- |