Name Date Size #Lines LOC

..--

MakefileH A D25-Apr-2025185 85

check-styleH A D25-Apr-20254.7 KiB14565

check_lint_testsH A D25-Apr-20254.9 KiB158104

checkpatch.plH A D25-Apr-2025211.7 KiB7,2055,522

checkpatch_json.pyH A D25-Apr-20251.9 KiB6756

const_structs.checkpatchH A D25-Apr-2025581 4039

coreboot.dictH A D25-Apr-202514.9 KiB2,1742,173

description.mdH A D25-Apr-202540 21

helper_functions.shH A D25-Apr-20251 KiB4629

kconfig_lintH A D25-Apr-202555.1 KiB1,397982

kconfig_lint_READMEH A D25-Apr-20254.4 KiB10284

lintH A D25-Apr-20252.8 KiB11691

lint-000-license-headersH A D25-Apr-20253.6 KiB144101

lint-001-no-global-config-in-romstageH A D25-Apr-2025748 1910

lint-007-checkpatchH A D25-Apr-20251.3 KiB5332

lint-008-kconfigH A D25-Apr-2025609 2613

lint-014-qualified-typesH A D25-Apr-2025721 2514

lint-extended-007-checkpatchH A D25-Apr-2025553 2616

lint-extended-015-final-newlinesH A D25-Apr-20251.8 KiB6846

lint-extended-020-signed-off-byH A D25-Apr-2025493 2311

lint-stable-000-license-headersH A D25-Apr-2025185 81

lint-stable-003-whitespaceH A D25-Apr-20251.1 KiB3219

lint-stable-004-style-labelsH A D25-Apr-2025451 2010

lint-stable-005-board-statusH A D25-Apr-2025893 3726

lint-stable-006-board-nameH A D25-Apr-2025698 3021

lint-stable-008-kconfigH A D25-Apr-2025630 2613

lint-stable-009-old-licensesH A D25-Apr-20251 KiB5235

lint-stable-010-asm-syntaxH A D25-Apr-2025335 166

lint-stable-012-executable-bitH A D25-Apr-2025559 2110

lint-stable-013-site-localH A D25-Apr-2025734 2811

lint-stable-016-non-asciiH A D25-Apr-20251.3 KiB4020

lint-stable-017-configsH A D25-Apr-2025516 2210

lint-stable-018-symlinksH A D25-Apr-2025463 2713

lint-stable-019-header-filesH A D25-Apr-20251.3 KiB4732

lint-stable-021-coreboot-lowercaseH A D25-Apr-2025745 2512

lint-stable-022-clang-formatH A D25-Apr-2025970 3519

lint-stable-023-filenamesH A D25-Apr-2025394 219

lint-stable-024-kconfig-no-subsystemH A D25-Apr-2025468 1911

lint-stable-026-line-endingsH A D25-Apr-2025400 187

lint-stable-027-maintainers-syntaxH A D25-Apr-2025531 2313

lint-stable-028-touchpad-probed-warningH A D25-Apr-2025778 3019

lint-stable-029-kconfig-name-selectsH A D25-Apr-2025361 179

lint-stable-030-makefile-incH A D25-Apr-2025534 2513

remccoms3.sedH A D25-Apr-20251.4 KiB10375

spelling.txtH A D25-Apr-2025216.3 KiB9,8729,870

kconfig_lint_README

1kconfig_lint is a tool to help identify issues within coreboot's Kconfig
2files.  It is very specific to coreboot, and is not intended to be used as a
3generic Kconfig lint tool for other projects.
4
5Operation:
6kconfig_lint parses the entire kconfig tree, building up a hash table of all
7of the statements.  It then searches the coreboot tree looking for all usage of
8any Kconfig symbols.  By combining these two, it is able to find many issues
9that would be difficult to locate otherwise.
10
11Usage:
12kconfig_lint <options>
13 -o|--output=file    Set output filename
14 -p|--print          Print full output
15 -e|--errors_off     Don't print warnings or errors
16 -w|--warnings_off   Don't print warnings
17 -n|--notes          Show minor notes
18 -G|--no_git_grep    Use standard grep tools instead of git grep
19
20
21Options:
22 -o|--output=file    Send the output to a file instead of printing to stdout.
23
24 -p|--print          Shows the entire Kconfig tree as parsed by kconfig_lint,
25                     including the filename and line number of each statement.
26                     This can be very helpful for debugging Kconfig issues.
27
28 -e|--errors_off     Suppress both error and warning output.  Useful along with
29                     the --print command
30
31-w|--warnings_off    Suppress warning output
32
33-n|--notes           Enable the display of minor notes that kconfig_lint has
34                     found.  These might be issues, but probably are not.
35
36 -G|--no_git_grep    Instead of using the 'git grep' command, use regular grep.
37                     This is useful for checking coreboot trees that are not
38                     contained in a git repo.
39
40Issues that kconfig_lint checks for:
41
42Notes:
43- Show when the range set for a hex or int does not match a previous range
44
45Warnings in Kconfig files:
46- Symbols that are defined but never used.
47- A 'source' keyword loading a Kconfig file that has already been loaded.
48- A 'source' keyword loading a Kconfig file that doesn't exist. Note that
49  globs are excluded from this check.
50
51Warnings in coreboot source files:
52- Kconfig files that are not loaded by a 'source' keyword.
53- Naked use of boolean CONFIG_XXX Kconfig in C that's not wrapped in CONFIG()
54
55Errors in Kconfig files:
56- Any 'default' expressions that can never be reached.
57- Directories specified in a 'source' keyword do not exist.
58- Selects do not work on symbols created in a choice block.
59- All symbols used in selects or expressions must be defined in a config
60  statement.
61- 'endchoice' keyword not used in a choice block
62- Choice block defined with no symbols.
63- The 'tristate' type is not used in coreboot.
64- A 'select' keyword used outside of a config block.
65- Symbols created both inside and outside of a choice block or in two
66  different choice blocks.
67- A 'range' keyword has higher minimum than maximum value.
68- A config block with a prompt at the top level (the top level is currently
69  just for menus).
70- Indentation using spaces instead of tabs.  We indent using tabs, although
71  the tab may be followed by spaces, particularly for help blocks.
72- Lines not ending with a linefeed.  These can cause some keywords to not
73  function properly ('source' keywords in particular).  It's also just
74  generally good to end the file with a linefeed.
75- Help text starting with no whitespace.
76- Help text that starts at the same indentation level as the 'help' keyword.
77
78Errors in Kconfig that are also caught by Kconfig itself:
79- Invalid expressions.
80- Unrecognized keywords.
81- An 'optional' keyword used outside of a choice block
82- The 'select' keyword only works on bool symbols.
83- A 'range' keyword used outside of a config block.
84- A 'default' keyword used outside of a config or choice block.
85- Symbol types must be consistent - they cannot be bool in one location and
86  int in another location.
87- Type keywords (bool, int, hex, string) used outside of a config block.
88- Using a 'prompt' keyword not inside a config or choice block.
89- Symbols with no defined type.
90
91Errors in coreboot source files:
92- #define of Kconfig symbol - Symbols should only be defined in Kconfig.
93- #define starting with 'CONFIG_' - these should be reserved for Kconfig
94  symbols.
95- '#ifdef' or '#if defined' used on bool, int, or hex - these are always
96  defined in coreboot's version of Kconfig.
97- The CONFIG() macro is only valid for bool symbols.
98- CONFIG() used on unknown Kconfig, like an obsolete symbol.
99- The deprecated IS_ENABLED() macro is used.
100
101TODO: check for choice entries at the top level
102