Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit e9533ae

Browse files
vrothberggregkh
authored andcommitted
checkkconfigsymbols.py: fix sorted output
Commit b1a3f24 ("checkkconfigsymbols.py: make it Git aware") mistakenly removed to print undefined Kconfig symbols in alphabetical order. Furthermore, the script does not print anything anymore when the entire tree is checked (i.e., when no commit is specified). This patch restores the sorted output and adds the missing print for the default case. Additionally, the file lists are now sorted as well which (a) makes it easier to read and (b) makes the output deterministic. Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a087146 commit e9533ae

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

scripts/checkkconfigsymbols.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,15 @@ def main():
112112
undefined_b = check_symbols()
113113

114114
# report cases that are present for the commit but not before
115-
for feature in undefined_b:
115+
for feature in sorted(undefined_b):
116116
# feature has not been undefined before
117117
if not feature in undefined_a:
118-
files = undefined_b.get(feature)
118+
files = sorted(undefined_b.get(feature))
119119
print "%s\t%s" % (feature, ", ".join(files))
120120
# check if there are new files that reference the undefined feature
121121
else:
122-
files = undefined_b.get(feature) - undefined_a.get(feature)
122+
files = sorted(undefined_b.get(feature) -
123+
undefined_a.get(feature))
123124
if files:
124125
print "%s\t%s" % (feature, ", ".join(files))
125126

@@ -129,8 +130,9 @@ def main():
129130
# default to check the entire tree
130131
else:
131132
undefined = check_symbols()
132-
for feature in undefined:
133-
files = undefined.get(feature)
133+
for feature in sorted(undefined):
134+
files = sorted(undefined.get(feature))
135+
print "%s\t%s" % (feature, ", ".join(files))
134136

135137

136138
def execute(cmd):

0 commit comments

Comments
 (0)